Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.

Bug 242952

Summary: mod_python causes segmentation fault in Apache httpd
Product: [Fedora] Fedora Reporter: Piotrek Marciniak <marpiotr>
Component: httpdAssignee: Joe Orton <jorton>
Severity: high Docs Contact:
Priority: low    
Version: rawhideCC: jik, j_planow
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-09-02 15:32:56 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
Log from gdb none

Description Piotrek Marciniak 2007-06-06 12:43:15 EDT
Description of problem:
I tried to run httpd after a long time of not using it, and it terminated while
starting showing message about segmantation fault. When i run http under gdb it
shown an exception from mod_python. And, when i disabled mod_python loading,
httpd started just fine.

Version-Release number of selected component (if applicable):

(just in case)

How reproducible:

Steps to Reproduce:
1. Run httpd (/usr/sbin/httpd)
Actual results:
It terminates just after it was run and shows a message abotu segmentation fault.

Expected results:
errorless start of httpd

Additional info:

I attached log from gdb
Comment 1 Piotrek Marciniak 2007-06-06 12:43:15 EDT
Created attachment 156369 [details]
Log from gdb
Comment 2 Piotrek Marciniak 2007-06-06 12:49:10 EDT
Comment on attachment 156369 [details]
Log from gdb

These lines:

---Type <return> to continue, or q <return> to quit---Error while reading
shared library symbols:

are because i accidentally preseed Ctrl C
Comment 4 Joe Orton 2007-07-26 11:02:45 EDT
There's nothing useful in there.  It's better to do:

# echo CoreDumpDirectory /tmp > /etc/httpd/conf.d/core.conf

and generate a core dump, then analyse that after-the-fact with gdb.

Make sure you have up-to-date httpd, python, httpd-debuginfo, python-debuginfo
etc packages before running gdb.

Comment 5 Jonathan Kamens 2007-09-02 14:49:27 EDT
I am having this problem with httpd-2.2.4-9 and mod_python-3.3.1-4 from devel. 
When run under the debugger, I find that the coredump is occurring at line 1549
of mod_python.c, in python_handler

1549        conf = (py_config *) ap_get_module_config(req->per_dir_config, 

req->per_dir_config is null at this point.  I put breakpoints in python_handler
and python_create_dir_config, and I found that for some requests python_handler
is being called when python_create_dir_config hasn't been called.  I don't
understand the Apache ABI / module mechanism well enough to know whether
python_create_dir_config is always supposed to be called (in which case Apache
is doing something wrong?) or sometimes isn't called (in which case mod_python
is doing something wrong?).
Comment 6 Jonathan Kamens 2007-09-02 14:51:57 EDT
I should mention that the request that causes the segfault is one that doesn't
actually need python for processing.
Comment 7 Jonathan Kamens 2007-09-02 14:56:41 EDT
Changing component from mod_python to httpd.  When I disable mod_python from
loading, I get a crash in the same call (ap_get_module_config) inside mod_suphp.
 This suggests that httpd, rather than mod_python or mod_suphp, is at fault.  Or
perhaps mod_python and mod_suphp need to be rebuilt against current httpd-devel?
Comment 8 Jonathan Kamens 2007-09-02 15:07:31 EDT
Yes, rebuilding mod_python and mod_suphp solved the problem.  Does that mean
there should be separte mod_python and mod_suphp tickets for this, rather than a
single httpd ticket?  Not sure how the bookkeeping should be handled...
Comment 9 Joe Orton 2007-09-02 15:32:56 EDT

*** This bug has been marked as a duplicate of 254241 ***