[mod_python] Segfaults when running mod_python and mod_php4/mod_php5

Graham Dumpleton grahamd at dscpl.com.au
Tue Dec 13 04:54:40 EST 2005

On 13/12/2005, at 7:56 PM, Daniel S. Reichenbach wrote:

> Hi again,
> I have been trying to find the reason why and where mod_python 
> segfaults
> on my
> system for a while now.
> Following the hints in the FAQ I have checked if mod_python, python and
> PHP had
> been built against different versions of libraries and as this is the
> case in
> Debian testing, I have switched to Debian unstable, where PHP and
> mod_python
> are both seem to be linked against the same library versions.
> Still, the issue did not change. Whenever I call any Authentication 
> like
> basic
> auth using .htaccess files on a mod_python enabled server, it will
> result in
> a segfault with a message like
> child pid ... exit signal Segmentation fault (11)
> in the error logs.
> I have tried building the whole dependency tree manual from sources to
> make
> extra sure that there are no mixed dependencies,  and tried mod_python
> 3.1.4
> as well as 3.2.5b. As well I tried to use PHP5 instead of PHP4 but 
> still
> the
> segfaults stay the same. Following a hint from Julien Cigar I as well
> tried
> disabling mod_ssl, but this did not have any impact. Still segfaults.
> Setting LogLevel to debug did not reveal any additional information
> where the
> crash occurs, so I am pretty stuck here. I tried using the PythonDebug
> directive as well as any other debug output related configuration
> directive I
> could find
> Can anyone give me a hint, what I can try next to figure where and why
> the
> crash occurs? Should I cary over this to the development list?

Shutdown Apache:

   apachectl stop

Run Apache in single process mode:

   /usr/local/apache-2.0/bin/httpd -DONE_PROCESS

In another window run "ps" to find the process IDs of the Apache
process. There may be two.

   ps x | grep httpd

   377  p1  S+     0:00.87 ./httpd -DONE_PROCESS
   382  p1  S+     0:00.02 ./httpd -DONE_PROCESS

Use "gdb" to attach to the lowest parent process ID:

   gdb /usr/local/apache-2.0/bin/httpd -p 377

Expect it to stop Apache at sigwait():

   0x949d7fac in sigwait ()

Enter command "cont":

   (gdb) cont

Now use a web browser to access the URL which gives you the problem.

If everything goes as expected, Apache will crash and gdb will throw you
back to its prompt. Enter "where" command to get stack trace of where it

Post stack trace here.


More information about the Mod_python mailing list