httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Talebbeik <>
Subject Re: Solaris 2.7 and getting a clean coredump
Date Sat, 04 Dec 1999 04:00:14 GMT
I am glad that the problem is resolved. Last that I checked, the issue
of setuid() was indeed discussed in Apache's debugging page. That
is why I pointed you to the page. Here is a cut and paste from that page
about setuid(). The "coreadm" utility is something that I was not
aware of. Thanks for pointing it out.



Getting the server to dump core

Strangely enough, sometimes you actually want to force the server to crash
so that you can get a
look at some nutty behavior. Normally this can be done simply by using the
gcore command.
However, for security reasons, most Unix systems do not allow a setuid
process to dump core, since
the file contents might reveal something that is supposed to be protected
in memory.

Here is one way to get a core file from a setuid Apache httpd process on
Solaris, without knowing
which httpd child might be the one to die [note: it is probably easier to
use the MaxClients trick in the
first section above].

    # for pid in `ps -eaf | fgrep httpd | cut -d' ' -f4`
      truss -f -l -t\!all -S SIGSEGV -p $pid 2>&1 | egrep SIGSEGV &

The undocumented '-S' flag to truss will halt the process in place upon
receipt of a given signal
(SIGSEGV in this case). At this point you can use:

    # gcore PID

and then look at the backtrace as discussed above for gdb.

Dirk-Willem van Gulik wrote:

> On Thu, 2 Dec 1999, Sam Talebbeik wrote:
> > You will fine some very good debugging tips at Apache's
> > own developer web site. Try the following link:
> >
> >
> But not the setuid() and coreadm information which actually solved the
> problem. I've commet an updated version to cvs.
> DW.

View raw message