Skip to content

test.libregrtest race condition in runtest_mp leads to 30 second delay in free-threaded build #117293

@colesbury

Description

@colesbury

This is related to #90363.

In #30470, the (partial) fix for that issue I wrote:

There are still potential race conditions between checking if any workers are alive and reading from the output queue. This means that there can be up to an extra 30 second delay (instead of an hanging forever), while waiting for self.output.get().

We are now seeing that 30 second delay when running some tests with the GIL disabled, such as test_regrtest.

I think it's worth pursuing the approach used here, which avoids the race condition by tracking exiting workers by passing a sentinel value through the queue:
colesbury/nogil@406e5d7

Linked PRs

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions