[mod_python] exit signal Segmentation fault (11)

John Maurer, IV jmaurer at hawaii.edu
Wed Jan 26 20:56:01 EST 2011

Hi All,
I installed mod_python 3.3.1 today but cannot get the simple "Hello world!" test to work listed in the manual: http://www.modpython.org/live/mod_python-3.3.1/doc-html/inst-testing.html. When I restarted Apache after the installation, here is the line form Apache's error_log so you can see what version of things I am running:

[Wed Jan 26 15:32:24 2011] [notice] Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8b PHP/5.2.6 mod_python/3.3.1 Python/2.7 configured -- resuming normal operations

Each time I access the test url from my web server, I get a blank page and Apache's error_log gives another line like the following:

[Wed Jan 26 15:32:33 2011] [notice] child pid 30058 exit signal Segmentation fault (11)

Subsequent access to the test page will give a similar line but with a different pid; e.g.:

[Wed Jan 26 15:32:33 2011] [notice] child pid 30061 exit signal Segmentation fault (11)

As per the manual test case, I have the following in my httpd.conf:

LoadModule python_module /usr/local/apache/modules/mod_python.so
PythonOption mod_python.mutex_locks 32

<Directory /usr/local/apache/htdocs/test>
    AddHandler mod_python .py
    PythonHandler mptest
    PythonDebug On

And /usr/local/apache/htdocs/test/mptest.py contains the following:

from mod_python import apache

def handler(req):
    req.content_type = 'text/plain'
    req.write("Hello World!")
    return apache.OK

A simple text file in the same directory can be accessed just fine, so there are not permissions problems.

My Python 2.7 was not configured with any options. I can import mod_python successfully in an interactive session and run mod_python.version to get back '3.3.1'.

I also tried a few older mod_python versions to see if that would solve the problem, but all give the same error message in the Apache error_log when I access my test page: mod_python 3.3.0b, 3.2.10, and 3.2.8.

Any ideas what's causing this problem? Hoping to get mod_python up and running but this hang up has me baffled.
John Maurer

P.S. My 64-bit OS info:
>> cat /proc/version
Linux version 2.6.18-92.1.22.el5 (mockbuild at builder10.centos.org) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)) #1 SMP Tue Dec 16 11:57:43 EST 2008

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20110126/f92f8c2e/attachment.html

More information about the Mod_python mailing list