classification
Title: test_eintr: test_open() hangs randomly on x86-64 El Capitan 3.x buildbot
Type: Stage: resolved
Components: Tests Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: miss-islington, pablogsal, vstinner
Priority: normal Keywords: patch

Created on 2018-11-30 15:54 by vstinner, last changed 2019-05-21 22:34 by vstinner. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 10896 merged vstinner, 2018-12-04 15:43
PR 10898 closed miss-islington, 2018-12-04 16:13
PR 10899 closed miss-islington, 2018-12-04 16:13
PR 10911 merged vstinner, 2018-12-05 01:28
PR 10912 merged vstinner, 2018-12-05 01:31
PR 10965 merged vstinner, 2018-12-05 22:55
PR 10966 merged miss-islington, 2018-12-05 23:18
PR 10967 merged miss-islington, 2018-12-05 23:18
PR 10990 merged vstinner, 2018-12-06 12:23
PR 10992 merged miss-islington, 2018-12-06 13:16
PR 10993 merged miss-islington, 2018-12-06 13:16
Messages (14)
msg330795 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-30 15:54
test_open() of test_eintr hangs randomly on x86-64 El Capitan 3.x buildbot. test_eintr failed but then passed when run again.

pythoninfo:

platform.platform: Darwin-15.6.0-x86_64-i386-64bit  # macOS 10.11 (El Capitan)


https://buildbot.python.org/all/#/builders/93/builds/1574

test_all (test.test_eintr.EINTRTests) ... FAIL

