[uWSGI] uWSGI + Python 3.3 segfaults

Jon Chappell jon at jchome.us
Mon Oct 21 20:52:26 CEST 2013


Sorry to reply to my own message as well:

Here’s an additional traceback.  This is one I’ve not seen before, so maybe it’s got something useful in it.

!!! uWSGI process 32262 got Segmentation Fault !!!
*** backtrace of 32262 ***
/usr/bin/uwsgi(uwsgi_backtrace+0x29) [0x455389]
/usr/bin/uwsgi(uwsgi_segfault+0x21) [0x455511]
/lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7fd51d2c64a0]
/usr/lib/libpython3.3m.so.1.0(PyObject_Malloc+0x1cc) [0x7fd51cb4809c]
/usr/lib/libpython3.3m.so.1.0(PyUnicode_New+0xaf) [0x7fd51cb643cf]
/usr/lib/libpython3.3m.so.1.0(_PyUnicode_FromASCII+0x2c) [0x7fd51cb6a40c]
/usr/lib/libpython3.3m.so.1.0(+0xdc563) [0x7fd51cb70563]
/usr/lib/libpython3.3m.so.1.0(+0xeff0d) [0x7fd51cb83f0d]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x6a6c) [0x7fd51cbb526c]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x764b) [0x7fd51cbb5e4b]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x764b) [0x7fd51cbb5e4b]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x839) [0x7fd51cbb6719]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x7530) [0x7fd51cbb5d30]
/usr/lib/libpython3.3m.so.1.0(+0x8f0e6) [0x7fd51cb230e6]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x2d48) [0x7fd51cbb1548]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x839) [0x7fd51cbb6719]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x7530) [0x7fd51cbb5d30]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x839) [0x7fd51cbb6719]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x7530) [0x7fd51cbb5d30]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x839) [0x7fd51cbb6719]
/usr/lib/libpython3.3m.so.1.0(+0x96285) [0x7fd51cb2a285]
/usr/lib/libpython3.3m.so.1.0(PyObject_Call+0x7e) [0x7fd51cb0265e]
/usr/lib/libpython3.3m.so.1.0(+0x82a64) [0x7fd51cb16a64]
/usr/lib/libpython3.3m.so.1.0(PyObject_Call+0x7e) [0x7fd51cb0265e]
/usr/lib/libpython3.3m.so.1.0(+0xc46ad) [0x7fd51cb586ad]
/usr/lib/libpython3.3m.so.1.0(PyObject_Call+0x7e) [0x7fd51cb0265e]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x5cf0) [0x7fd51cbb44f0]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x839) [0x7fd51cbb6719]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x7530) [0x7fd51cbb5d30]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x764b) [0x7fd51cbb5e4b]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x839) [0x7fd51cbb6719]
/usr/lib/libpython3.3m.so.1.0(+0x9638c) [0x7fd51cb2a38c]
/usr/lib/libpython3.3m.so.1.0(PyObject_Call+0x7e) [0x7fd51cb0265e]
/usr/lib/libpython3.3m.so.1.0(+0x82a64) [0x7fd51cb16a64]
/usr/lib/libpython3.3m.so.1.0(PyObject_Call+0x7e) [0x7fd51cb0265e]
/usr/lib/libpython3.3m.so.1.0(+0xc43af) [0x7fd51cb583af]
/usr/lib/libpython3.3m.so.1.0(+0xc3f3f) [0x7fd51cb57f3f]
/usr/lib/libpython3.3m.so.1.0(PyObject_Call+0x7e) [0x7fd51cb0265e]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x5cf0) [0x7fd51cbb44f0]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x764b) [0x7fd51cbb5e4b]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x839) [0x7fd51cbb6719]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x7530) [0x7fd51cbb5d30]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x764b) [0x7fd51cbb5e4b]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x839) [0x7fd51cbb6719]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x7530) [0x7fd51cbb5d30]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x764b) [0x7fd51cbb5e4b]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x839) [0x7fd51cbb6719]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x7530) [0x7fd51cbb5d30]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x764b) [0x7fd51cbb5e4b]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x839) [0x7fd51cbb6719]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x7530) [0x7fd51cbb5d30]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x764b) [0x7fd51cbb5e4b]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x839) [0x7fd51cbb6719]
/usr/lib/libpython3.3m.so.1.0(+0x96285) [0x7fd51cb2a285]
/usr/lib/libpython3.3m.so.1.0(PyObject_Call+0x7e) [0x7fd51cb0265e]
/usr/lib/libpython3.3m.so.1.0(+0x82a64) [0x7fd51cb16a64]
/usr/lib/libpython3.3m.so.1.0(PyObject_Call+0x7e) [0x7fd51cb0265e]
/usr/lib/libpython3.3m.so.1.0(+0xc43af) [0x7fd51cb583af]
/usr/lib/libpython3.3m.so.1.0(+0xc3f3f) [0x7fd51cb57f3f]
/usr/lib/libpython3.3m.so.1.0(PyObject_Call+0x7e) [0x7fd51cb0265e]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x5cf0) [0x7fd51cbb44f0]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x839) [0x7fd51cbb6719]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalFrameEx+0x7530) [0x7fd51cbb5d30]
/usr/lib/libpython3.3m.so.1.0(PyEval_EvalCodeEx+0x839) [0x7fd51cbb6719]
*** end of backtrace ***



Jon Chappell
jon at jchome.us

On October 21, 2013 at 2:47:42 PM, Jon Chappell (jon at jchome.us) wrote:

We’re using the Deadsnakes build of Python 3.3.2 for Ubuntu 12.04 (3.3.2-1+precise1 from https://launchpad.net/~fkrull/+archive/deadsnakes), and that bug is referencing the official Ubuntu 13.10 package.  I might be able to build it from source instead, but haven’t found any reason yet to believe it’s a bug related to the Python package itself.


We are using the following modules:

Django==1.6b4 
Markdown==2.3.1
PyYAML==3.10
South==0.8.2
amqp==1.2.1
anyjson==0.3.3
beautifulsoup4==4.3.1
billiard==2.7.3.32
celery==3.0.23
defusedxml==0.4.1
dict.sorted==1.0.0
distribute==0.7.3
django-filter==0.7
django-pgfields==1.0
djangorestframework==2.3.6
kombu==2.5.15
oauthlib==0.6.0
psycopg2==2.5.1
python-dateutil==2.1
pytz==2013d
requests==1.2.3
requests-oauthlib==0.3.3
six==1.4.1

Thanks,

Jon Chappell
jon at jchome.us

On October 21, 2013 at 1:27:37 PM, Roberto De Ioris (roberto at unbit.it) wrote:


> 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!


There is this bug open for ubuntu:

https://bugs.launchpad.net/ubuntu/+source/transmageddon/+bug/1208050

do you have the possibility to try with another python3 build (or build
one by yourself)

Can you report the full list of loaded modules ?

Thanks

>

--
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
uWSGI at lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.unbit.it/pipermail/uwsgi/attachments/20131021/09c3ad8d/attachment-0001.html>


More information about the uWSGI mailing list