New submission from Ryan Leslie <ryle...@gmail.com>: Terminal 1: Python 2.6.1 (r261:67515, Apr 2 2009, 18:25:55) [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from multiprocessing.managers import SyncManager >>> manager = SyncManager(authkey="mykey") >>> manager.start() >>> queue = manager.Queue() >>> import pickle >>> pickle.dump(queue, open("myqueue.pkl", "w")) >>>
Terminal 2: Python 2.6.1 (r261:67515, Apr 2 2009, 18:25:55) [GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> socket.setdefaulttimeout(30) >>> import multiprocessing, pickle >>> multiprocessing.current_process().authkey = "mykey" >>> queue = pickle.load(open("myqueue.pkl")) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "python2.6/pickle.py", line 1370, in load return Unpickler(file).load() File "python2.6/pickle.py", line 858, in load dispatch[key](self) File "python2.6/pickle.py", line 1133, in load_reduce value = func(*args) File "python2.6/multiprocessing/managers.py", line 845, in RebuildProxy return func(token, serializer, incref=incref, **kwds) File "python2.6/multiprocessing/managers.py", line 894, in AutoProxy incref=incref) File "python2.6/multiprocessing/managers.py", line 700, in __init__ self._incref() File "python2.6/multiprocessing/managers.py", line 749, in _incref conn = self._Client(self._token.address, authkey=self._authkey) File "python2.6/multiprocessing/connection.py", line 140, in Client answer_challenge(c, authkey) File "python2.6/multiprocessing/connection.py", line 376, in answer_challenge response = connection.recv_bytes(256) # reject large message IOError: [Errno 11] Resource temporarily unavailable >>> This works as expected without socket.setdefaulttimeout(). However, the timeout is useful since if the listening process on terminal 1 goes to sleep, e.g. ^Z, it would avoid blocking. I suspect the cause is similar to http://bugs.python.org/issue976613 ---------- components: Library (Lib) messages: 88040 nosy: ryles severity: normal status: open title: socket.setdefaulttimeout affecting multiprocessing Manager versions: Python 2.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6056> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com