Forums

!!! uWSGI process 11 got Segmentation Fault !!!

Hi,

I'm having random but rather recurring segmentation faults clicking from one page to another in our latest project. I've browsed som topics on the matter but nothing seems to help. I'm using Python 3.7 and Django 2.2.18.

We're doing basic stuff in the project (comparable to previous working projects). Also no error in the logs. Frequency: at least once to twice during a session. We've also rebuilt the virtuelenv as a former suggestion. Reloading the page works fine until the next 502 (something went wrong).

Really frustrating problem... Server log below:

!!! uWSGI process 11 got Segmentation Fault !!! 2021-02-06 16:16:41 *** backtrace of 11 ***#012merlinresponse dewilde.responsestudios.com uWSGI worker 4(uwsgi_backtrace+0x2c) [0x46529c]#012merlinresponse dewilde.responsestudios.com uWSGI worker 4(uwsgi_segfault+0x21) [0x465661]#012/lib/x86_64-linux-gnu/libc.so.6(+0x354b0) [0x7f03e09374b0]#012/usr/lib/libpython3.7m.so.1.0(PyObject_GC_UnTrack+0x2a) [0x7f03dd50cd5a]#012/usr/lib/libpython3.7m.so.1.0(+0xf3b19) [0x7f03dd42ab19]#012/usr/lib/libpython3.7m.so.1.0(+0xce267) [0x7f03dd405267]#012/usr/lib/libpython3.7m.so.1.0(+0xf3ffb) [0x7f03dd42affb]#012/usr/lib/libpython3.7m.so.1.0(+0xce267) [0x7f03dd405267]#012/usr/lib/libpython3.7m.so.1.0(+0xf3ffb) [0x7f03dd42affb]#012/usr/lib/libpython3.7m.so.1.0(+0xba513) [0x7f03dd3f1513]#012/usr/lib/libpython3.7m.so.1.0(+0xf3f77) [0x7f03dd42af77]#012/usr/lib/libpython3.7m.so.1.0(+0xf2005) [0x7f03dd429005]#012/usr/lib/libpython3.7m.so.1.0(+0xba513) [0x7f03dd3f1513]#012/usr/lib/libpython3.7m.so.1.0(+0xce267) [0x7f03dd405267]#012/usr/lib/libpython3.7m.so.1.0(+0xf3ffb)

A segmentation fault usually means that something bad happened in the C code. If you're using compiled modules, it could be one of those so perhaps you could try removing code that uses them slowly to see if you can determine which one. Another thing you could try is perhaps running the site in Python 3.6 to see if that changes anything.

Hi Glenn,

Thx also for you swift follow up via mail. Much appreciated! I've loved your platform for a while so I really hope we'll get to a solutions. Happy to say that at first glance, the going back to 3.6 seems to work. I've clicked a way quite a few times and was not able to reproduce the problem!

For the sake of other users, I'll reconfirm in a few days if the solution is durable. Many, many thanks!

Best regards,

Maxime

PS: Meanwhile I still added some power to my account :) Let's say it's an investment for a future big project :p

Cool. Glad we found a solution.

I confirm I was not able to reproduce the 502. Thx for the solution!

Excellent, thanks for confirming!