[backports-release-1.11] 1.11 Profiling threading fix backports#56358
Merged
IanButterworth merged 2 commits intoJuliaLang:backports-release-1.11from Oct 28, 2024
Merged
Conversation
…liaLang#55622) Fixes an issue with JuliaLang#55500, where signals may abruptly abort the process as they observe it is still processing the resume SIGUSR2 message and are not able to wait for that processing to end before setting the new message to exit. (cherry picked from commit da3468c)
I forgot about the existence of threads, so had hard-coded this to only support one thread. Clearly that is not sufficient though, so use the semaphore here as it is intended to be used. Fixes JuliaLang#55703 --------- Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com> (cherry picked from commit 4f0a333)
Contributor
|
What should the tests look like? The profiling result is not exactly empty, it does have a few (trivial) things in the flame graph, so what would be a good criterion for a test that fails in the current state of things? |
Member
Author
|
I'm guessing that if you start with -t8 and do |
Member
Author
|
I checked on a linux x86 machine with On 1.11.1 only the first thread appears to be sampled. On this PR all are sampled. |
Member
|
SGTM |
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.
Fixes #56327
Needs checking on a linux machine with more than one thread.Confirmed fix. #56358 (comment)