[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread STINNER Victor
STINNER Victor added the comment: The _sre crash has a complex history in the 3.9 branch: * (1) 2019-11-20, commit 7247407c35330f3f6292f1d40606b7ba6afd5700: first CRASH! The parent commit (488d02a24142948bfb1fafd19fa48e61fcbbabc5) doesn't crash. * (2) 2019-11-22, commit

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread STINNER Victor
STINNER Victor added the comment: In the 3.9 branch, the commit 4d2cfd354969590ba8e0af0447fd84f8b5e61952 fixed the _asyncio extension. win_py399_crash_reproducer.py still branch on Windows in the 3.9 branch. The code can be simplified with: code = "import _sre" Moreover, even if I

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread Petr Viktorin
Petr Viktorin added the comment: > The problem is that this change fixed another bug, well, see: bpo-44050. > While a revert should fix win_py399_crash_reproducer.py, it will reintroduce > bpo-44050 bug. bpo-44050 is an attempt to fix a regression introduced in bpo-38858, perhaps that

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread STINNER Victor
STINNER Victor added the comment: I reverted manually the commit 52d9d3b75441ae6038fadead89eac5eecdd34501 (in my local Python 3.9 checkout): I confirm that the revert fix the win_py399_crash_reproducer.py crash in Python 3.9. -- ___ Python

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread STINNER Victor
STINNER Victor added the comment: > The problematic change could be (d0d29655ff) affecting import.c This change is part of the 3.10 branch. For 3.9, git bisect tells me that it's the following change: commit 52d9d3b75441ae6038fadead89eac5eecdd34501 Author: Ɓukasz Langa Date: Tue Oct 5

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread STINNER Victor
STINNER Victor added the comment: Even with PR 30454, I can still reproduce the crash on Python 3.9 (randomly, it takes a few attempts to reproduce the crash): vstinner@DESKTOP-DK7VBIL C:\vstinner\python\3.9>python -X dev win_py399_crash_reproducer.py Running Debug|x64 interpreter... exit

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread miss-islington
miss-islington added the comment: New changeset 4d2cfd354969590ba8e0af0447fd84f8b5e61952 by Miss Islington (bot) in branch '3.9': bpo-46070: Fix asyncio initialisation guard (GH-30423) https://github.com/python/cpython/commit/4d2cfd354969590ba8e0af0447fd84f8b5e61952 --

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread miss-islington
miss-islington added the comment: New changeset 9d18045804f6db8224be14f7a618b77977f90144 by Miss Islington (bot) in branch '3.10': bpo-46070: Fix asyncio initialisation guard (GH-30423) https://github.com/python/cpython/commit/9d18045804f6db8224be14f7a618b77977f90144 --

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset b127e70a8a682fe869c22ce04c379bd85a00db67 by Erlend Egeberg Aasland in branch 'main': bpo-46070: Fix asyncio initialisation guard (GH-30423) https://github.com/python/cpython/commit/b127e70a8a682fe869c22ce04c379bd85a00db67 --

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread miss-islington
Change by miss-islington : -- pull_requests: +28658 pull_request: https://github.com/python/cpython/pull/30454 ___ Python tracker ___

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 12.0 -> 13.0 pull_requests: +28657 pull_request: https://github.com/python/cpython/pull/30453 ___ Python tracker

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-05 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Note, GH-30423 does _not_ fix the win_py399_crash_reproducer.py issue. -- ___ Python tracker ___

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-05 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +28628 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/30423 ___ Python tracker

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-05 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Applying the following patch upon the aforementioned commit (in 3.8) fixes > the issue for me on latest Debian By "the issue", I mean bug.py, not win_py399_crash_reproducer.py. Victor: perhaps we should open a separate issue for the bug.py issue.

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-05 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: In 13915a3100608f011b29da2f3716c990f523b631, the init flag is set before we even know if module initialisation was successful. Applying the following patch upon the aforementioned commit (in 3.8) fixes the issue for me on latest Debian: ``` diff --git

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-05 Thread STINNER Victor
STINNER Victor added the comment: > bpo-36356: Fix memory leak in _asynciomodule.c (GH-16598) Python 3.8.0 is the first Python version containing this change. So it looks like a Python 3.8 regression. -- ___ Python tracker

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-05 Thread STINNER Victor
Change by STINNER Victor : -- title: _PyImport_FixupExtensionObject() regression causing a crash in subintepreters -> [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression) ___ Python tracker