[New-bugs-announce] [issue14548] garbage collection just after multiprocessing's fork causes exceptions
report at bugs.python.org
Wed Apr 11 18:32:32 CEST 2012
New submission from sbt <shibturn at gmail.com>:
When running test_multiprocessing on Linux I occasionally see a stream of errors caused by ignored weakref callbacks:
Exception AssertionError: AssertionError() in <Finalize object, dead> ignored
These do not cause the unittests to fail.
Finalizers from the parent process are supposed to be cleared after the fork. But if a garbage collection before that then Finalizer callbacks can be run in the "wrong" process.
Disabling gc during fork seems to prevent the errors. Or maybe the Finalizer should record the pid of the process which created it and only invoke the callback if it matches the current pid.
(Compare Issure 1336 conscerning subprocess.)
title: garbage collection just after multiprocessing's fork causes exceptions
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce