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 vstinner
Date 2020-03-27.17:02:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
test_threading.ThreadJoinOnShutdown.test_reinit_tls_after_fork() does crash randomly on AIX in logging._after_at_fork_child_reinit_locks():

This function ends by releasing a lock:

    _releaseLock()  # Acquired by os.register_at_fork(before=.

But it is not safe to use a lock after fork (see bpo-6721 and bpo-40089).

The purpose of _after_at_fork_child_reinit_locks() is already to fix locks used by logging handles: see bpo-36533 and commit 64aa6d2000665efb1a2eccae176df9520bf5f5e6. But the global logging._lock is not reset after fork.

Attached PR fix the issue.
Date User Action Args
2020-03-27 17:02:43vstinnersetrecipients: + vstinner
2020-03-27 17:02:43vstinnersetmessageid: <>
2020-03-27 17:02:43vstinnerlinkissue40091 messages
2020-03-27 17:02:43vstinnercreate