Weblog

All | General
20060906 Wednesday September 06, 2006

System-wide AppCrash for special processes

As discussed in Easy way to install AppCrash system-wide, AppCrash can be installed as a daemon watching the entire system for crashing processes. This has proven to be the most practical way to use it. Most AppCrash users I know don't modify any of those scripts. They just use the ones supplied with the tool.

(Generally, I've noticed that ready-to-use tools performing specific tasks tend to be used much more than toolkits requiring the users to spend a lot of time and effort to learn and then to build their own tools.)

However, recently I've got a few reports from users of AppCrash saying pstack(1) and other such commands didn't work due to permission problems of the crashing process in some cases, particularly when the crashing processes are more than "user applications."

The original AppCrash design was that app_crash.d or app_crash_global.d executed the runme_on_app_crash script as the user who owned the crashing process. As it turned out, there is a problem with this approach in some cases: certain special processes have complex permission settings that prevent this design from working correctly.

Here are two examples:

To resolve this problem, I've modified (simplified, actually) the system-wide AppCrash setup described in Easy way to install AppCrash system-wide to run the /opt/app_crash/runme_on_app_crash script as root, regardless of who owns the crashing process.

Morgan Herrington and I have discussed the implications of this design change.

On one hand, running the runme_on_app_crash script as root resolves the problem described above: pstack(1) and other such commands produce their output as required for any crashing process. On the other hand, it may create some problems.

Here are the issues we have considered.

The updated tarball with AppCrash is in the same place as before: app_crash.tar.gz. The installation instructions are here: Easy way to install AppCrash system-wide.

If you already have system-wide AppCrash installed, here's how you can update it:

( Sep 06 2006, 11:11:36 AM EDT ) Permalink Comments [1]

20060331 Friday March 31, 2006

Easy way to install AppCrash system-wide

Here's an easy way to do it. I've used it myself for most Solaris 10 (or later) systems I work with, both SPARC and x86/x64.

Download file app_crash.tar.gz, say into /tmp. Then:


% su -
Password: xxxxx
# cd /opt
# gunzip -c /tmp/app_crash.tar.gz | tar xvf -
# cd app_crash

[Optional: edit script runme_on_app_crash. For example, you can
uncomment its last lines to email the AppCrash output to yourself
and/or to anyone else.]

# ./install_as_daemon

This is all you need to do. From now on, any process that crashes on your system will trigger the AppCrash action. The AppCrash daemon will be restarted automatically any time your system is rebooted.

( Mar 31 2006, 10:41:06 AM EST ) Permalink

20050623 Thursday June 23, 2005

Solaris AppCrash Updates

By Greg Nakhimovsky

In May 2005, Morgan Herrington and I created a tool called AppCrash and published an article about it:

Enabling User-Controlled Collection of Application Crash Data With DTrace

Since it was published, we have come up with a few AppCrash updates and additions. Instead of updating the article itself, we decided it's easier and more flexible to put the updates into a blog.

Note that, since all components of AppCrash are scripts, anyone can easily modify or customize them.

Here are the updates we have so far.

( Jun 23 2005, 07:53:00 AM EDT ) Permalink Comments [2]

Calendar

RSS Feeds

Search

Links

Navigation

Referers