Mod_wsgi + Python 2.7.3 Segmentation Error (11)

I compiled Python 2.7.3 + mod_wsgi 3.4 on RHEL5.

Running my scripts, I saw that sometimes they work, but most of the time I see a blank page. I checked the error log and I saw this:

[Tue Dec 04 11:37:40 2012] [notice] child pid 21822 exit signal Segmentation fault (11) 

I used gdb for the Apache CoreDump file to track the error, and I see this:

 Loaded symbols for /usr/local/lib/python2.7/lib-dynload/_ctypes.so Core was generated by `/usr/sbin/httpd'. Program terminated with signal 11, Segmentation fault. #0 0x00002ab6a98b3c32 in CThunkObject_dealloc (_self=<value optimized out>) at /backup/moving/python/Python-2.7.3/Modules/_ctypes/callbacks.c:24 24 Py_XDECREF(self->restype); 

My mod_wsgi.so files are associated with these libraries:

  ldd /usr/lib64/httpd/modules/mod_wsgi.so libpython2.7.so.1.0 => /usr/local/lib/libpython2.7.so.1.0 (0x00002b7051fb8000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b7052385000) libdl.so.2 => /lib64/libdl.so.2 (0x00002b70525a0000) libutil.so.1 => /lib64/libutil.so.1 (0x00002b70527a5000) libm.so.6 => /lib64/libm.so.6 (0x00002b70529a8000) libc.so.6 => /lib64/libc.so.6 (0x00002b7052c2b000) /lib64/ld-linux-x86-64.so.2 (0x0000003191400000) 

This error does not occur at any time, but randomly. Do you have any tips on how to fix this?

+4
source share

All Articles