Message357170
Just to summarise, I'm fairly sure this is exactly what Victor saw: a daemon thread attempts to reacquire the GIL via Py_END_ALLOW_THREADS after interpreter finalisation. Obviously the threadstate pointer held by the thread is then invalid...so we crash.
So I see basically two options:
1. Don't (always) free threadstate structures in Py_Finalize, and figure out a way to avoid leaking them (if Python is re-initialized in the same process).
2. Ban this behaviour entirely, e.g. have Py_Finalize fail if there are live threads with threadstate objects.
The discussion so far assumes that we should support this, i.e. #1. Any thoughts on that? (I'll have a think about whether this is actually doable!) |
|
Date |
User |
Action |
Args |
2019-11-21 13:55:58 | pconnell | set | recipients:
+ pconnell, nascheme, db3l, ncoghlan, vstinner, pmpp, eric.snow, serhiy.storchaka, yselivanov, koobs, steve.dower, emilyemorehouse, Johan Dahlin, shprotx |
2019-11-21 13:55:58 | pconnell | set | messageid: <1574344558.04.0.161892905653.issue33608@roundup.psfhosted.org> |
2019-11-21 13:55:58 | pconnell | link | issue33608 messages |
2019-11-21 13:55:57 | pconnell | create | |
|