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: haypo, paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2017-07-04 15:20 by haypo, last changed 2017-07-24 13:43 by haypo. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 2584 merged serhiy.storchaka, 2017-07-05 09:37
PR 2840 merged haypo, 2017-07-24 09:36
Messages (10)
msg297676 - (view) Author: STINNER Victor (haypo) * (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 (haypo) * (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 (haypo) * (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 (haypo) * (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 (haypo) * (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 (haypo) * (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 (haypo) * (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 (haypo) * (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.)
History
Date User Action Args
2017-07-24 13:43:57hayposetstatus: open -> closed
resolution: fixed
messages: + msg298968

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