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 <1585328563.49.0.978667613959.issue40091@roundup.psfhosted.org>
In-reply-to
Content
test_threading.ThreadJoinOnShutdown.test_reinit_tls_after_fork() does crash randomly on AIX in logging._after_at_fork_child_reinit_locks():
https://bugs.python.org/issue40068#msg365028

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.
History
Date User Action Args
2020-03-27 17:02:43vstinnersetrecipients: + vstinner
2020-03-27 17:02:43vstinnersetmessageid: <1585328563.49.0.978667613959.issue40091@roundup.psfhosted.org>
2020-03-27 17:02:43vstinnerlinkissue40091 messages
2020-03-27 17:02:43vstinnercreate