You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: yes
Does uvloop behave differently from vanilla asyncio? How?: vanilla asyncio doesn't crash
MWE:
importasyncioimport_interpretersasinterpretersimportuvloopasyncdefmain():
interp_id=interpreters.create()
awaitasyncio.create_subprocess_exec("sleep", "2")
interpreters.destroy(interp_id) # this is never reachedasyncio.run(main(), loop_factory=uvloop.new_event_loop)
Crash log:
Fatal Python error: PyThreadState_Get: the function must be called with the GIL held, after Python initialization and before Python finalization, but the GIL is released (the current Python thread state is NULL)
Python runtime state: initialized
Current thread 0x00007fa5713c8740 (most recent call first):
File "/usr/lib64/python3.13/asyncio/subprocess.py", line 224 in create_subprocess_exec
File "/home/alex/workspace/anyio/bug-trio.py", line 8 in main
File "/usr/lib64/python3.13/asyncio/runners.py", line 118 in run
File "/usr/lib64/python3.13/asyncio/runners.py", line 194 in run
File "/home/alex/workspace/anyio/bug-trio.py", line 12 in <module>
Extension modules: uvloop.loop (total: 1)
If I destroy the subinterpreter before spawning the subprocess, it works fine.
The text was updated successfully, but these errors were encountered:
PYTHONASYNCIODEBUG
in env?: yesMWE:
Crash log:
If I destroy the subinterpreter before spawning the subprocess, it works fine.
The text was updated successfully, but these errors were encountered: