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

failure in Barrier tests #54446

Closed
pitrou opened this issue Oct 29, 2010 · 7 comments
Closed

failure in Barrier tests #54446

pitrou opened this issue Oct 29, 2010 · 7 comments
Assignees
Labels
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir

Comments

@pitrou
Copy link
Member

pitrou commented Oct 29, 2010

BPO 10237
Nosy @ronaldoussoren, @pitrou, @kristjanvalur

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/kristjanvalur'
closed_at = <Date 2011-03-15.04:46:13.684>
created_at = <Date 2010-10-29.22:25:38.124>
labels = ['tests', 'library']
title = 'failure in Barrier tests'
updated_at = <Date 2011-03-15.04:46:13.683>
user = 'https://github.com/pitrou'

bugs.python.org fields:

activity = <Date 2011-03-15.04:46:13.683>
actor = 'kristjan.jonsson'
assignee = 'kristjan.jonsson'
closed = True
closed_date = <Date 2011-03-15.04:46:13.684>
closer = 'kristjan.jonsson'
components = ['Library (Lib)', 'Tests']
creation = <Date 2010-10-29.22:25:38.124>
creator = 'pitrou'
dependencies = []
files = []
hgrepos = []
issue_num = 10237
keywords = []
message_count = 7.0
messages = ['119942', '119959', '119980', '120012', '120033', '130877', '130954']
nosy_count = 4.0
nosy_names = ['ixokai', 'ronaldoussoren', 'pitrou', 'kristjan.jonsson']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'needs patch'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue10237'
versions = ['Python 3.2']

@pitrou
Copy link
Member Author

pitrou commented Oct 29, 2010

A buildbot has shows occasional failures in the Barrier tests:

[299/349] test_threading
[39130 refs]
[39501 refs]
[39501 refs]
[39491 refs]
[39499 refs]
Unhandled exception in thread started by <function task at 0x45e4df54>
Traceback (most recent call last):
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 37, in task
    f()
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 704, in f
    i = self.barrier.wait()
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 441, in wait
    self._enter() # Block while the barrier drains.
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 465, in _enter
    raise BrokenBarrierError
threading.BrokenBarrierError
Unhandled exception in thread started by <function task at 0x45e4df54>
Traceback (most recent call last):
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 37, in task
    f()
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 704, in f
    i = self.barrier.wait()
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 441, in wait
    self._enter() # Block while the barrier drains.
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 465, in _enter
    raise BrokenBarrierError
threading.BrokenBarrierError
Unhandled exception in thread started by <function task at 0x45e4df54>
Traceback (most recent call last):
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 37, in task
    f()
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 704, in f
    i = self.barrier.wait()
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 441, in wait
    self._enter() # Block while the barrier drains.
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 465, in _enter
    raise BrokenBarrierError
threading.BrokenBarrierError
Unhandled exception in thread started by <function task at 0x45e4df54>
Traceback (most recent call last):
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 37, in task
    f()
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 704, in f
    i = self.barrier.wait()
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 441, in wait
    self._enter() # Block while the barrier drains.
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 465, in _enter
    raise BrokenBarrierError
threading.BrokenBarrierError
test test_threading failed -- Traceback (most recent call last):
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 720, in test_reset
    self.run_threads(f)
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 615, in run_threads
    f()
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 704, in f
    i = self.barrier.wait()
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 450, in wait
    self._wait(timeout)
  File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 489, in _wait
    raise BrokenBarrierError
threading.BrokenBarrierError

@pitrou pitrou added stdlib Python modules in the Lib dir tests Tests in the Lib/test dir labels Oct 29, 2010
@kristjanvalur
Copy link
Mannequin

kristjanvalur mannequin commented Oct 30, 2010

This is a timeout issue, probably encountered on a slow machine.
Checked in revision 85964 increasing the default timeout to cater to slower machines.

However, I also see that the timeout mechanism used by barrier isn't very robust. I'll submit a patch with a suggested change soon.

@pitrou
Copy link
Member Author

pitrou commented Oct 30, 2010

I also get a failure here:

======================================================================
FAIL: test_default_timeout (test.test_threading.BarrierTests)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/antoine/py3k/__svn__/Lib/test/lock_tests.py", line 784, in test_default_timeout
    self.run_threads(f)
  File "/home/antoine/py3k/__svn__/Lib/test/lock_tests.py", line 615, in run_threads
    f()
  File "/home/antoine/py3k/__svn__/Lib/test/lock_tests.py", line 783, in f
    self.assertRaises(threading.BrokenBarrierError, self.barrier.wait)
AssertionError: BrokenBarrierError not raised by wait

@ixokai
Copy link
Mannequin

ixokai mannequin commented Oct 30, 2010

FWIW, my snow leopard slave isn't slow at all so I doubt there's a timeout related to machine speed going on here, as its failing thus:

test test_threading failed -- Traceback (most recent call last):
  File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/lock_tests.py", line 784, in test_default_timeout
    self.run_threads(f)
  File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/lock_tests.py", line 615, in run_threads
    f()
  File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/lock_tests.py", line 783, in f
    self.assertRaises(threading.BrokenBarrierError, self.barrier.wait)
AssertionError: BrokenBarrierError not raised by wait

Its actually a really spammy sort of failure with a lot of errors before it, which may or may not shed more light on the situation: http://www.python.org/dev//buildbot/3.x.stable/builders/x86%20Snow%20Leopard%203.x/builds/267/steps/test/logs/stdio

This was r85883, so after the increase in the timeout.

@kristjanvalur
Copy link
Mannequin

kristjanvalur mannequin commented Oct 31, 2010

Silly me, changing the default timeout invalidated the unittest for it.
Fixed in revision 86018

@ronaldoussoren
Copy link
Contributor

Is this issue still valid? The last comment seems to indicate that the issue is fixed and could be closed.

@kristjanvalur
Copy link
Mannequin

kristjanvalur mannequin commented Mar 15, 2011

Closing this as fixed.

@kristjanvalur kristjanvalur mannequin closed this as completed Mar 15, 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
Projects
None yet
Development

No branches or pull requests

2 participants