[uWSGI] uWSGI + Python 3.3 segfaults

Roberto De Ioris roberto at unbit.it
Fri Oct 11 21:52:20 CEST 2013


> Good afternoon,
>
> We’re running a Django app on Ubuntu 12.04 and Python 3.3 via nginx and
> uWSGI (tried 1.9.16 and 1.9.17) and are experiencing segmentation faults
> when the first several requests come in, and unfortunately, I’m not seeing
> much that would help with determining the cause.  After the first several
> requests, it appears to process things normally.  I’m compiling uWSGI and
> the Python 3.3 plugin from source, and using the emperor to manage things.
>  Any thoughts or ideas?
>
> The config is:
>
> [uwsgi]
>
> virtualenv = /var/virtualenvs/app/
> gid = fm
> uid = uwsgi
> pidfile = /tmp/app-master.pid
> logto = /var/log/uwsgi/app.log
> log-backupname = app-old.log
> log-maxsize = 10485760
> harakiri-verbose = False
> chmod-socket = 660
> socket = /tmp/app.sock
> max-requests = 5000
> post-buffering = 4096
> buffer-size = 32768
> processes = 1
> stats = :1717
> chdir = /var/app
> master = True
> module = app.wsgi:application
> py-autoreload = 1
> plugin = python33
>
>
> The error from the log:
>
> !!! uWSGI process 3339 got Segmentation Fault !!!
> *** backtrace of 3339 ***
> /usr/bin/uwsgi(uwsgi_backtrace+0x29) [0x453e99]
> /usr/bin/uwsgi(uwsgi_segfault+0x21) [0x454021]
> /lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7fc92f5454a0]
> /usr/lib/libpython3.3m.so.1.0(PyUnicode_InternInPlace+0x78)
> [0x7fc92ee08d28]
> /usr/lib/libpython3.3m.so.1.0(PyUnicode_InternFromString+0x22)
> [0x7fc92ee08ed2]
> /usr/lib/libpython3.3m.so.1.0(PyObject_GetAttrString+0x38)
> [0x7fc92edc61d8]
> /usr/lib/libpython3.3m.so.1.0(PyObject_HasAttrString+0x6) [0x7fc92edc6236]
> /usr/lib/uwsgi//python33_plugin.so(uwsgi_python_autoreloader_thread+0xf5)
> [0x7fc92f2f5c45]
> /lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a) [0x7fc930a8ce9a]
> /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7fc92f602ccd]
> *** end of backtrace ***
> DAMN ! worker 1 (pid: 3339) died :( trying respawn ...
> Respawned uWSGI worker 1 (new pid: 5182)
> Python auto-reloader enabled
> Error opening file for reading: Permission denied
> !!! uWSGI process 5182 got Segmentation Fault !!!
> *** backtrace of 5182 ***
> /usr/bin/uwsgi(uwsgi_backtrace+0x29) [0x453e99]
> /usr/bin/uwsgi(uwsgi_segfault+0x21) [0x454021]
> /lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7fc92f5454a0]
> /usr/lib/libpython3.3m.so.1.0(PyUnicode_InternInPlace+0x78)
> [0x7fc92ee08d28]
> /usr/lib/libpython3.3m.so.1.0(PyUnicode_InternFromString+0x22)
> [0x7fc92ee08ed2]
> /usr/lib/libpython3.3m.so.1.0(PyObject_GetAttrString+0x38)
> [0x7fc92edc61d8]
> /usr/lib/libpython3.3m.so.1.0(PyObject_HasAttrString+0x6) [0x7fc92edc6236]
> /usr/lib/uwsgi//python33_plugin.so(uwsgi_python_autoreloader_thread+0xf5)
> [0x7fc92f2f5c45]
> /lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a) [0x7fc930a8ce9a]
> /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7fc92f602ccd]
> *** end of backtrace ***
> DAMN ! worker 1 (pid: 5182) died :( trying respawn ...
> Respawned uWSGI worker 1 (new pid: 5652)
>

>From the backtrace it looks like a problem with the python autoreloader.

Does the crash disappear if you disable it ?

the "Error opening file for reading: Permission denied" is pretty
interesting and maybe it is the cause to the autoreloader crash

-- 
Roberto De Ioris
http://unbit.it


More information about the uWSGI mailing list