[MacPorts] #22518: Apache2 / mod_wsgi / python 2.6 crash

MacPorts noreply at macports.org
Fri Nov 13 09:43:03 PST 2009


#22518: Apache2 / mod_wsgi / python 2.6 crash
-------------------------------+--------------------------------------------
 Reporter:  nerdrew@…          |       Owner:  macports-tickets@…                   
     Type:  defect             |      Status:  new                                  
 Priority:  Normal             |   Milestone:                                       
Component:  ports              |     Version:  1.8.1                                
 Keywords:                     |        Port:                                       
-------------------------------+--------------------------------------------
 The following mod_wsgi script fails with the MacPorts Apache but works
 with the Apple version of Apache.

 The script:
 {{{
 import Carbon.File

 def application(environ, start_response):
     status = '200 OK'
     output = "hello world"

     response_headers = [('Content-type', 'text/plain'),
                         ('Content-Length', str(len(output)))]
     start_response(status, response_headers)

     return [output]
 }}}

 I have tested it with the Apple supplied Python 2.6 and the MacPorts
 Python 2.6, which makes me think the problem is somehow related to the
 MacPorts version of Apache.

 The Apache error log has useless info. The error is:
 {{{
 [info] [client ::1] mod_wsgi (pid=52370, process='test', application=''):
 Loading WSGI script '/opt/local/apache2/htdocs/test/test.wsgi'.
 [error] [client ::1] Premature end of script headers: test.wsgi
 [notice] child pid 52370 exit signal Trace/BPT trap (5)
 [info] mod_wsgi (pid=52370): Process 'test' has died, restarting.
 }}}

-- 
Ticket URL: <http://trac.macports.org/ticket/22518>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list