Copterfly / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

Python 3000 Segmentation Fault in PyDict_SetItem #119

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Apache/2.2.9 (Ubuntu)
2. Mod_wsgi from the svn trunk (for python 3.0 support)
3. Python 3.0rc1+
4. Simple wsgi 'hello world' app

What is the expected output? What do you see instead?

Expected output is a simple "hello world" message using the template
provided under the quick configuration guide of this project.  Using Python
3.0, apache receives a segmentation violation in PyDict_SetItem.  This only
occurs in Python3.0, if svn trunk src is recompiled against python2.5 then
wsgi app works.

What version of the product are you using? On what operating system?

mod_wsgi svn truck on 32bit Ubuntu with 2.2.9 apache with worker mpm

Please provide any additional information below.

Here is the stack trace taken with gdb using run -X when the url for the
wsgi app is called:

0xb72f516b in PyDict_SetItem () from /usr/lib/libpython3.0.so.1.0
(gdb) where
#0  0xb72f516b in PyDict_SetItem () from /usr/lib/libpython3.0.so.1.0
#1  0xb72f53de in PyDict_SetItemString () from /usr/lib/libpython3.0.so.1.0
#2  0xb7375f52 in PySys_SetObject () from /usr/lib/libpython3.0.so.1.0
#3  0xb7417016 in newInterpreterObject ()
   from /usr/lib/apache2/modules/mod_wsgi.so
#4  0xb74191a4 in wsgi_acquire_interpreter ()
   from /usr/lib/apache2/modules/mod_wsgi.so
#5  0xb7419ae3 in wsgi_execute_script ()
   from /usr/lib/apache2/modules/mod_wsgi.so
#6  0xb741df7f in wsgi_hook_handler ()
   from /usr/lib/apache2/modules/mod_wsgi.so
#7  0xb7f44a7d in ap_run_handler () from /usr/sbin/apache2
#8  0xb7f4869f in ap_invoke_handler () from /usr/sbin/apache2
#9  0xb7f57751 in ap_process_request () from /usr/sbin/apache2
#10 0xb7f54368 in ?? () from /usr/sbin/apache2
#11 0xb7f4ce6d in ap_run_process_connection () from /usr/sbin/apache2
#12 0xb7f5dcf4 in ?? () from /usr/sbin/apache2
#13 0xb7e938b8 in ?? () from /usr/lib/libapr-1.so.0
#14 0xb7e5d50f in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#15 0xb7dda7ee in clone () from /lib/tls/i686/cmov/libc.so.6

I don't know if its related, but when I build mod_wsgi against python 3.0 I
get the following gcc warning:

mod_wsgi.c: In function 'wsgi_python_version':
mod_wsgi.c:4744: warning: format '%s' expects type 'char *', but argument 7
has type 'wchar_t *'

I do not get this warning when I build again python 2.5. The Py_GetPath
appears to have changed its return type in Python 3 to support unicode.  

Original issue reported on code.google.com by LinuxGu...@gmail.com on 19 Dec 2008 at 1:47

GoogleCodeExporter commented 9 years ago
You cannot use Python 3.0rc1 as it is broken. Use the Python 3.0 final, ie., 
the real 3.0 release.

As per:

  http://code.google.com/p/modwsgi/issues/detail?id=70

problem in that pre release version of Python 3.0 is:

    http://bugs.python.org/issue3723

The Py_GetPath is an issue, but it relates to debug messages that would only 
get triggered in an uncommon 
situation. Not the cause of the problem you are seeing.

Original comment by Graham.Dumpleton@gmail.com on 19 Dec 2008 at 8:14