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: Race condition in test_threaded_import.task()?
Type: behavior Stage:
Components: Tests Versions: Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: eric.snow, serhiy.storchaka
Priority: normal Keywords:

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:56adminsetstatus: pending -> open
github: 64326
2018-12-12 08:28:53serhiy.storchakasetstatus: open -> pending
nosy: + serhiy.storchaka
messages: + msg331679

2014-01-05 03:18:14eric.snowcreate