unbit / uwsgi

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

get the segmentation fault error #539

Closed mingshi closed 9 years ago

mingshi commented 10 years ago

hi:

my app is based on flask + uwsgi + nginx

when i access one page which contain multiple threads, i got the follow error, but the other pages are working well which contain multiple threads.

!!! uWSGI process 12043 got Segmentation Fault !!! * backtrace of 12043 * uwsgi(uwsgi_backtrace+0x25) [0x45fba5] uwsgi(uwsgi_segfault+0x21) [0x45fc81] /lib64/libc.so.6() [0x30f3632960] /lib64/libc.so.6(cfree+0x3c) [0x30f367b74c] /lib64/libdl.so.2() [0x30f3a0160d] /lib64/libpthread.so.0() [0x30f3e078e9] /lib64/libc.so.6(clone+0x6d) [0x30f36e894d] * end of backtrace *

any one or idea can help me ?

mingshi commented 10 years ago

and when i change uwsgi to gunicorn, my app is working well!

unbit commented 10 years ago

please report uwsgi version and your configuration

mingshi commented 10 years ago

at the firest, i use uWSGI 2.0.1 (64bit), then i changed to uWSGI 1.9.2 , but the error continued

the follw is my configuration:

./ run app /tmp/uwsgi.sock 8 uwsgi.log
unbit commented 10 years ago

i do not see enable-threads and as you are using multiple processes you should think about when to call fork()

Check the ThingsToKnow document page for more infos

mingshi commented 10 years ago

i start the app with uwsgi --enanle-threads and i have anthor app also based on flask + uwsgi + nginx, and also used multiple threads, but it worked so well

unbit commented 10 years ago

Sorry but without context is impossibile to help, there are literally dozens of ways for threads in forked environments to crash. Have you checked with --lazy-apps ? it will use fork() like gunicorn. And (for being sure) move enable-threads to the xml file as often i have seen users putting command line options in the Emperor being sure they would have been inherited.

unbit commented 9 years ago

Closing as we do not have enough info to understand