classification
Title: multiprocessing fails with "Invalid thread state for this thread" on 2.4 and 2.5
Type: crash Stage: needs patch
Components: Interpreter Core Versions: Python 2.5.3, Python 2.4
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, christian.heimes, jnoller
Priority: high Keywords:

Created on 2008-11-28 14:04 by christian.heimes, last changed 2008-11-28 15:09 by jnoller. This issue is now closed.

Messages (3)
msg76528 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-11-28 14:04
The multiprocessing backport to 2.4/2.5 fails with a fatal error when
the test suite is run with a debug build of Python.

PYTHONPATH="Lib/" /home/heimes/dev/python/release25-maint/python -tt -c
"from multiprocessing.tests import main; main()"
Fatal Python error: Invalid thread state for this thread
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File
"/home/heimes/dev/py/python-multiprocessing/Lib/multiprocessing/tests.py",
line 1826, in main
    test_main(unittest.TextTestRunner(verbosity=2).run)
  File
"/home/heimes/dev/py/python-multiprocessing/Lib/multiprocessing/tests.py",
line 1805, in test_main
    ManagerMixin.pool = ManagerMixin.manager.Pool(4)
  File
"/home/heimes/dev/py/python-multiprocessing/Lib/multiprocessing/managers.py",
line 637, in temp
    token, exp = self._create(typeid, *args, **kwds)
  File
"/home/heimes/dev/py/python-multiprocessing/Lib/multiprocessing/managers.py",
line 535, in _create
    conn = self._Client(self._address, authkey=self._authkey)
  File
"/home/heimes/dev/py/python-multiprocessing/Lib/multiprocessing/connection.py",
line 142, in Client
    answer_challenge(c, authkey)
  File
"/home/heimes/dev/py/python-multiprocessing/Lib/multiprocessing/connection.py",
line 373, in answer_challenge
    message = connection.recv_bytes(256)         # reject large message
EOFError
msg76533 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-11-28 14:57
Christian, to fix this, you need to backport the fix for #1683.
msg76534 - (view) Author: Jesse Noller (jnoller) * (Python committer) Date: 2008-11-28 15:09
As ben mentioned, this is already fixed in core. See issue 1683 - this is 
only a problem when running in 2.5/2.4
History
Date User Action Args
2008-11-28 15:09:36jnollersetstatus: open -> closed
resolution: duplicate
messages: + msg76534
2008-11-28 14:57:22benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg76533
2008-11-28 14:04:51christian.heimescreate