Skip to content

[WIP] bpo-36402: add random sleep to test_threads_join_2() #13889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

[WIP] bpo-36402: add random sleep to test_threads_join_2() #13889

wants to merge 1 commit into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 7, 2019

Add random short sleep of around 10 ms to test_threads_join_2() to
reproduce https://bugs.python.org/issue36402 crash.

https://bugs.python.org/issue36402

Add random short sleep of around 10 ms to test_threads_join_2() to
reproduce https://bugs.python.org/issue36402 crash.
@pablogsal
Copy link
Member

How long the test takes to run? I am asking because if it is low, we can run the test multiple times so it does not magically pass on the main CI and then fail somewhere else. Or is more or less reliable that will fail almost all the time?

@vstinner
Copy link
Member Author

@pablogsal: Using this PR, the test is way more likely when run in a loop using:

./python -m test  -F -m test_threads_join_2  test_threading

The CI only runs the test once and so was just lucky. You might tune my PR to make the crash more reliable, but I didn't bother to go that far ;-)

@vstinner
Copy link
Member Author

I used this PR to debug https://bugs.python.org/issue36402

I merged my PR #13948 fix which also includes changes of this PR.

@vstinner vstinner closed this Jun 13, 2019
@vstinner vstinner deleted the threads_join_2_race branch June 13, 2019 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants