I'm trying to run trac with mod_wsgi. I can run trac as a CGI script, but when I try to run it as a WSGI app, I get a SEGV: [Mon Jun 21 11:42:36 2010] [error] [client 10.17.8.76] Premature end of script headers: trac.wsgi [Mon Jun 21 11:42:36 2010] [notice] child pid 1854 exit signal Segmentation fault (11)
Using the very helpful http://code.google.com/p/modwsgi/wiki/DebuggingTechniques , I narrowed it down to: from trac.web.main import dispatch_request that line, added to a hello-world.cgi, produces the end-of-script/SEGV. I'm puzzled because I got hgwebdir running under mod_wsgi just fine a la http://mercurial.selenic.com/wiki/modwsgi I suspected an .egg-cache permissions issue, but running as CGI relies on the same permissions, so I don't think that's the cause. Details of my setup: 1. Which version of mod_wsgi you are using and if using a packaged distribution, who provided the distribution. I installed mod_wsgi from source: http://modwsgi.googlecode.com/files/mod_wsgi-3.2.tar.gz 2. Which version of Python you are using and if using a packaged distribution, who provided the distribution. python 2.6 from SuSE 3. Which version of Apache you are using and if using a packaged distribution, who provided the distribution. apache 2.2 from source 4. What operating system you are using. SUSE Linux Enterprise Server 11 (x86_64) 5. Details on any third party packages being used and what versions of those packages. trac from source: Trac-0.12.tar.gz 6. The mod_wsgi configuration you are using from Apache configuration files. mod-wsgi.con and trac.conf are attached. (for my reference: e3ebf751fd82 2010-06-21 10:57 -0600) wsgi-env.txt is the output of the script from http://code.google.com/p/modwsgi/wiki/DebuggingTechniques plus sys.path I'm not certain which MPM apache has been compiled for; how do I check? 7. Relevant error messages from the Apache error logs. This is a complete log from starting apache to the problem to when apache is quiescent again: [Mon Jun 21 11:42:15 2010] [notice] Apache/2.2.15 (Unix) PHP/5.2.13 mod_jk/1.2.28 mod_wsgi/3.2 Python/2.6 configured -- resuming normal operations [Mon Jun 21 11:42:15 2010] [info] Server built: Apr 7 2010 13:23:50 [Mon Jun 21 11:42:15 2010] [info] mod_wsgi (pid=1880): Initializing Python. [Mon Jun 21 11:42:15 2010] [info] mod_wsgi (pid=1880): Attach interpreter ''. [Mon Jun 21 11:42:35 2010] [info] [client 10.17.8.76] mod_wsgi (pid=1854, process='bioinformatics.kumc.edu', application=''): Loading WSGI script '/usr/local/apache2/trac-share/cgi-bin/trac.wsgi'. [Mon Jun 21 11:42:36 2010] [error] [client 10.17.8.76] Premature end of script headers: trac.wsgi [Mon Jun 21 11:42:36 2010] [notice] child pid 1854 exit signal Segmentation fault (11) [Mon Jun 21 11:42:36 2010] [info] mod_wsgi (pid=1854): Process 'bioinformatics.kumc.edu' has died, restarting. [Mon Jun 21 11:42:36 2010] [info] mod_wsgi (pid=1885): Starting process 'bioinformatics.kumc.edu' with uid=2, gid=2 and threads=1. [Mon Jun 21 11:42:36 2010] [info] mod_wsgi (pid=1885): Initializing Python. [Mon Jun 21 11:42:36 2010] [info] mod_wsgi (pid=1885): Attach interpreter ''. -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
PID: 2529 UID: 2 GID: 2 DOCUMENT_ROOT: '/usr/local/apache2/htdocs' GATEWAY_INTERFACE: 'CGI/1.1' HTTP_ACCEPT: 'application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5' HTTP_ACCEPT_CHARSET: 'UTF-8,*;q=0.5' HTTP_ACCEPT_ENCODING: 'gzip,deflate,sdch' HTTP_ACCEPT_LANGUAGE: 'en-US,en;q=0.8' HTTP_CONNECTION: 'keep-alive' HTTP_HOST: 'bmidev1' HTTP_USER_AGENT: 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4' PATH_INFO: '' QUERY_STRING: '' REMOTE_ADDR: '10.17.8.76' REMOTE_PORT: '3603' REQUEST_METHOD: 'GET' REQUEST_URI: '/trac-debug' SCRIPT_FILENAME: '/usr/local/apache2/trac-share/cgi-bin/wsgi-debug.wsgi' SCRIPT_NAME: '/trac-debug' SERVER_ADDR: '10.22.4.34' SERVER_ADMIN: '[email protected]' SERVER_NAME: 'bmidev1' SERVER_PORT: '80' SERVER_PROTOCOL: 'HTTP/1.1' SERVER_SIGNATURE: '' SERVER_SOFTWARE: 'Apache/2.2.15 (Unix) PHP/5.2.13 mod_jk/1.2.28 mod_wsgi/3.2 Python/2.6' mod_wsgi.application_group: '' mod_wsgi.callable_object: 'application' mod_wsgi.handler_script: '' mod_wsgi.input_chunked: '0' mod_wsgi.listener_host: '' mod_wsgi.listener_port: '80' mod_wsgi.process_group: 'bioinformatics.kumc.edu' mod_wsgi.request_handler: 'wsgi-script' mod_wsgi.script_reloading: '1' mod_wsgi.version: (3, 2) wsgi.errors: <mod_wsgi.Log object at 0xb182b0> wsgi.file_wrapper: <built-in method file_wrapper of mod_wsgi.Adapter object at 0xab9af8> wsgi.input: <mod_wsgi.Input object at 0xb18270> wsgi.multiprocess: True wsgi.multithread: False wsgi.run_once: False wsgi.url_scheme: 'http' wsgi.version: (1, 1) ['/usr/local/lib64/python2.6/site-packages/Trac-0.12-py2.6.egg', '/usr/local/lib64/python2.6/site-packages/Genshi-0.6-py2.6.egg', '/usr/lib64/python2.6/site-packages', '/usr/lib/python26.zip', '/usr/lib64/python2.6', '/usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old', '/usr/lib64/python2.6/lib-dynload', '/usr/lib64/python2.6/site-packages', '/usr/lib64/python2.6/site-packages/Numeric', '/usr/local/lib64/python2.6/site-packages', '/usr/lib64/python2.6/site-packages/gtk-2.0']
mod-wsgi.conf
Description: Binary data
trac.conf
Description: Binary data
