MagicStack / MagicStack/uvloop

Program terminated with signal SIGABRT

Open
#438 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Cython
Stars
11.9k
Forks
616
PR merge metrics
No merged PRs in 30d

Description

  • uvloop version: uvloop 0.16.0
  • Python version: 3.9.5
  • Platform: Ubuntu 5.11.0-31-generic
  • Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: Yes. No suspicious message other than "Executing <Task pending name='Task-60' ...> took 0.578 seconds
  • Does uvloop behave differently from vanilla asyncio? How?: Yes. Python process does not crash

gdb:

Program terminated with signal SIGABRT, Aborted.

bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
49      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7fc465c0c640 (LWP 11019))]
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
#1  0x00007fc477a83864 in __GI_abort () at abort.c:79
#2  0x00007fc46c33eef5 in uv__io_poll (loop=loop@entry=0x7fc45003f9f0, timeout=<optimized out>) at src/unix/epoll.c:166
#3  0x00007fc46c43d794 in uv_run (loop=0x7fc45003f9f0, mode=mode@entry=UV_RUN_DEFAULT) at src/unix/core.c:389
#4  0x00007fc46c39bc50 in __pyx_f_6uvloop_4loop_4Loop___run (__pyx_v_self=0x7fc450000fe0, __pyx_v_mode=UV_RUN_DEFAULT) at uvloop/loop.c:14642
#5  0x00007fc46c39e1b7 in __pyx_f_6uvloop_4loop_4Loop__run (__pyx_v_self=0x7fc450000fe0, __pyx_v_mode=UV_RUN_DEFAULT) at uvloop/loop.c:15030
#6  0x00007fc46c3c5f3d in __pyx_pf_6uvloop_4loop_4Loop_24run_forever (__pyx_v_self=0x7fc450000fe0) at uvloop/loop.c:27698
#7  __pyx_pw_6uvloop_4loop_4Loop_25run_forever (__pyx_v_self=<Loop at remote 0x7fc450000fe0>, unused=<optimized out>) at uvloop/loop.c:27519
#8  0x00007fc46c373d66 in __Pyx_PyObject_CallMethO (arg=0x0, func=<built-in method run_forever of Loop object at remote 0x7fc450000fe0>)
    at uvloop/loop.c:167062
#9  __Pyx_PyObject_CallNoArg (func=<built-in method run_forever of Loop object at remote 0x7fc450000fe0>) at uvloop/loop.c:36016
#10 0x00007fc46c3dceeb in __pyx_pf_6uvloop_4loop_4Loop_44run_until_complete (__pyx_v_future=<_asyncio.Task at remote 0x7fc466423380>,
    __pyx_v_self=<optimized out>) at uvloop/loop.c:29299
#11 __pyx_pw_6uvloop_4loop_4Loop_45run_until_complete (__pyx_v_self=<optimized out>, __pyx_v_future=<optimized out>) at uvloop/loop.c:28897
#12 0x000000000053d245 in method_vectorcall_O (func=<optimized out>, args=0x7fc450000f48, nargsf=<optimized out>, kwnames=<optimized out>)
    at ../Objects/descrobject.c:462
#13 0x0000000000516543 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x7fc450000f48,
    callable=<method_descriptor at remote 0x7fc476cfff90>, tstate=0x2f350b0) at ../Include/cpython/abstract.h:118
#14 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7fc450000f48, callable=<method_descriptor at remote 0x7fc476cfff90>)
    at ../Include/cpython/abstract.h:127
#15 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, tstate=0x2f350b0) at ../Python/ceval.c:5072
#16 _PyEval_EvalFrameDefault (tstate=<optimized out>, f=<optimized out>, throwflag=<optimized out>) at ../Python/ceval.c:3504
#17 0x0000000000515377 in _PyEval_EvalFrame (throwflag=0,
    f=Frame 0x7fc450000dc0, for file /usr/lib/python3.9/asyncio/runners.py, line 300, in run (main=<coroutine at remote 0x7fc4664264c0>, debug=None, loop=<Loop at remote 0x7fc450000fe0>), tstate=0x2f350b0) at ../Include/internal/pycore_ceval.h:40

py-bt
Traceback (most recent call first):
  File "/usr/lib/python3.9/asyncio/runners.py", line 300, in run
  File "main.py", line 70, in worker
    asyncio.run(async_worker(q_tasks, fetcher))
  File "/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 912, in _bootstrap
    self._bootstrap_inner()

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from main.py:70 in worker and reproduce the SIGABRT with uvloop 0.16.0, Python 3.9.5, Ubuntu, and PYTHONASYNCIODEBUG enabled. Inspect the gdb backtrace through uvloop/loop.c and libuv's src/unix/epoll.c, then compare the behavior with vanilla asyncio. Done means the reported workload no longer aborts and the cause or a reliable fix is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.