Second attempt at fixing test_pthread_c11_threads#15187
Merged
Conversation
f68453b to
1ce93d4
Compare
kripken
reviewed
Sep 30, 2021
| // exits. This means we can't use `thread_main` below because | ||
| // the destructor to the `tss_t key` writes to stdout. | ||
| int thread_main_detached(void* arg) { | ||
| printf("in thread_main_detached %p\n", (void*)thrd_current()); |
Member
There was a problem hiding this comment.
This writes to stdout here - isn't that as bad as the other print we are avoiding?
Collaborator
Author
There was a problem hiding this comment.
This happens before the cnd_signal below.. the main thread waits for that signal before exiting so anything before that is fine.
Collaborator
Author
|
I ran this test continuously for over an hour (while running the whole test suite in the background to cause contention for cpu cores) and i didn't timeout at all.. so I'm pretty sure this test is fixed now. |
dschuff
approved these changes
Sep 30, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This time I'm pretty sure the deadlock no longer
occurs. The issue was the pthread key destcrutor
was calling printf.
Again this doesn't fix the actual issues but avoids
hitting it this test.
Fixes: #14579
See: #15186