This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_concurrent_futures leaks many dangling threads on FreeBSD
Type: Stage:
Components: Tests Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: shihai1991, vstinner
Priority: normal Keywords:

Created on 2021-04-14 11:57 by vstinner, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg391070 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-04-14 11:57
test_idle_process_reuse_multiple() of test_concurrent_futures failed on AMD64 FreeBSD Shared 3.x, but then passed when re-run in verbose mode.
https://buildbot.python.org/all/#/builders/483/builds/1073

Moreover, test_concurrent_futures leaked many dangling threads.


0:04:31 load avg: 1.95 [163/427/1] test_concurrent_futures failed (3 min 29 sec) -- running: test_nntplib (2 min 17 sec)
Warning -- threading_cleanup() failed to cleanup 2 threads (count: 2, dangling: 3)
Warning -- Dangling thread: <_ExecutorManagerThread(Thread-41, started 34386025472)>
Warning -- Dangling thread: <_MainThread(MainThread, started 34374492160)>
Warning -- Dangling thread: <Thread(QueueFeederThread, started daemon 34418515968)>
Warning -- threading_cleanup() failed to cleanup -2 threads (count: 0, dangling: 1)
Warning -- Dangling thread: <_MainThread(MainThread, started 34374492160)>
(...)
======================================================================
FAIL: test_idle_process_reuse_multiple (test.test_concurrent_futures.ProcessPoolForkProcessPoolExecutorTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_concurrent_futures.py", line 1018, in test_idle_process_reuse_multiple
    self.assertLessEqual(len(executor._processes), 2)
AssertionError: 3 not less than or equal to 2

Stdout:
0.43s 

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

Ran 226 tests in 209.441s

FAILED (failures=1, skipped=6)
test test_concurrent_futures failed
(...)
1 re-run test:
    test_concurrent_futures

Total duration: 16 min 7 sec
Tests result: FAILURE then SUCCESS
msg391071 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-04-14 11:58
See also:

* bpo-39995: test_concurrent_futures: ProcessPoolSpawnExecutorDeadlockTest.test_crash() fails with OSError: [Errno 9] Bad file descriptor
* bpo-35809: test_concurrent_futures.ProcessPoolForkExecutorDeadlockTest fails intermittently on Travis and passes in verbose mode
History
Date User Action Args
2022-04-11 14:59:44adminsetgithub: 88011
2021-04-16 13:44:56shihai1991setnosy: + shihai1991
2021-04-14 11:58:07vstinnersetmessages: + msg391071
2021-04-14 11:57:40vstinnercreate