Issue 20127: Race condition in test_threaded_import.task()? (original) (raw)

Issue20127

Created on 2014-01-05 03:18 by eric.snow, last changed 2022-04-11 14:57 by admin.

Messages (2)
msg207338 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2014-01-05 03:18
While looking at the logs of a buildbot failure [1], I took a look at Lib/test/test_threaded_import.py. In ThreadedImportTests.check_parallel_module_init() it makes a bunch of threaded calls to the module-level "task()" function. There may be a race condition in the finally clause of that function. I don't have a lot of time to investigate further right now, but I'll take a closer look when I get the chance. [1] http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/7800
msg331679 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-12-12 08:28
Buildbots logs no longer available. Looking at the code, I see nothing suspicious in the finally clause. The size of the done_tasks is increased by 1 in every thread, and at least one thread will call done.set() when len(done_tasks) == N. Could you please provide more information Eric?
History
Date User Action Args
2022-04-11 14:57:56 admin set status: pending -> opengithub: 64326
2018-12-12 08:28:53 serhiy.storchaka set status: open -> pendingnosy: + serhiy.storchakamessages: +
2014-01-05 03🔞14 eric.snow create