This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Py_Finalize() doesn't stop daemon threads
Type: crash Stage: resolved
Components: Extension Modules, Interpreter Core Versions: Python 3.9, Python 3.8
Status: closed Resolution: duplicate
Dependencies: Superseder: Runtime finalization assumes all other threads have exited.
View: 36476
Assigned To: Nosy List: Alex Budovski, eric.snow
Priority: normal Keywords:

Created on 2015-08-01 06:08 by Alex Budovski, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg247798 - (view) Author: Alex Budovski (Alex Budovski) Date: 2015-08-01 06:08
This is a known issue, from the comment, but it is causing AVs for my embedded application when background threads are created, for example, by the _socket builtin module.

/* Undo the effect of Py_Initialize().

   Beware: if multiple interpreter and/or thread states exist, these
   are not wiped out; only the current thread and interpreter state
   are deleted.  But since everything else is deleted, those other
   interpreter and thread states should no longer be used.

   (XXX We should do better, e.g. wipe out all interpreters and

   Locking: as above.


msg358746 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2019-12-20 23:33
I'm closing this in favor of #36476 "Runtime finalization assumes all other threads have exited."
Date User Action Args
2022-04-11 14:58:19adminsetgithub: 68958
2019-12-20 23:33:07eric.snowsetstatus: open -> closed

superseder: Runtime finalization assumes all other threads have exited.
versions: + Python 3.8, Python 3.9, - Python 3.6
nosy: + eric.snow

messages: + msg358746
resolution: duplicate
stage: resolved
2019-10-23 00:15:07vstinnersettitle: Py_Finalize not cleaning up all threads -> Py_Finalize() doesn't stop daemon threads
2015-08-01 06:09:28Alex Budovskisettype: crash
2015-08-01 06:08:55Alex Budovskicreate