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 vstinner
Recipients eric.snow, vstinner
Date 2020-03-18.00:48:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> In bpo-33608 I moved the pending calls to per-interpreter state.  We saw failures (sometimes sporadic) on a few buildbots (e.g. FreeBSD) during runtime finalization.  However, nearly all of the buildbots were fine, so it may be a question of architecture or slow hardware.  See bpo-33608 for details on the failures.

That was a crash in multiprocessing tests. PyEval_RestoreThread(tstate) was called with a freed PyThreadState: tstate->interp = 0xdbdbdbdbdbdbdbdb for example.

I recently fixed PyEval_RestoreThread() in bpo-39877 to exit properly daemon theads without dereferencing tstate which points to freed memory.

To reproduce the bug, it helped me to add a sleep at Python exit. Fixed value (ex: 1 second) or better: random sleep (between 1 ms and 1 sec).
Date User Action Args
2020-03-18 00:48:47vstinnersetrecipients: + vstinner, eric.snow
2020-03-18 00:48:47vstinnersetmessageid: <>
2020-03-18 00:48:47vstinnerlinkissue37127 messages
2020-03-18 00:48:47vstinnercreate