pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Apache children occasionally killed with SIGSEGV

Jukka Salmi wrote:
Greg Troxel --> pkgsrc-users (2009-02-19 08:25:28 -0500):
  Because I wanted to upgrade Apache to 2.2 anyway I didn't debug this
  further and built and installed www/apache22 and the needed modules;
  Apache 2.2 starts up and seems to run fine, but I still see those
  occasional segmentation faults:

  Is anybody seeing this as well?  Any hints?

Stop using PHP :-)

Sure I would if it was up to me... ;-)

More seriously, I have a system with mod_wsgi for python and
svn/authz/trac, and I see core dumps occasionally too.  I don't have any
real suggestions - I think there's just a lot of buggy code out there,
and in particular I suspect the following

  memory leaks

  NULL from malloc is widely mishandled

which lead to crashing after a while.

Not that I'd like to try fixing PHP or whatever causes the segfaults I'm
seeing, but I'd like to know for sure which module is causing them.  But
I don't manage to get core dumps even if I (termporarily...) change fs
permissions to allow the httpd user to write to / (which is his working
directory, according to fstat(1)).  Any hint what could be the problem

I'm inclined to agree that it's buggy code. I've been seeing them for ... years? ... but the regularity has decreased slowly with updates (netbsd+pkgsrc HEAD). I only have one since December last year, which is actually really good compared to 6 months ago.

I once was able to dump core successfully, so long as the directory was 777 and I had specified it in httpd.conf (CoreDumpDirectory).

It did seem to be tricky though because I fiddles for ages, endlessly poking at the processes with kill -11 ... so there may be more to it.

I use PHP predominantly ... and I believe in most cases the segfault occurred when someone closed the session during script activity. I could be wrong.


Home | Main Index | Thread Index | Old Index