如何处理追溯到Segmentation Fault杀死我的工人的问题?

时间:2018-10-25 20:35:41

标签: python django linux segmentation-fault uwsgi

所以我的应用程序正在运行,并且时不时出现分段错误,并且我的工作人员被杀死了:[。我想知道如何解决该问题?

这是错误日志:

!!! uWSGI process 8996 got Segmentation Fault !!!
*** backtrace of 8996 ***
/opt/django/www/bin/uwsgi(uwsgi_backtrace+0x2e) [0x4650ee]
/opt/django/www/bin/uwsgi(uwsgi_segfault+0x21) [0x4654b1]
/lib/x86_64-linux-gnu/libc.so.6(+0x36d40) [0x7ff6d0b86d40]
/opt/django/www/local/lib/python2.7/site-packages/numpy-1.10.4-py2.7-    linux-x86_64.egg/numpy/core/multiarray.so(+0x2eec8) [0x7ff6cbd5eec8]
/opt/django/www/local/lib/python2.7/site-packages/numpy-1.10.4-py2.7-    linux-x86_64.egg/numpy/core/multiarray.so(npy_aquicksort+0x218)     [0x7ff6cbe32938]
/opt/django/www/local/lib/python2.7/site-packages/numpy-1.10.4-py2.7-    linux-x86_64.egg/numpy/core/multiarray.so(+0x878c3) [0x7ff6cbdb78c3]
/opt/django/www/local/lib/python2.7/site-packages/numpy-1.10.4-py2.7-    linux-x86_64.egg/numpy/core/multiarray.so(+0x8a09b) [0x7ff6cbdba09b]
/opt/django/www/local/lib/python2.7/site-packages/numpy-1.10.4-py2.7-    linux-x86_64.egg/numpy/core/multiarray.so(+0xcb642) [0x7ff6cbdfb642]
/usr/lib/x86_64-linux-    gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x4bd4) [0x7ff6d10a20d4]
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80d) 
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(+0x1c36d0)     [0x7ff6d10d86d0]
/opt/django/www/local/lib/python2.7/site-    packages/pandas/lib.so(+0x1468f) [0x7ff6c9f9d68f]
/opt/django/www/local/lib/python2.7/site-    packages/pandas/lib.so(+0x10be3) [0x7ff6c9f99be3]
/opt/django/www/local/lib/python2.7/site-    packages/pandas/lib.so(+0x2f843) [0x7ff6c9fb8843]
/usr/lib/x86_64-linux-    gnu/libpython2.7.so.1.0(_PyObject_GenericGetAttrWithDict+0xb1)     [0x7ff6d105be81]
/usr/lib/x86_64-linux-    gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x2611) [0x7ff6d109fb11]
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80d)         [0x7ff6d10a354d]
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(+0x1c36d0)     [0x7ff6d10d86d0]
/opt/django/www/local/lib/python2.7/site-    packages/pandas/lib.so(+0x1468f) [0x7ff6c9f9d68f]
/opt/django/www/local/lib/python2.7/site-    packages/pandas/lib.so(+0x10be3) [0x7ff6c9f99be3]
/opt/django/www/local/lib/python2.7/site-    packages/pandas/lib.so(+0x2f843) [0x7ff6c9fb8843]
/usr/lib/x86_64-linux-    gnu/libpython2.7.so.1.0(_PyObject_GenericGetAttrWithDict+0xb1)     [0x7ff6d105be81]
/usr/lib/x86_64-linux-    gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x2611) [0x7ff6d109fb11]
/usr/lib/x86_64-linux-    gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x4b59) [0x7ff6d10a2059]
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80d)     [0x7ff6d10a354d]
/usr/lib/x86_64-linux-    gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x48d8) [0x7ff6d10a1dd8]
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80d)     [0x7ff6d10a354d]
/usr/lib/x86_64-linux-    gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x48d8) 
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80d)     [0x7ff6d10a354d]
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(+0x1c37a5)     [0x7ff6d10d87a5]
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyObject_Call+0x43)     [0x7ff6d1044d43]
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0xeb1)     [0x7ff6d109e3b1]
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80d)     [0x7ff6d10a354d]
/usr/lib/x86_64-linux-    gnu/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x48d8) [0x7ff6d10a1dd8]
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x80d)     [0x7ff6d10a354d]
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(+0x1c36d0)     [0x7ff6d10d86d0]
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0(PyObject_Call+0x43)     [0x7ff6d1044d43]
*** end of backtrace ***
DAMN ! worker 1 (pid: 8996) died :( trying respawn ...
Respawned uWSGI worker 1 (new pid: 8999)

这完全显示在我的err.log中,并时不时发生。我不知道为什么会这样。请帮助noobie。导致这种情况的功能只有一种,但有时会发生,碰到或错过。

编辑:

熊猫功能:

seller4 = list(chain(seller, po_seller, seller_cp))
df = pd.DataFrame(seller4)

grouped = df.groupby(['available_from','status','rating','harvest_date','purchase_order_line__purchase_order__identifier','block__farm__seller__user__first_name','block__farm__seller__user__last_name','block__farm__seller_id','id','scanned_status']).agg(sum)

sellers = grouped.reset_index().to_dict('records')

1 个答案:

答案 0 :(得分:0)

从版本0.11开始,熊猫不是线程安全的。 Relevant Docs

这意味着除非在uwsgi config中禁用线程,否则您将遇到问题。不幸的是,我目前不确定是否会有所帮助。