This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bbutler
Recipients bbutler
Date 2009-02-05.01:52:49
SpamBayes Score 1.9629298e-12
Marked as misclassified No
Message-id <>
(Note: This issue only happens on linux - on Windows things work fine.)

Please see the attached script.

The script creates a process (TestProcess()). That process runs and
creates a sub-process (TestSubProcess()). When TestSubProcess tries to
access a Queue created by TestProcess, the .get() call fails with the
following stack trace:

Process Process-1:1:
Traceback (most recent call last):
  File "/opt/python2.6/lib/python2.6/multiprocessing/", line
231, in _bootstrap
  File "/opt/python2.6/lib/python2.6/multiprocessing/", line
88, in run
    self._target(*self._args, **self._kwargs)
  File "", line 7, in TestSubProcess
    item = q.get()                        # Fails with IOError if queue
created in TestProcess
  File "/opt/python2.6/lib/python2.6/multiprocessing/", line
91, in get
    res = self._recv()
IOError: [Errno 9] Bad file descriptor

If the same queue is created by main (top level), TestSubProcess
accesses it with no errors. This behavior can be stimulated by
uncommenting the q = multiprocessing.Queue() line in TestProcess.

Tested using:
Python 2.6.1 (r261:67517, Dec  4 2008, 16:51:00) [MSC v.1500 32 bit
(Intel)] on win32
(Installed using binary installer, windows XPSP2)

*No problems*

Python 2.6.1 (r261:67515, Jan  6 2009, 15:23:19) [GCC 4.2.4 (Ubuntu
4.2.4-1ubuntu3)] on linux2
(Compiled from source due to ubuntu 8.04 (Hardy) not having python2.6 yet)

*Fails on q.get() in TestSubProcess*
Date User Action Args
2009-02-05 01:52:53bbutlersetrecipients: + bbutler
2009-02-05 01:52:53bbutlersetmessageid: <>
2009-02-05 01:52:52bbutlerlinkissue5155 messages
2009-02-05 01:52:50bbutlercreate