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.

Author vstinner
Recipients bquinlan, davin, pablogsal, pitrou, vstinner
Date 2021-04-16.14:41:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618584091.17.0.579971617999.issue43867@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-04-16 14:41:31vstinnersetrecipients: + vstinner, bquinlan, pitrou, davin, pablogsal
2021-04-16 14:41:31vstinnersetmessageid: <1618584091.17.0.579971617999.issue43867@roundup.psfhosted.org>
2021-04-16 14:41:31vstinnerlinkissue43867 messages
2021-04-16 14:41:31vstinnercreate