Repository navigation
Delete the .NET heap graph each snapshot supersedes - #61
Merged
Merged
Conversation
Every memory snapshot and diff kept a new numbered heap graph (about 16 MB each) until the session stopped, though only the latest is ever read. A session polled for days filled the output directory. capture now deletes the graph it replaces. [PROF-DOTNET-MEMORY]
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.
Follow-up leak review of main (6957145): four pi agents on GLM 5.3 plus a manual pass.
Leak fixed: every .NET
memory/snapshotandmemory/diffwrote a newheap-<session>/snapshot-<n>.heapgraph.json(about 16 MB for half a million objects) and kept it untilstop. Only the latest graph is ever read byreferencesandobjectsByType, so a session polled for days grew the disk without bound.Fix:
capturedeletes the graph it supersedes once the new one is kept.Regression:
tests/dotnet_e2e/graph_retention.rsruns snapshot, diff, snapshot against the real engine and fixture, asserts one graph after each step, checks that references still answer, and checks that stop removes the directory. Before the fix it failed with["snapshot-1.heapgraph.json", "snapshot-2.heapgraph.json"].make lintandmake testpass locally on Windows.