unbit / uwsgi

uWSGI application server container
http://projects.unbit.it/uwsgi
Other
3.46k stars 691 forks source link

!!! uWSGI process 23710 got Segmentation Fault !!! #1585

Open pangubing opened 7 years ago

pangubing commented 7 years ago

root@iZ1177etbasZ:/var/log# uname -a Linux iZ1177etbasZ 3.13.0-65-generic #106-Ubuntu SMP Fri Oct 2 22:08:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux Python version:Python 2.7.6 !!! uWSGI process 23710 got Segmentation Fault !!! backtrace of 23710 uwsgi(uwsgi_backtrace+0x2e) [0x45121e] uwsgi(uwsgi_segfault+0x21) [0x4515f1] /lib/x86_64-linux-gnu/libc.so.6(+0x36cb0) [0x7f0d50f9acb0] /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyErr_Restore+0x31) [0x7f0d4fdcffe1] /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyErr_Format+0x9a) [0x7f0d4fdab28a] /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(_PyObject_GenericGetAttrWithDict+0x1a1) [0x7f0d4fd760e1] /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyObject_GetAttrString+0x3b) [0x7f0d4fd77aab] /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyObject_HasAttrString+0x9) [0x7f0d4fd77af9] /usr/lib/uwsgi/plugins/python_plugin.so(uwsgi_python_autoreloader_thread+0x10b) [0x7f0d501bbd2b] /lib/x86_64-linux-gnu/libpthread.so.0(+0x8184) [0x7f0d52a87184] /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f0d5105e37d] end of backtrace DAMN ! worker 3 (pid: 23710) died :( trying respawn ... Respawned uWSGI worker 3 (new pid: 18982) can some one help me !!!!!!!!!!!!!!!!!!!!

xrmx commented 7 years ago

Which version of uwsgi is this? If not latest, try to reproduce with latest.

naoko commented 7 years ago

I'm using the latest

uWSGI==2.0.15

and getting the segmentation fault error. Looks like #1212 is also having similar issue although cause might vary... In my case, I know clearly where/when this happens. as soon as I placed the code to raise exception

print(1 / 0)

this segmentation error occurs. Could you tell me why it is not logging exception elegantly?

[uwsgi]
http  = 0.0.0.0:5000
paste = config:%dapi.ini
paste-logger = true
processes = 1
buffer-size = 64000
master = true
max-requests = 33333
enable-threads = true

this error occurs with/without paste-logger and enable-threads

yet... it works sometimes too.... (e.g. remove the code to raise exception, restart, run normally for a while, restart with code to raise exception etc) Is it memory issue? if so anyway I can monitor / check or clear?

dafvid commented 7 years ago

I think I'm getting segfaults on exceptions aswell. How do I print those nice backtraces from the segfault?

leipengkai commented 6 years ago

hava a this bug when my config look this: [uwsgi] processes=4 threads=2 is ok when like this: [uwsgi] processes=1 threads=1

raratiru commented 6 years ago

In my config, I had set ftok pointing to the uwsgi.ini file.

Upon segmentation fault, making whatever change to the configuration file and saving it, uwsgi would start normally.