Message250753
I'm unable to reproduce the hang. It's probably a race condition since sometimes the test pass. It may depend on the system load, the number of CPU cores, and other factors.
I tried to use faulthandler.dump_traceback_later() in the changeset ebccac60b9e7, but it didn't print the traceback of the blocked test. So I don't know which eintr test is blocked.
In the changeset ed0e6a9c11af, I rewrote test_eintr.py to use subprocess instead of os.fork(). I was supposed to reduce the risk of race condition, but the hang still occurs.
On FreeBSD, I know that any thread can receive a signal, and most Python tests only expect that the signal is received from a specific thread. But test_eintr.py runs Lib/test/eintrdata/eintr_tester.py in a subprocess to avoid threads, and Lib/test/eintrdata/eintr_tester.py itself uses subprocess to spawn child processes, so it should also avoid threads. So I don't think that the issue is related to threads.
At least, it would help to know which test hangs.
Example:
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/3337/steps/test/logs/stdio
[398/398] test_eintr
Timeout (1:00:00)!
Thread 0x0000000801807400 (most recent call first):
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/selectors.py", line 375 in select
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/subprocess.py", line 1698 in _communicate
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/subprocess.py", line 1068 in communicate
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/support/script_helper.py", line 86 in run_python_until_end
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/support/script_helper.py", line 96 in _assert_python
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/support/script_helper.py", line 135 in assert_python_ok
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/test_eintr.py", line 17 in test_all
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/case.py", line 600 in run
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/case.py", line 648 in __call__
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 122 in run
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 84 in __call__
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 122 in run
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 84 in __call__
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 122 in run
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 84 in __call__
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/runner.py", line 176 in run
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/support/__init__.py", line 1775 in _run_suite
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/support/__init__.py", line 1809 in run_unittest
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 1280 in test_runner
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 1281 in runtest_inner
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 968 in runtest
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 532 in main
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 1565 in main_in_temp_cwd
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 1590 in <module>
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/runpy.py", line 85 in _run_code
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/runpy.py", line 170 in _run_module_as_main
Traceback (most recent call last):
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/__main__.py", line 3, in <module>
regrtest.main_in_temp_cwd()
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 1565, in main_in_temp_cwd
main()
File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 738, in main
raise Exception("Child error on {}: {}".format(test, result[1]))
Exception: Child error on test_eintr: Exit code 1
*** [buildbottest] Error code 1 |
|
Date |
User |
Action |
Args |
2015-09-15 10:09:39 | vstinner | set | recipients:
+ vstinner |
2015-09-15 10:09:39 | vstinner | set | messageid: <1442311779.01.0.43728096223.issue25122@psf.upfronthosting.co.za> |
2015-09-15 10:09:38 | vstinner | link | issue25122 messages |
2015-09-15 10:09:37 | vstinner | create | |
|