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: [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7
Type: Stage: resolved
Components: Library (Lib), Tests, Windows Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: paul.moore, serhiy.storchaka, steve.dower, tim.golden, vstinner, zach.ware
Priority: normal Keywords:

Created on 2017-07-04 15:20 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 2584 merged serhiy.storchaka, 2017-07-05 09:37
PR 2840 merged vstinner, 2017-07-24 09:36
Messages (11)
msg297676 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-07-04 15:20
See also bpo-30778: "test_bsddb3 crash on x86 Windows XP 2.7".

http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%202.7/builds/40/steps/test/logs/stdio

1:07:30 [145/403/1] test_bsddb3 failed -- running: test_weakref (4038 sec), test_io (2487 sec), test_mmap (1406 sec)
test_bsddb3 still working, be patient...
  test_bsddb3 still working, be patient...
  test_bsddb3 still working, be patient...
Berkeley DB 4.7.25: (May 15, 2008)
Test path prefix:  d:\temp\z-test_bsddb3-5156
XXX: timeout happened beforestartup was confirmed - see issue 3892
test test_bsddb3 failed -- Traceback (most recent call last):
  File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\bsddb\test\test_replication.py", line 384, in test01_basic_replication
    self.assertTrue(time.time()<timeout)
AssertionError: False is not true
msg297697 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-07-05 04:16
First at all replace self.assertTrue(time.time()<timeout) with self.assertLess(time.time(), timeout).

There was a large set of patches that did this globally for all tests (issue16510 and subissues), but it was mostly rejected (only some parts were merged, and often only into master).
msg297712 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-07-05 08:00
"First at all replace self.assertTrue(time.time()<timeout) with
self.assertLess(time.time(), timeout). There was a large set of
patches that did this globally for all tests (issue16510 and
subissues), but it was mostly rejected (only some parts were merged,
and often only into master)."

Can you please propose a PR for that Serhiy, please?
msg297719 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-07-05 09:09
> Can you please propose a PR for that Serhiy, please?

Will do.
msg297726 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-07-05 12:09
New changeset 2b92cd3b16ba83aaaf11a91a19845ca6804663d9 by Victor Stinner (Serhiy Storchaka) in branch '2.7':
bpo-30850: Use specialized assert methods in bsddb tests. (#2584)
https://github.com/python/cpython/commit/2b92cd3b16ba83aaaf11a91a19845ca6804663d9
msg298466 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-07-17 08:57
http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%202.7/builds/50

...
test03_ThreadedTransactions (bsddb.test.test_thread.HashThreadedTransactions) ... ok
test03_ThreadedTransactions (bsddb.test.test_thread.BTreeThreadedNoWaitTransactions) ... ok
test03_ThreadedTransactions (bsddb.test.test_thread.HashThreadedNoWaitTransactions) ... ok
testCheckElapsedTime (test.test_bsddb3.TimingCheck) ... beginning 6 repetitions
123456
......
Berkeley DB 4.7.25: (May 15, 2008)
Test path prefix:  d:\temp\z-test_bsddb3-4292
XXX: timeout happened beforestartup was confirmed - see issue 3892
test test_bsddb3 failed -- Traceback (most recent call last):
  File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\bsddb\test\test_lock.py", line 132, in test04_lock_timeout2
    self.assertGreaterEqual(end_time-start_time, 0.0999)
AssertionError: 0.09599995613098145 not greater than or equal to 0.0999

ok

======================================================================
FAIL: test04_lock_timeout2 (bsddb.test.test_lock.LockingTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\bsddb\test\test_lock.py", line 132, in test04_lock_timeout2
    self.assertGreaterEqual(end_time-start_time, 0.0999)
AssertionError: 0.09599995613098145 not greater than or equal to 0.0999
msg298945 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-07-24 09:25
x86 Windows XP 2.7:

http://buildbot.python.org/all/builders/x86%20Windows%20XP%202.7/builds/240/steps/test/logs/stdio

======================================================================
FAIL: test04_lock_timeout2 (bsddb.test.test_lock.LockingTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\bsddb\test\test_lock.py", line 132, in test04_lock_timeout2
    self.assertGreaterEqual(end_time-start_time, 0.0999)
AssertionError: 0.05800008773803711 not greater than or equal to 0.0999
msg298946 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-07-24 09:37
I wrote https://github.com/python/cpython/pull/2840 to tolerate only 50 ms on Windows, whereas 100 ms are expected (the test expects 99 ms or greater).
msg298956 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-07-24 11:02
New changeset 0fc940a09ae6636e78f94ecf6436b8de14bd1c45 by Victor Stinner in branch '2.7':
test_bsddb3 tolerates smaller timeout on Windows (#2840)
https://github.com/python/cpython/commit/0fc940a09ae6636e78f94ecf6436b8de14bd1c45
msg298968 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-07-24 13:43
The test fails randomly. Since I'm unable to reproduce the bug, I close the bug. (If the bug is not fixed, I will reopen the issue.)
msg316400 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-05-11 15:30
Oh no, I saw it again!

http://buildbot.python.org/all/#/builders/51/builds/119/steps/3/logs/stdio

running: test_bsddb3 (1569 sec)
running: test_bsddb3 (1599 sec)
1:02:05 [403/403/1] test_bsddb3 crashed
(...)
1 test failed:
    test_bsddb3
History
Date User Action Args
2022-04-11 14:58:48adminsetgithub: 75033
2018-05-11 15:30:57vstinnersetmessages: + msg316400
2017-07-24 13:43:57vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg298968

stage: resolved
2017-07-24 11:02:01vstinnersetmessages: + msg298956
2017-07-24 09:37:20vstinnersetmessages: + msg298946
2017-07-24 09:36:22vstinnersetpull_requests: + pull_request2884
2017-07-24 09:25:03vstinnersetmessages: + msg298945
2017-07-17 08:57:11vstinnersetmessages: + msg298466
2017-07-05 12:09:38vstinnersetmessages: + msg297726
2017-07-05 09:37:47serhiy.storchakasetpull_requests: + pull_request2655
2017-07-05 09:09:09serhiy.storchakasetmessages: + msg297719
2017-07-05 08:00:30vstinnersetmessages: + msg297712
2017-07-05 04:16:45serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg297697
2017-07-04 15:20:07vstinnercreate