What did you do just prior to the weekend that changed anything?

Did you upgrade the Python installation you are dependent on, but not recreate 
the Python virtual environment against the updated Python installation?

Did you apply any update to the Apache version being used?

Did you change the Apache configuration to load any additional Apache modules?

Did you change the Apache configuration for any modules you were already using?

How many Python installations exist on the system and where are they installed?

What Python installation is your Python virtual environment based off?

What Python installation was mod_wsgi compiled against?

Is the mod_wsgi.so finding the correct Python shared library for the Python 
installation you expect it to use?

http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Python_Shared_Library

Are you using mod_wsgi daemon mode?

Is Apache segfaulting on startup in all child processes, or only for mod_wsgi 
daemon mode processes?

Is the segfault truly on startup, or only on the first request against a 
process?

Sorry for all the questions, but there isn't a lot to go on at this point.

The point of these questions is to prompt you to validate certain things about 
your installation and ensure they are correct, but responses to them will also 
help me to understand your setup and so be able to work out what the issue may 
be.

Graham

On 13/07/2014, at 9:47 AM, Allen Lee <[email protected]> wrote:

> (also crossposted to https://bugs.launchpad.net/ius/+bug/1341325 but wasn't 
> sure where the appropriate place for this is) 
> 
> I've been running python27-mod_wsgi 4.2.4 with python27 from the IUS 
> repositories alongside apache 2.2.3 on RHEL 5 to host a Django app running 
> within a virtualenv. I haven't had any problems until this weekend when 
> Apache has started to segfault constantly when trying to load the python 
> interpreter - messages like (child pid 12574 exit signal Segmentation fault 
> (11)).
> 
> I've read through 
> https://code.google.com/p/modwsgi/wiki/FrequentlyAskedQuestions#Apache_Process_Crashes
>  and can confirm that:
> 
> 1/ mod_python is not installed, and 
> 
> 2/ httpd is loaded with expat 1.95.8 and my virtualenv python is running 
> 2.0.1 but I didn't encounter a segfault when running:
> 
> (in-virtualenv) % LD_PRELOAD=/lib64/libexpat.so.0 python
> Python 2.7.7 (default, Jun 4 2014, 17:09:35)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pyexpat
> >>> pyexpat.version_info
> (1, 95, 8)
> >>>
> 
> I dumped the core and extracted the following from gdb but am at a loss at 
> this point, any additional pointers to try to identify the source of the 
> problem would be much appreciated! 
> 
> Results of gdb /usr/sbin/httpd /path/to/core.dump:
> <snipped>
> warning: no loadable sections found in added symbol-file system-supplied DSO 
> at 0x7fff1dffd000
> Core was generated by `/usr/sbin/httpd'.
> Program terminated with signal 11, Segmentation fault.
> #0 0x00002aed3f67ef40 in strlen () from /lib64/libc.so.6
> (gdb) where
> #0 0x00002aed3f67ef40 in strlen () from /lib64/libc.so.6
> #1 0x00002aed4a24e43b in PyString_FromString () from 
> /usr/lib64/libpython2.7.so.1.0
> #2 0x00002aed49f8124b in ?? ()
> #3 0x00002aed00005168 in ?? ()
> #4 0x00002aed49f97190 in ?? ()
> #5 0x00002aed4a552e00 in ?? () from /usr/lib64/libpython2.7.so.1.0
> #6 0x00000000ffffffff in ?? ()
> #7 0x00002aed49f97190 in ?? ()
> #8 0x00002aed3d826cf0 in ?? ()
> #9 0x00002aed4a1a0b98 in ?? ()
> #10 0x0000000000000001 in ?? ()
> #11 0x00002aed3d826cf0 in ?? ()
> #12 0x0000000000000000 in ?? ()
> (gdb)
> 
> # httpd -V
> Server version: Apache/2.2.3
> Server built: Mar 26 2014 08:47:55
> Server's Module Magic Number: 20051115:3
> Server loaded: APR 1.5.0, APR-Util 1.5.3
> Compiled using: APR 1.2.7, APR-Util 1.2.7
> Architecture: 64-bit
> Server MPM: Prefork
> threaded: no
> forked: yes (variable process count)
> Server compiled with....
> -D APACHE_MPM_DIR="server/mpm/prefork"
> -D APR_HAS_SENDFILE
> -D APR_HAS_MMAP
> -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
> -D APR_USE_SYSVSEM_SERIALIZE
> -D APR_USE_PTHREAD_SERIALIZE
> -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
> -D APR_HAS_OTHER_CHILD
> -D AP_HAVE_RELIABLE_PIPED_LOGS
> -D DYNAMIC_MODULE_LIMIT=128
> -D HTTPD_ROOT="/etc/httpd"
> -D SUEXEC_BIN="/usr/sbin/suexec"
> -D DEFAULT_PIDLOG="run/httpd.pid"
> -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
> -D DEFAULT_LOCKFILE="logs/accept.lock"
> -D DEFAULT_ERRORLOG="logs/error_log"
> -D AP_TYPES_CONFIG_FILE="conf/mime.types"
> -D SERVER_CONFIG_FILE="conf/httpd.conf"
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to