Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue14727] test_multiprocessing failure under Linux

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

May 5, 2012, 2:13 AM

Post #1 of 7 (56 views)
Permalink
[issue14727] test_multiprocessing failure under Linux

New submission from Vinay Sajip <vinay_sajip [at] yahoo>:

I've recently started seeing this failure repeatably on Linux (Ubuntu Jaunty):

[195/364] test_multiprocessing
Process Process-133:
Traceback (most recent call last):
File "/home/vinay/projects/python/default/Lib/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/vinay/projects/python/default/Lib/multiprocessing/process.py", line 95, in run
self._target(*self._args, **self._kwargs)
File "/home/vinay/projects/python/default/Lib/test/test_multiprocessing.py", line 2005, in _remote
client.connect(address)
ConnectionRefusedError: [Errno 111] Connection refused
/home/vinay/projects/python/default/Lib/multiprocessing/process.py:274: ResourceWarning: unclosed <socket.socket object, fd=15, family=2, type=1, proto=0>
traceback.print_exc()

----------
components: Tests
messages: 159981
nosy: sbt, vinay.sajip
priority: normal
severity: normal
status: open
title: test_multiprocessing failure under Linux
type: behavior
versions: Python 3.3

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14727>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 5, 2012, 3:50 AM

Post #2 of 7 (54 views)
Permalink
[issue14727] test_multiprocessing failure under Linux [In reply to]

Vinay Sajip <vinay_sajip [at] yahoo> added the comment:

Some more information: after the above-described appears, the test hangs. When interrupted with a Ctrl+C, this is displayed:

^CProcess PoolWorker-104:
Process PoolWorker-102:
Process PoolWorker-105:1:
Process PoolWorker-101:
Process PoolWorker-105:4:
Process PoolWorker-105:3:
Process PoolWorker-105:2:
Process PoolWorker-103:
Traceback (most recent call last):
File "/home/vinay/projects/python/default/Lib/multiprocessing/process.py", line 258, in _bootstrap
Traceback (most recent call last):
File "/home/vinay/projects/python/default/Lib/multiprocessing/process.py", line 258, in _bootstrap
Traceback (most recent call last):
File "/home/vinay/projects/python/default/Lib/multiprocessing/process.py", line 258, in _bootstrap
Traceback (most recent call last):
File "/home/vinay/projects/python/default/Lib/multiprocessing/process.py", line 258, in _bootstrap
Traceback (most recent call last):
File "/home/vinay/projects/python/default/Lib/multiprocessing/process.py", line 258, in _bootstrap
Traceback (most recent call last):
File "/home/vinay/projects/python/default/Lib/multiprocessing/process.py", line 258, in _bootstrap
Traceback (most recent call last):
File "/home/vinay/projects/python/default/Lib/multiprocessing/process.py", line 258, in _bootstrap
Traceback (most recent call last):
File "/home/vinay/projects/python/default/Lib/multiprocessing/process.py", line 258, in _bootstrap
Process Process-132:
Traceback (most recent call last):
File "/home/vinay/projects/python/default/Lib/multiprocessing/process.py", line 258, in _bootstrap
Warning -- threading._dangling was modified by test_multiprocessing
Warning -- multiprocessing.process._dangling was modified by test_multiprocessing
self.run()
File "/home/vinay/projects/python/default/Lib/multiprocessing/process.py", line 95, in run
self._target(*self._args, **self._kwargs)
File "/home/vinay/projects/python/default/Lib/test/test_multiprocessing.py", line 1989, in _listener
new_conn, addr = l.accept()
File "/home/vinay/projects/python/default/Lib/socket.py", line 135, in accept
fd, addr = self._accept()
KeyboardInterrupt
/home/vinay/projects/python/default/Lib/multiprocessing/process.py:274: ResourceWarning: unclosed <socket.socket object, fd=17, family=2, type=1, proto=0>
traceback.print_exc()
test test_multiprocessing crashed -- Traceback (most recent call last):
File "/home/vinay/projects/python/default/Lib/test/test_multiprocessing.py", line 2825, in test_main
run(suite)
File "/home/vinay/projects/python/default/Lib/test/support.py", line 1407, in run_unittest
_run_suite(suite)
File "/home/vinay/projects/python/default/Lib/test/support.py", line 1373, in _run_suite
result = runner.run(suite)
File "/home/vinay/projects/python/default/Lib/test/support.py", line 1272, in run
test(result)
File "/home/vinay/projects/python/default/Lib/unittest/suite.py", line 67, in __call__
return self.run(*args, **kwds)
File "/home/vinay/projects/python/default/Lib/unittest/suite.py", line 105, in run
test(result)
File "/home/vinay/projects/python/default/Lib/unittest/suite.py", line 67, in __call__
return self.run(*args, **kwds)
File "/home/vinay/projects/python/default/Lib/unittest/suite.py", line 105, in run
test(result)
File "/home/vinay/projects/python/default/Lib/unittest/suite.py", line 67, in __call__
return self.run(*args, **kwds)
File "/home/vinay/projects/python/default/Lib/unittest/suite.py", line 105, in run
test(result)
File "/home/vinay/projects/python/default/Lib/unittest/case.py", line 492, in __call__
return self.run(*args, **kwds)
File "/home/vinay/projects/python/default/Lib/unittest/case.py", line 440, in run
self._executeTestPart(testMethod, outcome, isTest=True)
File "/home/vinay/projects/python/default/Lib/unittest/case.py", line 385, in _executeTestPart
function()
File "/home/vinay/projects/python/default/Lib/test/test_multiprocessing.py", line 2038, in test_pickling
new_conn = lconn.recv()
File "/home/vinay/projects/python/default/Lib/multiprocessing/connection.py", line 252, in recv
buf = self._recv_bytes()
File "/home/vinay/projects/python/default/Lib/multiprocessing/connection.py", line 398, in _recv_bytes
buf = self._recv(4)
File "/home/vinay/projects/python/default/Lib/multiprocessing/connection.py", line 377, in _recv
chunk = read(handle, remaining)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/vinay/projects/python/default/Lib/multiprocessing/managers.py", line 729, in _callmethod
conn = self._tls.connection
AttributeError: 'ForkAwareLocal' object has no attribute 'connection'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "Lib/test/regrtest.py", line 1237, in runtest_inner
File "/home/vinay/projects/python/default/Lib/test/test_multiprocessing.py", line 2829, in test_main
ManagerMixin.pool.terminate()
File "<string>", line 2, in terminate
File "/home/vinay/projects/python/default/Lib/multiprocessing/managers.py", line 733, in _callmethod
self._connect()
File "/home/vinay/projects/python/default/Lib/multiprocessing/managers.py", line 720, in _connect
conn = self._Client(self._token.address, authkey=self._authkey)
File "/home/vinay/projects/python/default/Lib/multiprocessing/connection.py", line 469, in Client
c = SocketClient(address)
File "/home/vinay/projects/python/default/Lib/multiprocessing/connection.py", line 585, in SocketClient
s.connect(address)
FileNotFoundError: [Errno 2] No such file or directory

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14727>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 8, 2012, 8:51 AM

