Repository navigation
Address Sanitizer: libasan dead lock in pthread_create() (test_multiprocessing_fork.test_get() hangs) #89363
Description
Activity
https://github.com/python/cpython/pull/28344/checks?check_run_id=3605759743
All tests pass until test_multiprocessing_fork timed out after 25 min. On the rerun: refail with timeout.test_get (test.test_multiprocessing_fork.WithProcessesTestQueue) ... Timeout (0:20:00)!
Thread 0x00007f176a71ebc0 (most recent call first):
File "/home/runner/work/cpython/cpython/Lib/multiprocessing/synchronize.py", line 261 in wait
File "/home/runner/work/cpython/cpython/Lib/multiprocessing/synchronize.py", line 349 in wait
File "/home/runner/work/cpython/cpython/Lib/test/test_multiprocessing.py", line 1001 in test_get
File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 549 in _callTestMethod
File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 593 in run
File "/home/runner/work/cpython/cpython/Lib/unittest/case.py", line 652 in __call_
File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 122 in run
File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 84 in __call__
File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 122 in run
File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 84 in __call__
File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 122 in run
File "/home/runner/work/cpython/cpython/Lib/unittest/suite.py", line 84 in __call__
File "/home/runner/work/cpython/cpython/Lib/unittest/runner.py", line 206 in run
File "/home/runner/work/cpython/cpython/Lib/test/support/init.py", line 998 in _run_suite
File "/home/runner/work/cpython/cpython/Lib/test/support/init.py", line 1124 in run_unittest
File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/runtest.py", line 261 in _test_module
File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/runtest.py", line 297 in _runtest_inner2
File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/runtest.py", line 340 in _runtest_inner
File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/runtest.py", line 215 in _runtest
File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/runtest.py", line 245 in runtest
File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/main.py", line 337 in rerun_failed_tests
File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/main.py", line 715 in _main
File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/main.py", line 658 in main
File "/home/runner/work/cpython/cpython/Lib/test/libregrtest/main.py", line 736 in main
File "/home/runner/work/cpython/cpython/Lib/test/main.py", line 2 in <module>
File "/home/runner/work/cpython/cpython/Lib/runpy.py", line 86 in _run_code
File "/home/runner/work/cpython/cpython/Lib/runpy.py", line 196 in _run_module_as_main- added3.11only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Sep 15, 2021 test_multiprocessing_fork also failed on the GitHub Action "Address sanitizer" job:
#28419test_get (test.test_multiprocessing_fork.WithProcessesTestQueue) ... Timeout (0:20:00)!
Thread 0x00007f732679bbc0 (most recent call first):
File "/home/runner/work/cpython/cpython/Lib/multiprocessing/synchronize.py", line 261 in wait
File "/home/runner/work/cpython/cpython/Lib/multiprocessing/synchronize.py", line 349 in wait
File "/home/runner/work/cpython/cpython/Lib/test/_test_multiprocessing.py", line 1001 in test_get- changed the title
[-]test_multiprocessing_fork failws with timeout[/-][+]test_multiprocessing_fork: test_get() fails with timeout[/+]on Sep 17, 2021 - changed the title
[-]test_multiprocessing_fork failws with timeout[/-][+]test_multiprocessing_fork: test_get() fails with timeout[/+]on Sep 17, 2021 Sometimes, WithProcessesTestProcess.test_error_on_stdio_flush_1() hangs.
I'm able to reproduce the issue in a reliable way using attached bisect10 file and the command:
$ ./python -m test test_multiprocessing_fork --timeout=40 -v --matchfile=bisect10 (...) test_fork (test.test_multiprocessing_fork.WithProcessesTestQueue) ... ok test_get (test.test_multiprocessing_fork.WithProcessesTestQueue) ... Timeout (0:00:40)! Thread 0x00007fd0552025c0 (most recent call first): File "/home/vstinner/python/main/Lib/multiprocessing/synchronize.py", line 261 in wait File "/home/vstinner/python/main/Lib/multiprocessing/synchronize.py", line 349 in wait File "/home/vstinner/python/main/Lib/test/_test_multiprocessing.py", line 1003 in test_get (...)
bisect10 contains 68 tests.
I'm able to reproduce the issue in a reliable way using attached bisect10 file and the command:
I'm talking about a Python built with Address Sanitizer:
$ ./configure --with-address-sanitizer --without-pymalloc $ make
12 remaining items
I reopen the issue: test_concurrent_futures seems to be also affected by this bug :-(
Example of recent hang:
https://github.com/python/cpython/runs/4908075699?check_suite_focus=true---
0:18:04 load avg: 1.34 [417/418] test_peg_generator passed (9 min 46 sec) -- running: test_concurrent_futures (11 min 20 sec)
0:18:34 load avg: 0.81 running: test_concurrent_futures (11 min 50 sec)
0:19:04 load avg: 0.49 running: test_concurrent_futures (12 min 20 sec)
(...)
0:31:34 load avg: 0.00 running: test_concurrent_futures (24 min 50 sec)
Kill <TestWorkerProcess #3 running test=test_concurrent_futures pid=20092 time=25 min> process group
0:31:43 load avg: 0.00 [418/418/1] test_concurrent_futures timed out (25 min) (25 min)
(...)
0:31:43 load avg: 0.00 Re-running test_concurrent_futures in verbose mode
(...)OK (skipped=6)
== Tests result: FAILURE then SUCCESS ==
409 tests OK.
10 slowest tests:
- test_concurrent_futures: 25 min
- test_peg_generator: 9 min 46 sec
- test_tools: 4 min 45 sec
- test_asyncio: 2 min 18 sec
- test_weakref: 1 min 26 sec
- test_venv: 1 min 24 sec
- test_subprocess: 1 min 6 sec
- test_lib2to3: 1 min 1 sec
- test_pickle: 59.4 sec
- test_gdb: 58.5 sec
9 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_startfile
test_winconsoleio test_winreg test_winsound test_zipfile641 re-run test:
test_concurrent_futures
---- added a commit that references this issue
on Sep 25, 2023 - added a commit that references this issue
on Sep 25, 2023 - added a commit that references this issue
on Oct 2, 2023
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs