statgen / pheweb

A tool to build a website to browse hundreds or thousands of GWAS.
MIT License
158 stars 66 forks source link

Gunicorn Segfault #156

Closed ttbek closed 3 years ago

ttbek commented 3 years ago

Well, this is a fun one:

pheweb serve            
<frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
<frozen importlib._bootstrap>:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject
[2021-01-26 01:20:04 +0000] [812647] [INFO] Starting gunicorn 20.0.4
[2021-01-26 01:20:04 +0000] [812647] [INFO] Listening at: http://0.0.0.0:5000 (812647)
[2021-01-26 01:20:04 +0000] [812647] [INFO] Using worker: gevent
[2021-01-26 01:20:04 +0000] [812649] [INFO] Booting worker with pid: 812649
[2021-01-26 01:20:04 +0000] [812650] [INFO] Booting worker with pid: 812650
[2021-01-26 01:20:04 +0000] [812651] [INFO] Booting worker with pid: 812651
[2021-01-26 01:20:04 +0000] [812652] [INFO] Booting worker with pid: 812652
[2021-01-26 01:20:04 +0000] [812653] [INFO] Booting worker with pid: 812653
[2021-01-26 01:20:04 +0000] [812654] [INFO] Booting worker with pid: 812654
Segmentation fault (core dumped)

The Ubuntu error reporting utility also shows me it is from package python3.8-minimal 3.8.5-1~20.04, title: python3.8 crashed with SIGSEGV in PyDict_GetItem() Dissassembly: => 0x7f1babaec20e: Cannot access memory at 0x7f1babaec20e SIGSEGV Analysis says PC (0x7f1babaec20e) ok and SP (0x7ffcdf8f0490) ok Reason could not be automatically determined

If this thread is correct: https://github.com/python-greenlet/greenlet/issues/178 Then pheweb may need to use newer gevent and greenlet for Python 3.8.

ttbek commented 3 years ago

pip3 install --upgrade gevent Seems to fix it, but the package upgrade does give: ERROR: pheweb 1.1.25 has requirement gevent~=1.4, but you'll have gevent 21.1.2 which is incompatible. Seems to install and work anyway though.

Edit: My issue is addressed, but I will leave this open for tracking in case you want to adjust package dependencies before closing.

pjvandehaar commented 3 years ago

Thanks. Yeah, it's certainly worrying to see a segfault in python.

I fixed this with https://github.com/statgen/pheweb/commit/f8014cd21cc52d5dadd2fd5cc22d4255291cba77 in November but didn't make a new release. Looking back, I also fixed your URL issue back then. I just pushed version 1.1.26 with those fixes and another.