Message357179
The attached patch (wrap_threadstate.diff) is enough to stop the crash. It's a slightly dirty proof-of-concept, but equally could be the basis for a solution.
The main functional issue is that there's still a race on the Py_BLOCK_THREADS side: it's possible that the "is threadstate still valid" check can pass, but the interpreter is finalised while the daemon thread is trying to reacquire the GIL in PyEval_RestoreThread.
(The Py_UNBLOCK_THREADS side is non-racy as the GIL is held while the ts and wrapper updates are done). |
|
Date |
User |
Action |
Args |
2019-11-21 16:02:09 | pconnell | set | recipients:
+ pconnell, nascheme, db3l, ncoghlan, vstinner, pmpp, eric.snow, serhiy.storchaka, yselivanov, koobs, steve.dower, emilyemorehouse, Johan Dahlin, shprotx |
2019-11-21 16:02:09 | pconnell | set | messageid: <1574352129.36.0.130563817019.issue33608@roundup.psfhosted.org> |
2019-11-21 16:02:09 | pconnell | link | issue33608 messages |
2019-11-21 16:02:09 | pconnell | create | |
|