classification
Title: [3.6] test_threading.test_set_and_clear fails in AppVeyor CI
Type: Stage: resolved
Components: Tests Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: koobs, miss-islington, vstinner, xiang.zhang
Priority: normal Keywords: patch

Created on 2018-01-28 08:54 by xiang.zhang, last changed 2020-03-29 00:02 by koobs. This issue is now closed.

Files
File name Uploaded Description Edit
freebsd-current-non-debug-3.8-build-176.txt koobs, 2020-03-29 00:02
Pull Requests
URL Status Linked Edit
PR 8331 merged vstinner, 2018-07-18 17:08
PR 8339 merged miss-islington, 2018-07-19 08:50
PR 8340 merged miss-islington, 2018-07-19 08:51
Messages (9)
msg310930 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2018-01-28 08:54
test_threading.test_set_and_clear fails in AppVeyor CI. But seems it not stable since rerun succeeds. See https://ci.appveyor.com/project/python/cpython/build/3.6build11314/job/ussor83yaglx5whb.

FAIL: test_set_and_clear (test.test_threading.EventTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\lock_tests.py", line 407, in test_set_and_clear
    self.assertEqual(results, [True] * N)
AssertionError: Lists differ: [False, False, False, True, True] != [True, True, True, True, True]
First differing element 0:
False
True
- [False, False, False, True, True]
+ [True, True, True, True, True]
msg321896 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-18 16:59
Another failure on Python 3.6 on my PR 8330:

https://ci.appveyor.com/project/python/cpython/build/3.6build19434/job/n24xudh8egp8i78j

======================================================================
FAIL: test_set_and_clear (test.test_threading.EventTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\lock_tests.py", line 417, in test_set_and_clear
    self.assertEqual(results, [True] * N)
AssertionError: Lists differ: [False, False, False, True, True] != [True, True, True, True, True]
First differing element 0:
False
True
- [False, False, False, True, True]
+ [True, True, True, True, True]
----------------------------------------------------------------------
msg321899 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-18 17:04
Python 3.7 and master are likely impacted as well since Lib/test/lock_tests.py is the same file in 3.6, 3.7 and master branches.
msg321901 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-18 17:08
The test rely on time. Using smaller timeouts, I'm able to reproduce the bug on Linux as well.
msg321940 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-19 08:50
New changeset 81950495ba2c36056e0ce48fd37d514816c26747 by Victor Stinner in branch 'master':
bpo-32692: Fix test_threading.test_set_and_clear() (GH-8331)
https://github.com/python/cpython/commit/81950495ba2c36056e0ce48fd37d514816c26747
msg321942 - (view) Author: miss-islington (miss-islington) Date: 2018-07-19 09:27
New changeset 339e0c1296c61c9dbc1f8f880c5c668bf4007e5e by Miss Islington (bot) in branch '3.7':
bpo-32692: Fix test_threading.test_set_and_clear() (GH-8331)
https://github.com/python/cpython/commit/339e0c1296c61c9dbc1f8f880c5c668bf4007e5e
msg321944 - (view) Author: miss-islington (miss-islington) Date: 2018-07-19 09:44
New changeset 2fe1c6b386e7bbb8b647636643cc637795b99123 by Miss Islington (bot) in branch '3.6':
bpo-32692: Fix test_threading.test_set_and_clear() (GH-8331)
https://github.com/python/cpython/commit/2fe1c6b386e7bbb8b647636643cc637795b99123
msg321951 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-19 11:53
I changed the timeout in 3.6, 3.7 and master branches. The failure should now be much less likely.

Python 2.7 doesn't have the unit test.
msg365238 - (view) Author: Kubilay Kocak (koobs) (Python triager) Date: 2020-03-29 00:02
Seeing the following on the freebsd CURRENT bb:

======================================================================
FAIL: test_set_and_clear (test.test_threading.EventTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.8.koobs-freebsd-9e36.nondebug/build/Lib/test/lock_tests.py", line 418, in test_set_and_clear
    self.assertEqual(results, [True] * N)
AssertionError: Lists differ: [False, False, False, True, True] != [True, True, True, True, True]
First differing element 0:
False
True
- [False, False, False, True, True]
+ [True, True, True, True, True]
----------------------------------------------------------------------
Ran 168 tests in 29.254s
FAILED (failures=1)
test test_threading failed

Full log attached
History
Date User Action Args
2020-03-29 00:02:38koobssetfiles: + freebsd-current-non-debug-3.8-build-176.txt
nosy: + koobs
messages: + msg365238

2018-07-19 11:53:45vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg321951

stage: patch review -> resolved
2018-07-19 09:44:32miss-islingtonsetmessages: + msg321944
2018-07-19 09:27:50miss-islingtonsetnosy: + miss-islington
messages: + msg321942
2018-07-19 08:51:11miss-islingtonsetpull_requests: + pull_request7874
2018-07-19 08:50:21miss-islingtonsetpull_requests: + pull_request7873
2018-07-19 08:50:11vstinnersetmessages: + msg321940
2018-07-18 17:08:23vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request7868
2018-07-18 17:08:14vstinnersetmessages: + msg321901
2018-07-18 17:04:20vstinnersetmessages: + msg321899
versions: + Python 3.7, Python 3.8
2018-07-18 16:59:50vstinnersettitle: test_threading.test_set_and_clear fails in AppVeyor CI -> [3.6] test_threading.test_set_and_clear fails in AppVeyor CI
2018-07-18 16:59:38vstinnersetmessages: + msg321896
2018-02-03 06:25:02terry.reedysetnosy: + vstinner
2018-01-28 08:54:10xiang.zhangcreate