Repository navigation
Own the .NET forwarder task; release Python memory-tracking state on stop - #57
Merged
Merged
Conversation
…ger detached [PROF-CPU-SESSIONS]
…terpreter [PROF-MEMORY-STOP]
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 finishes the v0.6.0 leak review. #56 left two items open.
Fixed
lsp-profiler-dotnet/src/cpu.rs) was spawned withdrop(tokio::spawn(..)), which AGENTS.md forbids. NowSamplerHandle::own_producerkeeps the task's abort handle, and dropping the handle aborts the task.sampler_lifetime_tests.rsfailed: the producer outlived its dropped sampler handle (left: 1, right: 0).drop(tokio::spawn(is left in the workspace.stop_tracemallocscript left four things behind in the debuggee: the collected cycles ingc.garbage(DEBUG_SAVEALL), the baseline snapshot, theatexithook and the signal handlers. It now releases all four.src/memory/scripts/stop_tracemalloc.py, pulled in withinclude_str!.make _python_scripts_test, runs it as part ofmake test.gc.garbage, the snapshot still referenced, SIGINT still routed to the profiler, and the exit hook still alive.Left as they are
These handles end with their owners, so they aren't leaks:
pyspy.rssampler thread stops when the handle'sDropsets the stop flag.live/scheduler.rs,live/watcher.rsandcooperative.rseach end with their consumer.The plan doc records the reasoning for each.
Verification (Windows 11)
make fmt CHECK=1,make lintandmake testall pass: 541 Rust tests with every coverage floor met, plus the Python script test and 117 TypeScript tests.