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.

Author anselm.kruis
Recipients anselm.kruis
Date 2019-08-07.16:22:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Starting with commit 468e5fec (bpo-36402: Fix threading._shutdown() race condition (GH-13948)) the following trivial test case leaks one reference and one memory block.

class MiscTestCase(unittest.TestCase):
    def test_without_join(self):
        # Test that a thread without join does not leak references.
        # Use a debug build and run "python -m test -R: test_threading"

Attached is a patch, that adds this test case to Lib/test/ After you apply this patch "python -m test -R: test_threading" leaks one (additional) reference. This leak is also present in Python 3.7.4 and 3.8.

I'm not sure, if it correct not to join a thread, but it did work flawlessly and didn't leak in previous releases.
I didn't analyse the root cause yet.
Date User Action Args
2019-08-07 16:22:52anselm.kruissetrecipients: + anselm.kruis
2019-08-07 16:22:52anselm.kruissetmessageid: <>
2019-08-07 16:22:52anselm.kruislinkissue37788 messages
2019-08-07 16:22:52anselm.kruiscreate