MagicStack / MagicStack/uvloop
Segmentation fault
還沒有人認領這個 Issue。
- 主要語言
- Cython
- 星號
- 11.9k
- 分支
- 616
- PR 合併指標
- 30 天內沒有已合併 PR
描述
- uvloop version:
0.16.0 - Python version:
Python 3.7.10 - Platform:
Amazon Linux release 2 (Karoo)
It happens couple of times a day sometimes. And than does not happen for weeks:
Thread 2 "python3.7" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe71b3700 (LWP 31714)]
0x0000000000000000 in ?? ()
Missing separate debuginfos, use: debuginfo-install python3-3.7.10-1.amzn2.0.1.x86_64
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00007fffe97b2a5b in uv__read (stream=stream@entry=0x7fffe01bbe40) at src/unix/stream.c:1211
#2 0x00007fffe97b2f58 in uv__stream_io (loop=<optimized out>, w=0x7fffe01bbec8, events=1) at src/unix/stream.c:1316
#3 0x00007fffe97b9e75 in uv.io_poll () at src/unix/epoll.c:374
#4 0x00007fffe97ac684 in uv_run (loop=0x9982e0, mode=mode@entry=UV_RUN_DEFAULT) at src/unix/core.c:389
#5 0x00007fffe975e1f0 in __pyx_f_6uvloop_4loop_4Loop___run (__pyx_v_self=0xa19e70, __pyx_v_mode=UV_RUN_DEFAULT) at uvloop/loop.c:14642
#6 0x00007fffe976548d in __pyx_f_6uvloop_4loop_4Loop__run (__pyx_v_self=0xa19e70, __pyx_v_mode=UV_RUN_DEFAULT) at uvloop/loop.c:15030
#7 0x00007fffe96ebbc8 in __pyx_pf_6uvloop_4loop_4Loop_24run_forever (__pyx_v_self=0xa19e70) at uvloop/loop.c:27698
#8 __pyx_pw_6uvloop_4loop_4Loop_25run_forever (__pyx_v_self=0xa19e70, unused=<optimized out>) at uvloop/loop.c:27519
#9 0x00007ffff79d9db0 in _PyMethodDef_RawFastCallKeywords () from /lib64/libpython3.7m.so.1.0
#10 0x00007ffff79f37ed in _PyMethodDescr_FastCallKeywords () from /lib64/libpython3.7m.so.1.0
#11 0x00007ffff7a37cfb in _PyEval_EvalFrameDefault () from /lib64/libpython3.7m.so.1.0
#12 0x00007ffff79cce66 in _PyFunction_FastCallKeywords () from /lib64/libpython3.7m.so.1.0
#13 0x00007ffff7a3326f in _PyEval_EvalFrameDefault () from /lib64/libpython3.7m.so.1.0
#14 0x00007ffff79cce66 in _PyFunction_FastCallKeywords () from /lib64/libpython3.7m.so.1.0
#15 0x00007ffff7a3326f in _PyEval_EvalFrameDefault () from /lib64/libpython3.7m.so.1.0
#16 0x00007ffff7995757 in _PyFunction_FastCallDict () from /lib64/libpython3.7m.so.1.0
#17 0x00007ffff79a2711 in _PyObject_Call_Prepend () from /lib64/libpython3.7m.so.1.0
#18 0x00007ffff7995baa in PyObject_Call () from /lib64/libpython3.7m.so.1.0
#19 0x00007ffff7aa0b43 in t_bootstrap () from /lib64/libpython3.7m.so.1.0
#20 0x00007ffff7a4a147 in pythread_wrapper () from /lib64/libpython3.7m.so.1.0
#21 0x00007ffff741744b in start_thread () from /lib64/libpthread.so.0
#22 0x00007ffff6a0b40f in clone () from /lib64/libc.so.6
My app is using uvloop + aiohttp to continiously poll certain websites with high frequency. There are couple of threads which a sending tasks to a single thread where uvloop loop runs.
Both processes where this reproduces run at -17 and -20 niceness. There are some other processes with niceness around -10,-12 where it never reproduced. So maybe somehow related.
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從提供的 GDB 回溯開始,檢查 Loop.__run 和 Loop._run 附近的 uvloop/loop.c,然後將其與 libuv 的 src/unix/stream.c 和 src/unix/epoll.c 進行比較。在回報的 Python、uvloop、Amazon Linux、threading 和 niceness 條件下重現間歇性 SIGSEGV;完成的標準是找出並處理崩潰原因。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- networking
- Issue 類型
- 缺陷
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 20/100