Staging
v0.5.1
Revision 3b699932e5ac3e76031bbb6d700fbea07492641d authored by Miss Islington (bot) on 07 October 2018, 07:09:59 UTC, committed by Gregory P. Smith on 07 October 2018, 07:09:59 UTC
bpo-6721: When os.fork() was called while another thread holds a logging lock, the child process may deadlock when it tries to log.  This fixes that by acquiring all logging locks before fork and releasing them afterwards.

A regression test that fails before this change is included.

Within the new unittest itself: There is a small _potential_ due to mixing of fork and a thread in the child process if the parent's thread happened to hold a non-reentrant library call lock (malloc?) when the os.fork() happens.  buildbots and time will tell if this actually manifests itself in this test or not.  :/  A functionality test that avoids that would be a challenge.

An alternate test that isn't trying to produce the deadlock itself but just checking that the release and acquire calls are made would be the next best alternative if so.
(cherry picked from commit 19003841e965bbf56fd06824d6093620c1b66f9e)

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
1 parent 1a21893
History
File Mode Size
Grammar -rw-r--r-- 6.3 KB

back to top