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: mysteriously failing test_bsddb3 threading test in other threads
Type: behavior Stage:
Components: Tests Versions: Python 2.7, Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: jcea Nosy List: christian.heimes, flox, gregory.p.smith, jcea, pitrou
Priority: normal Keywords:

Created on 2007-11-06 12:29 by christian.heimes, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (11)
msg57161 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-06 12:29
Exception in thread writer 2:
Traceback (most recent call last):
  File "/home/heimes/dev/python/py3k-pep3137/Lib/threading.py", line
485, in _bootstrap_inner
    self.run()
  File "/home/heimes/dev/python/py3k-pep3137/Lib/threading.py", line
445, in run
    self._target(*self._args, **self._kwargs)
  File
"/home/heimes/dev/python/py3k-pep3137/Lib/bsddb/test/test_thread.py",
line 80, in writerThread
    self._writerThread(*args, **kwargs)
  File
"/home/heimes/dev/python/py3k-pep3137/Lib/bsddb/test/test_thread.py",
line 254, in _writerThread
    self.assertEqual(data, self.makeData(key))
  File "/home/heimes/dev/python/py3k-pep3137/Lib/unittest.py", line 325,
in failUnlessEqual
    raise self.failureException(msg or '%r != %r' % (first, second))
AssertionError: None != b'2226-2226-2226-2226-2226'

Exception in thread writer 1:
Traceback (most recent call last):
  File "/home/heimes/dev/python/py3k-pep3137/Lib/threading.py", line
485, in _bootstrap_inner
    self.run()
  File "/home/heimes/dev/python/py3k-pep3137/Lib/threading.py", line
445, in run
    self._target(*self._args, **self._kwargs)
  File
"/home/heimes/dev/python/py3k-pep3137/Lib/bsddb/test/test_thread.py",
line 80, in writerThread
    self._writerThread(*args, **kwargs)
  File
"/home/heimes/dev/python/py3k-pep3137/Lib/bsddb/test/test_thread.py",
line 269, in _writerThread
    self.assertEqual(data, self.makeData(key))
  File "/home/heimes/dev/python/py3k-pep3137/Lib/unittest.py", line 325,
in failUnlessEqual
    raise self.failureException(msg or '%r != %r' % (first, second))
AssertionError: None != b'1007-1007-1007-1007-1007'

Exception in thread writer 0:
Traceback (most recent call last):
  File "/home/heimes/dev/python/py3k-pep3137/Lib/threading.py", line
485, in _bootstrap_inner
    self.run()
  File "/home/heimes/dev/python/py3k-pep3137/Lib/threading.py", line
445, in run
    self._target(*self._args, **self._kwargs)
  File
"/home/heimes/dev/python/py3k-pep3137/Lib/bsddb/test/test_thread.py",
line 80, in writerThread
    self._writerThread(*args, **kwargs)
  File
"/home/heimes/dev/python/py3k-pep3137/Lib/bsddb/test/test_thread.py",
line 269, in _writerThread
    self.assertEqual(data, self.makeData(key))
  File "/home/heimes/dev/python/py3k-pep3137/Lib/unittest.py", line 325,
in failUnlessEqual
    raise self.failureException(msg or '%r != %r' % (first, second))
AssertionError: None != b'0004-0004-0004-0004-0004'

Ubuntu Linux 7.10, i386, db 4.4.20
msg57162 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-06 12:49
Correction:

The unit test isn't marked as failing but the failing assertion don't
look good.
msg57167 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-11-06 17:48
I've seen this too occasionally.  Greg, can you look at this?
msg57180 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2007-11-06 21:11
yeah i've seen this at random times as well.  I don't believe its
related to py3k or the pep3137 branch at all, i believe seen it on trunk
but its rare.

For reference, what platform (OS) and BerkeleyDB version did you build
python with when this happened?

The reason the test doesn't fail is that these exceptions occur in
worker threads.  The bsddb thread tests could clearly use some work.
msg57181 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-06 21:16
I've mentioned the platform and db version in the last line. You surely
have missed it:

Ubuntu Linux 7.10, i386, db 4.4.20
msg63655 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-03-17 15:54
I updated the subject to better reflect what this is.

My guess is that the test code itself has issues and is asserting
something that isn't quite guaranteed to be true.
msg66978 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-05-17 06:55
does this still apply to the current test suite Jesus?
msg71246 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-08-16 22:42
This still happens regularly on buildbots. Just today:
http://www.python.org/dev/buildbot/3.0.stable/amd64%20gentoo%203.0/builds/925/step-test/0

The bsddb tests must be fixed so that exception raised in other threads
(especially when produced by assert* methods) cause the test to fail.
The exceptions do indicate a failure, which should be corrected rather
than ignored.
msg71256 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-08-17 01:28
agreed, that should be made to cause the test to fail.  a
failureException method that sets a flag that the main thread will
detect and fail on when exiting should do the trick.

side note:
...sadly that failure appears to be a test issue, not really a bsddb
wrapper issue...

(There are many tests in the Lib/bsddb/test/ full test suite that appear
to go overboard as far as testing a python wrapper is concerned and are
effectively tests of BerkeleyDB features themselves.  That doesn't help
our test reliability.)
msg105541 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2010-05-11 20:48
bsddb3 isn't in py3k.
msg114701 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-08-22 20:26
This issue is no longer reported since pybsddb 4.8.4 integration.
Issue #8156, revision 79285.
History
Date User Action Args
2022-04-11 14:56:28adminsetgithub: 45738
2010-09-05 00:34:16floxsetstatus: pending -> closed
2010-08-22 20:32:15gvanrossumsetstatus: open -> pending
2010-08-22 20:31:47gvanrossumsetstatus: pending -> open
nosy: - gvanrossum
2010-08-22 20:26:29floxsetstatus: open -> pending

nosy: + flox
messages: + msg114701

resolution: out of date
2010-05-11 20:48:39gregory.p.smithsetpriority: high -> normal

messages: + msg105541
versions: - Python 2.5, Python 3.1, Python 3.2
2010-05-11 20:38:20terry.reedysetversions: + Python 3.1, Python 2.7, Python 3.2, - Python 3.0
2008-08-17 01:28:15gregory.p.smithsetmessages: + msg71256
2008-08-16 22:42:16pitrousetpriority: normal -> high
nosy: + pitrou
type: behavior
messages: + msg71246
2008-05-17 06:55:53gregory.p.smithsetassignee: gregory.p.smith -> jcea
messages: + msg66978
2008-03-17 15:54:09gregory.p.smithsettitle: py3k-pep3137: failing unit test test_bsddb -> mysteriously failing test_bsddb3 threading test in other threads
messages: + msg63655
versions: + Python 2.6, Python 2.5
2008-01-29 20:42:22jceasetnosy: + jcea
2008-01-06 22:29:45adminsetkeywords: - py3k
versions: Python 3.0
2007-11-06 21:16:02christian.heimessetmessages: + msg57181
2007-11-06 21:11:54gregory.p.smithsetmessages: + msg57180
2007-11-06 17:48:52gvanrossumsetassignee: gregory.p.smith
messages: + msg57167
nosy: + gregory.p.smith
2007-11-06 12:49:08christian.heimessetmessages: + msg57162
2007-11-06 12:29:24christian.heimescreate