New submission from Jorge Herskovic:

I'm writing a library on top of multiprocessing. As part of the test suite, I 
create and destroy dozens of processes repeatedly. About once in 50 runs, the 
tests complete successfully but the program crashes with:

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
 line 286, in _exit_function
 line 246, in _run_finalizers
    items = [x for x in list(_finalizer_registry.items()) if f(x)]
RuntimeError: dictionary changed size during iteration

(this is on OS X 10.10.3, Python 3.4.3; I've been unable to replicate the 
behavior on Python 2.7.9, 3.5.0b2, or pypy despite hundreds of runs)

The problematic code is available at and 
the tests should be run with nosetests

components: Library (Lib)
messages: 245597
nosy: Jorge Herskovic
priority: normal
severity: normal
status: open
title: multiprocessing cleanup occasionally throws exception
type: crash
versions: Python 3.4

Python tracker <>
Python-bugs-list mailing list

Reply via email to