Skip to content
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

test_subprocess failure #55713

Closed
pitrou opened this issue Mar 14, 2011 · 9 comments
Closed

test_subprocess failure #55713

pitrou opened this issue Mar 14, 2011 · 9 comments
Assignees
Labels
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@pitrou
Copy link
Member

pitrou commented Mar 14, 2011

BPO 11504
Nosy @pitrou, @rnk

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:

assignee = 'https://github.com/rnk'
closed_at = <Date 2011-06-03.09:15:25.559>
created_at = <Date 2011-03-14.17:13:58.519>
labels = ['tests', 'type-bug', 'library']
title = 'test_subprocess failure'
updated_at = <Date 2011-06-03.09:15:25.549>
user = 'https://github.com/pitrou'

bugs.python.org fields:

activity = <Date 2011-06-03.09:15:25.549>
actor = 'rosslagerwall'
assignee = 'rnk'
closed = True
closed_date = <Date 2011-06-03.09:15:25.559>
closer = 'rosslagerwall'
components = ['Library (Lib)', 'Tests']
creation = <Date 2011-03-14.17:13:58.519>
creator = 'pitrou'
dependencies = []
files = []
hgrepos = []
issue_num = 11504
keywords = ['buildbot']
message_count = 9.0
messages = ['130859', '130860', '130861', '130868', '130929', '131093', '131177', '131179', '137508']
nosy_count = 3.0
nosy_names = ['pitrou', 'rnk', 'rosslagerwall']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'needs patch'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue11504'
versions = ['Python 3.3']

@pitrou
Copy link
Member Author

pitrou commented Mar 14, 2011

http://www.python.org/dev/buildbot/all/builders/x86%20debian%20parallel%203.x/builds/1678/steps/test/logs/stdio

======================================================================
FAIL: test_check_output_timeout (test.test_subprocess.ProcessTestCase)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/test/test_subprocess.py", line 133, in test_check_output_timeout
    self.assertEqual(c.exception.output, b'BDFL')
AssertionError: b'' != b'BDFL'

======================================================================
FAIL: test_check_output_timeout (test.test_subprocess.ProcessTestCasePOSIXPurePython)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/test/test_subprocess.py", line 133, in test_check_output_timeout
    self.assertEqual(c.exception.output, b'BDFL')
AssertionError: b'' != b'BDFL'

======================================================================
FAIL: test_check_output_timeout (test.test_subprocess.ContextManagerTests)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/test/test_subprocess.py", line 133, in test_check_output_timeout
    self.assertEqual(c.exception.output, b'BDFL')
AssertionError: b'' != b'BDFL'

@pitrou pitrou added stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Mar 14, 2011
@rnk
Copy link
Mannequin

rnk mannequin commented Mar 14, 2011

I can't reproduce this. I've tested on:
64-bit Linux (Debian lenny)
OS X 10.6
Windows Vista 32-bit

It seems reasonable to me that the interpreter should be able to
initialize and write to stdout in less than half a second, but it
seems to be failing consistently on that builder. I'd really rather
not make the timeout longer, since it will increase testing time for
everyone. Is there something about that builder that makes
initialization take longer?

@pitrou
Copy link
Member Author

pitrou commented Mar 14, 2011

It seems reasonable to me that the interpreter should be able to
initialize and write to stdout in less than half a second