Post #3 of 7 (48 views)
Permalink
[issue14727] test_multiprocessing failure under Linux [In reply to]

Richard Oudkerk <shibturn [at] gmail> added the comment:

> I've recently started seeing this failure repeatably on Linux (Ubuntu
> Jaunty):

The test is newly enabled. Does "repeatably" mean you always get the failure?

I have not seen any failures on the Linux buildbots.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14727>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 8, 2012, 12:13 PM

Post #4 of 7 (50 views)
Permalink
[issue14727] test_multiprocessing failure under Linux [In reply to]

Vinay Sajip <vinay_sajip [at] yahoo> added the comment:

> Does "repeatably" mean you always get the failure?

Yes, every time. The first symptom is always a ConnectionRefusedError.

> I have not seen any failures on the Linux buildbots.

I'm running a fairly old version of Ubuntu, which might be relevant, or it may be that the connection is being refused because it's clashing with something else just on the test machine. In general this machine is just used for Python builds and tests, but I do run some services (e.g. Jenkins). Or it might be a race condition - the test machine is a VM and does have somewhat different timing characteristics from those of real hardware.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14727>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 8, 2012, 2:28 PM

Post #5 of 7 (48 views)
Permalink
[issue14727] test_multiprocessing failure under Linux [In reply to]

Roundup Robot <devnull [at] psf> added the comment:

New changeset 3d900c9641c9 by Richard Oudkerk in branch 'default':
Issue #14727: Fix race in test_multiprocessing
http://hg.python.org/cpython/rev/3d900c9641c9

----------
nosy: +python-dev

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14727>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 8, 2012, 2:57 PM

Post #6 of 7 (48 views)
Permalink
[issue14727] test_multiprocessing failure under Linux [In reply to]

Richard Oudkerk <shibturn [at] gmail> added the comment:

I found a race where a connection attempt could happen before the listening socket's listen() method was called.

Vinay, could you update and try again please.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14727>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

May 8, 2012, 3:14 PM

Post #7 of 7 (48 views)
Permalink
[issue14727] test_multiprocessing failure under Linux [In reply to]

Vinay Sajip <vinay_sajip [at] yahoo> added the comment:

test_multiprocessing now passes. Thanks for the quick turnaround.

----------
assignee: -> sbt
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue14727>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.