[New-bugs-announce] [issue43867] concurrent.futures: handle explicitly SystemExit in managers.Server
STINNER Victor
report at bugs.python.org
Fri Apr 16 10:41:31 EDT 2021
New submission from STINNER Victor <vstinner at python.org>:
In bpo-43843, I modified libregrtest to log a warning if a thread raises an uncaught exception. test_concurrent_futures now logs two warnings.
s390x Debian 3.x:
https://buildbot.python.org/all/#/builders/49/builds/1124
AMD64 RHEL7 3.x:
https://buildbot.python.org/all/#/builders/15/builds/1074
0:03:18 load avg: 4.78 [302/427] test_concurrent_futures passed (2 min 46 sec) -- running: test_tokenize (37.8 sec), test_peg_generator (59.2 sec)
Warning -- Uncaught thread exception: SystemExit
Warning -- Uncaught thread exception: SystemExit
The problem can be seen with test_ressources_gced_in_workers():
$ ./python -m test test_concurrent_futures -m test.test_concurrent_futures.ProcessPoolForkProcessPoolExecutorTest.test_ressources_gced_in_workers -v
(...)
test_ressources_gced_in_workers (test.test_concurrent_futures.ProcessPoolForkProcessPoolExecutorTest) ...
Warning -- Uncaught thread exception: SystemExit
Warning -- Uncaught thread exception: SystemExit
(...)
Tests result: SUCCESS
I propose to explicitly catch this SystemExit. We can take the opportunity to call c.close() explicitly: see attached PR.
----------
components: Library (Lib)
messages: 391205
nosy: bquinlan, davin, pablogsal, pitrou, vstinner
priority: normal
severity: normal
status: open
title: concurrent.futures: handle explicitly SystemExit in managers.Server
versions: Python 3.10
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43867>
_______________________________________
More information about the New-bugs-announce
mailing list