Repository navigation
Stop the in-process sampler when a cooperative attach was abandoned - #60
Merged
Merged
Conversation
…PROF-CPU-COOPERATIVE]
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 the cooperative tail-thread item from the v0.6.0 leak review, which #56 wrongly judged harmless.
When the in-process sampler's header arrived after
tailhad already given up, the detached tail thread found no receiver and returned. It never wrote the stop sentinel, so the debuggee kept sampling and appending to a file nobody read, for as long as it ran.Test first:
a_header_after_attach_gave_up_stops_the_writer_and_removes_the_filefailed withthe abandoned sample file stays on disk while its writer keeps sampling.Fix: the thread now writes the stop sentinel, waits the usual drain grace so the writer sees it, then removes both files.
Verification: the
lsp-profilerlib tests (89) and the cooperative tests pass, clippy is clean, and the spec citations resolve.