[uWSGI] uWSGI + Python 3.3 segfaults

Jon Chappell jon at jchome.us
Mon Oct 21 19:12:06 CEST 2013


Hi Roberto,

I apologize for the delay in responding here, but unfortunately, uWSGI
1.9.18.2 continues to segfault with the Python 3 auto-reloader enabled.  If
we turn it off, things work just fine, with the obvious caveat being that
we have to manually do a reload when code changes, which is quite painful
in a dev environment situation.  Here's a paste of some examples from the
log.

Python auto-reloader enabled
!!! uWSGI process 21130 got Segmentation Fault !!!
*** backtrace of 21130 ***
/usr/bin/uwsgi(uwsgi_backtrace+0x29) [0x4554c9]
/usr/bin/uwsgi(uwsgi_segfault+0x21) [0x455651]
/lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7fe9b3b5d4a0]
/usr/lib/libpython3.3m.so.1.0(PyUnicode_InternInPlace+0x78) [0x7fe9b341fd28]
/usr/lib/libpython3.3m.so.1.0(PyUnicode_InternFromString+0x22)
[0x7fe9b341fed2]
/usr/lib/libpython3.3m.so.1.0(PyObject_GetAttrString+0x38) [0x7fe9b33dd1d8]
/usr/lib/libpython3.3m.so.1.0(PyObject_HasAttrString+0x6) [0x7fe9b33dd236]
/usr/lib/uwsgi//python33_plugin.so(uwsgi_python_autoreloader_thread+0x10d)
[0x7fe9b390cefd]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a) [0x7fe9b50a4e9a]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7fe9b3c1accd]
*** end of backtrace ***
DAMN ! worker 1 (pid: 21130) died :( trying respawn ...
Respawned uWSGI worker 1 (new pid: 21136)
Python auto-reloader enabled
[pid: 21136|app: 0|req: 2/1] 10.0.2.2 () {46 vars in 784 bytes} [Mon Oct 21
16:55:19 2013] GET /sources/ => generated 10256 bytes in 506 msecs
(HTTP/1.1 200) 5 headers in 265 bytes (1 switches on core 0)
announcing my loyalty to the Emperor...
/usr/lib/python3.3/http/client.py:1172: DeprecationWarning: the 'strict'
argument isn't supported anymore; http.client now always assumes HTTP/1.x
compliant servers.
  source_address)

!!! uWSGI process 21136 got Segmentation Fault !!!
*** backtrace of 21136 ***
/usr/bin/uwsgi(uwsgi_backtrace+0x29) [0x4554c9]
/usr/bin/uwsgi(uwsgi_segfault+0x21) [0x455651]
/lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7fe9b3b5d4a0]
/usr/lib/libpython3.3m.so.1.0(PyUnicode_InternInPlace+0x78) [0x7fe9b341fd28]
/usr/lib/libpython3.3m.so.1.0(PyUnicode_InternFromString+0x22)
[0x7fe9b341fed2]
/usr/lib/libpython3.3m.so.1.0(PyObject_GetAttrString+0x38) [0x7fe9b33dd1d8]
/usr/lib/libpython3.3m.so.1.0(PyObject_HasAttrString+0x6) [0x7fe9b33dd236]
/usr/lib/uwsgi//python33_plugin.so(uwsgi_python_autoreloader_thread+0x10d)
[0x7fe9b390cefd]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a) [0x7fe9b50a4e9a]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7fe9b3c1accd]
*** end of backtrace ***
DAMN ! worker 1 (pid: 21136) died :( trying respawn ...
Respawned uWSGI worker 1 (new pid: 21148)
Python auto-reloader enabled




Is there any additional information I could provide that might help to
track this down?

Thanks!


On Sat, Oct 12, 2013 at 2:09 AM, Roberto De Ioris <roberto at unbit.it> wrote:

>
> > As best I can tell, the "Error opening file for reading: Permission
> > denied” is related to this Ubuntu 12.04 package issue:
> > https://bugs.launchpad.net/ubuntu/+source/libjpeg-turbo/+bug/1031718,
> but
> > it didn’t look on the surface like it would be the cause of the crash.
> (to
> > me, at least)  Indeed, a successful request looks like this:
> > *** Stats server enabled on :1717 fd: 13 ***
> > Error opening file for reading: Permission denied
> > [pid: 3729|app: 0|req: 1/1] 10.0.2.2 () {44 vars in 729 bytes} [Fri Oct
> 11
> > 19:59:43 2013] GET / => generated 5743 bytes in 555 msecs (HTTP/1.1 200)
> 5
> > headers in 259 bytes (2 switches on core 0)
> >
> > And now that I’ve taken a break, come back, and tried this again, I can’t
> > seem to duplicate the segfaulting with or without the python reloader
> > enabled.  I blame gremlins, lack of coffee, or both.
> >
> > Thanks!
> >
> > -
>
> I have added an additional check in the python reloader, maybe it is what
> was causing your crash.
>
> Can you retry with latest code from github ?
>
> --
> Roberto De Ioris
> http://unbit.it
> _______________________________________________
> uWSGI mailing list
> uWSGI at lists.unbit.it
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>



-- 
*

Jon Chappell*
jon at jchome.us
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.unbit.it/pipermail/uwsgi/attachments/20131021/b2c5342b/attachment.html>


More information about the uWSGI mailing list