Well, we have some very slow buildbots and others which seem quite loaded too.
(this one should be very fast but perhaps there's some other stuff going on in the background)

In my experience such a low timeout value may be enough for light in-process stuff such as lock.acquire() or select(), but if you spawn a whole new process you should let the system breathe a bit more. I know this also unfortunately increases the test runtime, but try to bump it up to at least 1.5 seconds.

@rnk
Copy link
Mannequin

rnk mannequin commented Mar 14, 2011

I increased the timeout in [fd2b3eac6756] and the buildbot is passing now:
http://python.org/dev/buildbot/all/builders/x86%20debian%20parallel%203.x

@rnk rnk mannequin closed this as completed Mar 14, 2011
@pitrou
Copy link
Member Author

pitrou commented Mar 14, 2011

There seems to be another kind, sporadic, of failure on the same buildbot:

test test_subprocess failed -- Traceback (most recent call last):
  File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/test/test_subprocess.py", line 626, in test_wait_timeout
    self.assertEqual(p.wait(timeout=2), 0)
  File "/home2/buildbot2/slave/3.x.loewis-parallel/build/Lib/subprocess.py", line 1489, in wait
    raise TimeoutExpired(self.args)
subprocess.TimeoutExpired: <unprintable TimeoutExpired object>

http://www.python.org/dev/buildbot/all/builders/x86%20debian%20parallel%203.x/builds/1683/steps/test/logs/stdio

@pitrou pitrou reopened this Mar 14, 2011
@pitrou
Copy link
Member Author

pitrou commented Mar 16, 2011

Other failures on the Sparc debian buildbot (which is quite slow):

======================================================================
ERROR: test_wait_timeout (test.test_subprocess.ProcessTestCase)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/test/test_subprocess.py", line 630, in test_wait_timeout
    self.assertEqual(p.wait(timeout=2), 0)
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/subprocess.py", line 1489, in wait
    raise TimeoutExpired(self.args)
subprocess.TimeoutExpired: <unprintable TimeoutExpired object>

======================================================================
ERROR: test_wait_timeout (test.test_subprocess.ProcessTestCasePOSIXPurePython)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/test/test_subprocess.py", line 630, in test_wait_timeout
    self.assertEqual(p.wait(timeout=2), 0)
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/subprocess.py", line 1489, in wait
    raise TimeoutExpired(self.args)
subprocess.TimeoutExpired: <unprintable TimeoutExpired object>

======================================================================
ERROR: test_wait_timeout (test.test_subprocess.ProcessTestCaseNoPoll)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/test/test_subprocess.py", line 630, in test_wait_timeout
    self.assertEqual(p.wait(timeout=2), 0)
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/subprocess.py", line 1489, in wait
    raise TimeoutExpired(self.args)
subprocess.TimeoutExpired: <unprintable TimeoutExpired object>

======================================================================
ERROR: test_wait_timeout (test.test_subprocess.ContextManagerTests)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/test/test_subprocess.py", line 630, in test_wait_timeout
    self.assertEqual(p.wait(timeout=2), 0)
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/subprocess.py", line 1489, in wait
    raise TimeoutExpired(self.args)
subprocess.TimeoutExpired: <unprintable TimeoutExpired object>

======================================================================
FAIL: test_check_output_timeout (test.test_subprocess.ProcessTestCase)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/test/test_subprocess.py", line 135, in test_check_output_timeout
    self.assertEqual(c.exception.output, b'BDFL')
AssertionError: b'' != b'BDFL'

======================================================================
FAIL: test_check_output_timeout (test.test_subprocess.ProcessTestCasePOSIXPurePython)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/test/test_subprocess.py", line 135, in test_check_output_timeout
    self.assertEqual(c.exception.output, b'BDFL')
AssertionError: b'' != b'BDFL'

======================================================================
FAIL: test_check_output_timeout (test.test_subprocess.ProcessTestCaseNoPoll)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/test/test_subprocess.py", line 135, in test_check_output_timeout
    self.assertEqual(c.exception.output, b'BDFL')
AssertionError: b'' != b'BDFL'

======================================================================
FAIL: test_check_output_timeout (test.test_subprocess.ContextManagerTests)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/test/test_subprocess.py", line 135, in test_check_output_timeout
    self.assertEqual(c.exception.output, b'BDFL')
AssertionError: b'' != b'BDFL'

http://www.python.org/dev/buildbot/all/builders/sparc%20Debian%203.x/builds/119

@rnk
Copy link
Mannequin

rnk mannequin commented Mar 16, 2011

:( Thanks for spotting these. Is there an easier way for me to be notified if these particular tests fail? Some of these are not in the "stable" builder set.

Sorry to leave the builders broken for so long. I just upped the timeouts to 3 seconds. I guess the issue is that the builders are slow and also heavily loaded, so processes just don't get to start up as quick as we'd like them too.

It might be worth adding some plumbing to have the child process signal the parent when it's initialized, but that seems like it's going to add a whole bunch more complexity to the test.

Will close in a few days if there are no more broken buildbots.

@pitrou
Copy link
Member Author

pitrou commented Mar 16, 2011

Thanks for spotting these. Is there an easier way for me to be
notified if these particular tests fail?

Not really. There is no infrastructure to notify test failures to
specific e-mails depending on which test failed.

Some of these are not in the "stable" builder set.

Indeed, because they are not stable enough :)
But they can all be viewed here:
http://www.python.org/dev/buildbot/all/waterfall?category=3.x.stable&category=3.x.unstable
Also, you can use bbreport to get a convenient view from the command
line: http://code.google.com/p/bbreport/

Thank you!

@rosslagerwall
Copy link
Mannequin

rosslagerwall mannequin commented Jun 3, 2011

All stable buildbots appear to be green, so closing...

@rosslagerwall rosslagerwall mannequin closed this as completed Jun 3, 2011
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant