Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I went through the troubleshooting of mod_wsgi but cannot find an answer for my case of segmentation fault. I get the following coredump when the module mod_wsgi is integrated in my Apache httpd server. The server without mod_wsgi works well.

  • Apache httpd: 2.2.22
  • mod_wsgi: 3.3
  • Python: 2.6.7

Any idea what causes the coredump? Is there a thing or a work-around I could try?

The core dump:

Program terminated with signal 11, Segmentation fault.
#0  0x00007fe06c39d206 in wsgi_python_init () from /remote/projects1/pdrtke/install/httpd-2.2.22/modules/
#1  0x00007fe06c3aadb5 in wsgi_hook_child_init () from /remote/projects1/pdrtke/install/httpd-2.2.22/modules/
#2  0x00000000004424db in ap_run_child_init ()
#3  0x000000000047ea35 in child_main ()
#4  0x000000000047ef26 in make_child ()
#5  0x000000000047f198 in perform_idle_server_maintenance ()
#6  0x000000000047f67b in ap_mpm_run ()
#7  0x0000000000429361 in main ()

The httpd binary, compiled from source. (I ran configure --prefix=..., that's all)

> file httpd                                                                                                                                                                                
    httpd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), not stripped
> ldd httpd =>  (0x00007fffdc5ff000) => /lib64/ (0x00007f33ef7fe000) => /remote/projects1/pdrtke/install/httpd-2.2.22/lib/ (0x00007f33ef5d4000) => /lib64/ (0x00007f33ef3aa000) => /remote/projects1/pdrtke/install/httpd-2.2.22/lib/ (0x00007f33ef172000) => /lib64/ (0x00007f33eef69000) => /lib64/ (0x00007f33eed2e000) => /lib64/ (0x00007f33eeb11000) => /lib64/ (0x00007f33ee90d000) => /lib64/ (0x00007f33ee5af000)
    /lib64/ (0x00007f33efa54000)

The module WSGI:

> file   ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
> ldd =>  (0x00007fffb8f0e000) => /usr/lib64/ (0x00007f4c6dd87000) => /lib64/ (0x00007f4c6db69000) => /lib64/ (0x00007f4c6d965000) => /lib64/ (0x00007f4c6d762000) => /lib64/ (0x00007f4c6d50b000) => /lib64/ (0x00007f4c6d1ad000)
    /lib64/ (0x00007f4c6e37b000)

The Python executable:

> file python
    python: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), not stripped
> ldd python =>  (0x00007fff6a1ff000) => /softntools/opt/Python-2.6/bin/../lib/ (0x00007f14730fc000) => /lib64/ (0x00007f1472edf000) => /lib64/ (0x00007f1472cdb000) => /lib64/ (0x00007f1472ad8000) => /lib64/ (0x00007f1472882000) => /lib64/ (0x00007f1472524000)
    /lib64/ (0x00007f14733b0000)
share|improve this question
up vote 1 down vote accepted

In fact, we found the issue, it was a dependency issue: used a specific version of

ldd => /usr/lib64/ (0x00007f4c6dd87000)

vs. a different used by the python binary itself.

> ldd python => /softntools/opt/Python-2.6/bin/../lib/ (0x00007f14730fc000)

Even though these were the same files names, these files didn't have the same size

> ls -l /softntools/opt/Python-2.6/bin/../lib/

gave 3710590 bytes

> ls -l /usr/lib64/                                                                                                                                                         3:33PM
    -rw-r--r-- 1 root root 1594904 May  5  2010 /usr/lib64/

What I did to solve the issue was to recompile mod_wsgi by changing the LD_RUN_PATH variable to point to /softntools/opt/Python-2.6/lib/ and now it works.

share|improve this answer

Rebuild everything with debugging symbols and get a better backtrace. There's obviously a bug somewhere, but without a proper backtrace you don't really have a hope of finding it, or even getting someone else to fix it for you (unless you really luck out and someone who has recently had the exact same problem happens to be available to answer).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.