• Gregory P. Smith's avatar
    bpo-6721: Hold logging locks across fork() (GH-4071) · 19003841
    Gregory P. Smith yazdı
    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.
    19003841
Adı
Son kayıt (commit)
Son güncelleme
.github Loading commit data...
.vsts Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Programs Loading commit data...
Python Loading commit data...
Tools Loading commit data...
m4 Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CODE_OF_CONDUCT.rst Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README.rst Loading commit data...
aclocal.m4 Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...