======================================================================
FAIL: test_all (test.test_eintr.EINTRTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/test/test_eintr.py", line 18, in test_all
    script_helper.assert_python_ok("-u", tester)
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/test/support/script_helper.py", line 157, in assert_python_ok
    return _assert_python(True, *args, **env_vars)
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/test/support/script_helper.py", line 143, in _assert_python
    res.fail(cmd_line)
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/test/support/script_helper.py", line 70, in fail
    raise AssertionError("Process return code is %d\n"
AssertionError: Process return code is 1
command line: ['/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/python.exe', '-X', 'faulthandler', '-I', '-u', '/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/test/eintrdata/eintr_tester.py']

stdout:
---

---

stderr:
---
........ss.s.ss.Timeout (0:10:00)!
Thread 0x00007fff7c082000 (most recent call first):
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/test/eintrdata/eintr_tester.py", line 349 in python_open
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/test/eintrdata/eintr_tester.py", line 345 in _test_open
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/test/support/__init__.py", line 596 in wrapper
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/test/eintrdata/eintr_tester.py", line 353 in test_open
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/unittest/case.py", line 642 in run
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/unittest/case.py", line 702 in __call__
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/unittest/suite.py", line 122 in run
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/unittest/suite.py", line 84 in __call__
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/unittest/suite.py", line 122 in run
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/unittest/suite.py", line 84 in __call__
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/unittest/runner.py", line 176 in run
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/unittest/main.py", line 271 in runTests
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/unittest/main.py", line 101 in __init__
  File "/Users/buildbot/buildarea/3.x.billenstein-elcapitan/build/Lib/test/eintrdata/eintr_tester.py", line 527 in <module>
---

----------------------------------------------------------------------

Ran 1 test in 605.488s

FAILED (failures=1)
Warning -- files was modified by test_eintr
  Before: []
  After:  ['@test_57532_tmp'] 
test test_eintr failed
msg330796 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-30 15:59
I'm unable to reproduce the bug on macOS 10.13.6 using:

   ./python.exe -m test -F test_eintr --timeout=60


I modified the test to display immediately result into stdout:

diff --git a/Lib/test/test_eintr.py b/Lib/test/test_eintr.py
index 25f86d3..47b89d3 100644
--- a/Lib/test/test_eintr.py
+++ b/Lib/test/test_eintr.py
@@ -1,6 +1,8 @@
 import os
+import sys
 import signal
 import unittest
+import subprocess
 
 from test import support
 from test.support import script_helper
@@ -15,7 +17,9 @@ class EINTRTests(unittest.TestCase):
         # thread (for reliable signal delivery).
         tester = support.findfile("eintr_tester.py", subdir="eintrdata")
         # use -u to try to get the full output if the test hangs or crash
-        script_helper.assert_python_ok("-u", tester)
+        proc = subprocess.run([sys.executable, "-u", tester, "-v"])
+        if proc.returncode:
+            self.fail("fail")
 
 
 if __name__ == "__main__":
msg330801 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-30 16:08
I stopped my manual test after 71 iterations.
msg331055 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-12-04 15:42
Oh. That's just a variant of the old bpo-25234.
msg331059 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-12-04 16:13
New changeset 4752e65250bce60b97d5af702d586092d02fbf58 by Victor Stinner in branch 'master':
bpo-35363, test_eintr: skip test_open() on macOS (GH-10896)
https://github.com/python/cpython/commit/4752e65250bce60b97d5af702d586092d02fbf58
msg331088 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-12-05 02:03
New changeset 93d038c91dc3075dd34b41ce6b6fb4ea07fbb8c3 by Victor Stinner in branch '3.6':
bpo-35363, test_eintr: skip test_open() on macOS (GH-10896) (GH-10912)
https://github.com/python/cpython/commit/93d038c91dc3075dd34b41ce6b6fb4ea07fbb8c3
msg331089 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-12-05 02:03
New changeset c93e3b05d5672dc9e8d6e2f2dce332799d5b95d2 by Victor Stinner in branch '3.7':
bpo-35363, test_eintr: skip test_open() on macOS (GH-10896) (GH-10911)
https://github.com/python/cpython/commit/c93e3b05d5672dc9e8d6e2f2dce332799d5b95d2
msg331192 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-12-05 23:18
New changeset aa8ae904ad2f576f8e7b38a9a6542d3e9a569be9 by Victor Stinner in branch 'master':
bpo-35363: test_eintr runs eintr_tester.py in verbose mode (GH-10965)
https://github.com/python/cpython/commit/aa8ae904ad2f576f8e7b38a9a6542d3e9a569be9
msg331193 - (view) Author: miss-islington (miss-islington) Date: 2018-12-05 23:35
New changeset 0fc3b2fe010e42a8c146fb84924e9fd33c6f4e29 by Miss Islington (bot) in branch '3.7':
bpo-35363: test_eintr runs eintr_tester.py in verbose mode (GH-10965)
https://github.com/python/cpython/commit/0fc3b2fe010e42a8c146fb84924e9fd33c6f4e29
msg331194 - (view) Author: miss-islington (miss-islington) Date: 2018-12-05 23:43
New changeset 4699f2aa26b2f8befa77852e0c6fba0b474a2748 by Miss Islington (bot) in branch '3.6':
bpo-35363: test_eintr runs eintr_tester.py in verbose mode (GH-10965)
https://github.com/python/cpython/commit/4699f2aa26b2f8befa77852e0c6fba0b474a2748
msg331234 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-12-06 13:16
New changeset 0644b33821b70efbf0ac1ec1fb8729b05796564a by Victor Stinner in branch 'master':
bpo-35363: test_eintr uses print(flush=True) (GH-10990)
https://github.com/python/cpython/commit/0644b33821b70efbf0ac1ec1fb8729b05796564a
msg331235 - (view) Author: miss-islington (miss-islington) Date: 2018-12-06 13:35
New changeset 560fa4db17983ce37c1453c057901c627b2c3abc by Miss Islington (bot) in branch '3.7':
bpo-35363: test_eintr uses print(flush=True) (GH-10990)
https://github.com/python/cpython/commit/560fa4db17983ce37c1453c057901c627b2c3abc
msg331236 - (view) Author: miss-islington (miss-islington) Date: 2018-12-06 13:40
New changeset 3f0e8e225e2275d22c4bd2e8f8f212b6a8b849aa by Miss Islington (bot) in branch '3.6':
bpo-35363: test_eintr uses print(flush=True) (GH-10990)
https://github.com/python/cpython/commit/3f0e8e225e2275d22c4bd2e8f8f212b6a8b849aa
msg331237 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-12-06 14:11
Follow-up: bpo-35425, "test_eintr fails randomly on AMD64 FreeBSD 10-STABLE Non-Debug 3.7: TypeError: 'int' object is not callable".
History
Date User Action Args
2019-05-21 22:34:15vstinnersetpull_requests: - pull_request10550
2019-05-21 22:34:05vstinnersetpull_requests: - pull_request13384
2019-05-21 20:39:09mbussonnsetpull_requests: + pull_request13384
2018-12-25 03:12:08taleinatsetpull_requests: + pull_request10550
2018-12-06 14:11:12vstinnersetmessages: + msg331237
2018-12-06 13:40:34miss-islingtonsetmessages: + msg331236
2018-12-06 13:35:03miss-islingtonsetmessages: + msg331235
2018-12-06 13:16:58miss-islingtonsetpull_requests: + pull_request10233
2018-12-06 13:16:46miss-islingtonsetpull_requests: + pull_request10232
2018-12-06 13:16:25vstinnersetmessages: + msg331234
2018-12-06 12:23:33vstinnersetpull_requests: + pull_request10230
2018-12-05 23:43:41miss-islingtonsetmessages: + msg331194
2018-12-05 23:35:46miss-islingtonsetnosy: + miss-islington
messages: + msg331193
2018-12-05 23:18:53miss-islingtonsetpull_requests: + pull_request10209
2018-12-05 23:18:41miss-islingtonsetpull_requests: + pull_request10208
2018-12-05 23:18:35vstinnersetmessages: + msg331192
2018-12-05 22:55:41vstinnersetpull_requests: + pull_request10207
2018-12-05 02:04:14vstinnersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-12-05 02:03:30vstinnersetmessages: + msg331089
2018-12-05 02:03:25vstinnersetmessages: + msg331088
2018-12-05 01:31:31vstinnersetpull_requests: + pull_request10151
2018-12-05 01:28:29vstinnersetpull_requests: + pull_request10150
2018-12-04 16:13:58miss-islingtonsetpull_requests: + pull_request10139
2018-12-04 16:13:48miss-islingtonsetpull_requests: + pull_request10138
2018-12-04 16:13:36vstinnersetmessages: + msg331059
2018-12-04 15:43:50vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request10136
2018-12-04 15:42:48vstinnersetmessages: + msg331055
2018-11-30 16:08:33vstinnersetmessages: + msg330801
2018-11-30 15:59:36vstinnersetnosy: + pablogsal
2018-11-30 15:59:32vstinnersetmessages: + msg330796
2018-11-30 15:54:17vstinnercreate