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.

classification
Title: failure in Barrier tests
Type: Stage: needs patch
Components: Library (Lib), Tests Versions: Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: kristjan.jonsson Nosy List: ixokai, kristjan.jonsson, pitrou, ronaldoussoren
Priority: normal Keywords:

Created on 2010-10-29 22:25 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (7)
msg119942 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-10-29 22:25
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
msg119959 - (view) Author: Kristján Valur Jónsson (kristjan.jonsson) * (Python committer) Date: 2010-10-30 05:17
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.
msg119980 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-10-30 13:03
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
msg120012 - (view) Author: Stephen Hansen (ixokai) (Python triager) Date: 2010-10-30 20:09
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.
msg120033 - (view) Author: Kristján Valur Jónsson (kristjan.jonsson) * (Python committer) Date: 2010-10-31 03:01
Silly me, changing the default timeout invalidated the unittest for it.
Fixed in revision 86018
msg130877 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2011-03-14 19:09
Is this issue still valid? The last comment seems to indicate that the issue is fixed and could be closed.
msg130954 - (view) Author: Kristján Valur Jónsson (kristjan.jonsson) * (Python committer) Date: 2011-03-15 04:46
Closing this as fixed.
History
Date User Action Args
2022-04-11 14:57:08adminsetgithub: 54446
2011-03-15 04:46:13kristjan.jonssonsetstatus: open -> closed

messages: + msg130954
resolution: fixed
nosy: ixokai, ronaldoussoren, pitrou, kristjan.jonsson
2011-03-14 19:09:58ronaldoussorensetnosy: + ronaldoussoren
messages: + msg130877
2010-10-31 03:01:45kristjan.jonssonsetmessages: + msg120033
2010-10-30 20:10:00ixokaisetnosy: + ixokai
messages: + msg120012
2010-10-30 13:03:47pitrousetmessages: + msg119980
2010-10-30 05:17:58kristjan.jonssonsetmessages: + msg119959
2010-10-29 22:25:38pitroucreate