Closed
Description
- uvloop version: uvloop==0.14.0
- Python version: Python 3.7.5 (3.7.5-2~19.10)
- Platform: Ubuntu 19.10
- Can you reproduce the bug with
PYTHONASYNCIODEBUG
in env?: Yes. - Does uvloop behave differently from vanilla asyncio? How?: Vanilla asyncio works fine.
The attached testcase test.zip crashes uvloop with the following message:
python: src/unix/core.c:932: uv__io_stop: Assertion `loop->watchers[w->fd] == w' failed.
This looks similar to #88. Here is a stacktrace using gdb: stacktrace.txt
The real-world application tries to read kadmin’s stdout and write to its stdin. The included mock.py replaces kadmin, but – for this issue – behaves the same. Vanilla asyncio works exactly as expected.
edit: Upon further investigation replacing the two lines
proc.stdin.write (password.encode ('utf-8'))
proc.stdin.write (b'\n')
with a single write
proc.stdin.write (password.encode ('utf-8') + b'\n')
solves the issue, which indicates a race condition somewhere inside uvloop.
Metadata
Metadata
Assignees
Labels
No labels