New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'dictionary changed size' error in test_multiprocessing #47828
Comments
Here's a report from Ismail Donmez (cartman), extracted from the [cartman] With trunk when running test_multiprocessing in a tight loop I saw test_multiprocessing
Process Process-61:
Traceback (most recent call last):
File "/Users/cartman/Sources/py3k/Lib/multiprocessing/process.py",
line 229, in _bootstrap
Process Process-60:
Traceback (most recent call last):
File "/Users/cartman/Sources/py3k/Lib/multiprocessing/process.py",
line 229, in _bootstrap
Process Process-62:
Traceback (most recent call last):
File "/Users/cartman/Sources/py3k/Lib/multiprocessing/process.py",
line 229, in _bootstrap
util._run_after_forkers()
File "/Users/cartman/Sources/py3k/Lib/multiprocessing/util.py", line
138, in _run_after_forkers
util._run_after_forkers()
File "/Users/cartman/Sources/py3k/Lib/multiprocessing/util.py", line
138, in _run_after_forkers
util._run_after_forkers()
File "/Users/cartman/Sources/py3k/Lib/multiprocessing/util.py", line
138, in _run_after_forkers
items = list(_afterfork_registry.items())
items = list(_afterfork_registry.items())
File "/Users/cartman/Sources/py3k/Lib/weakref.py", line 103, in items
File "/Users/cartman/Sources/py3k/Lib/weakref.py", line 103, in items
items = list(_afterfork_registry.items())
File "/Users/cartman/Sources/py3k/Lib/weakref.py", line 103, in items
for key, wr in self.data.items():
RuntimeError: dictionary changed size during iteration
for key, wr in self.data.items():
RuntimeError: dictionary changed size during iteration
for key, wr in self.data.items():
RuntimeError: dictionary changed size during iteration |
I don't know if this is reproducible in 2.6 but I can reproduce on py3k |
Mmmh, the problem with the list(X.items()) idiom is that it's In weakref.py (line 103), by replacing: This particular error should disappear. But this doesn't say why the dictionary is mutated at all. Does |
py3k branch gives another error now, when running test_multiprocessing test test_multiprocessing failed -- Traceback (most recent call last):
File "/Users/cartman/Sources/py3k/Lib/test/test_multiprocessing.py",
line 1163, in test_remote
queue = manager2.get_queue()
File "/Users/cartman/Sources/py3k/Lib/multiprocessing/managers.py",
line 641, in temp
authkey=self._authkey, exposed=exp
File "/Users/cartman/Sources/py3k/Lib/multiprocessing/managers.py",
line 893, in AutoProxy
incref=incref)
File "/Users/cartman/Sources/py3k/Lib/multiprocessing/managers.py",
line 702, in __init__
self._incref()
File "/Users/cartman/Sources/py3k/Lib/multiprocessing/managers.py",
line 749, in _incref
dispatch(conn, None, 'incref', (self._id,))
File "/Users/cartman/Sources/py3k/Lib/multiprocessing/managers.py",
line 85, in dispatch
raise convert_to_error(kind, result)
multiprocessing.managers.RemoteError:
------------------------------------------------------------------------
---
Traceback (most recent call last):
File "/Users/cartman/Sources/py3k/Lib/multiprocessing/managers.py",
line 187, in handle_request
result = func(c, *args, **kwds)
File "/Users/cartman/Sources/py3k/Lib/multiprocessing/managers.py",
line 403, in incref
self.id_to_refcount[ident] += 1
KeyError: '7389d0' |
Ismail, that's the incref bug in bpo-3419 |
Ah cool, we might be at the end of multiprocessing problems then I guess |
Le lundi 18 août 2008 à 19:42 +0000, Ismail Donmez a écrit :
Well, not really, it should be diagnosed why the dictionary mutates in |
Actually, it's probably a duplicate of bpo-7105. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: