gh-150662: Stop unbounded memory growth in Tachyon --gecko collector#150845
Merged
Conversation
maurycy
commented
Jun 3, 2026
maurycy
commented
Jun 3, 2026
Member
|
Thanks, this looks really good ❤️ I pushed a couple of fixups that just clean up the implementation and tests: the spill state now lives with each thread, the JSON streaming path is a bit less repetitive, cleanup is centralized, and the tests now exercise forced spill flushing, column alignment, export failure behavior, and the one-shot lifecycle. Nice work tracking this down and keeping the memory behavior flat 💪 |
pablogsal
approved these changes
Jun 6, 2026
|
Thanks @maurycy for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15. |
|
GH-151000 is a backport of this pull request to the 3.15 branch. |
pablogsal
pushed a commit
that referenced
this pull request
Jun 6, 2026
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.
The PR fixes an unbounded memory growth caused by:
cpython/Lib/profiling/sampling/gecko_collector.py
Lines 267 to 270 in 350e9de
It was reported in gh-150662 and the detailed idea for the fix by @pablogsal:
#150662 (comment)
Discussion
I don't think others collector have this issue.
pstats,collapsed/flamegraph,heatmap,jsonlshould just plateau. I've reviewed them. I pondered this for a day, and I don't think there's a better fix? It's not really crash-resillent safe. It likely doesn't matter here that much, as I'm really not sold on using Gecko for really long term profiling. Binary format is much better in this regard, and I've started experimenting with a different fix there. Perhaps we should encourage recording binary pattern more? The tests stay as is.(No longer) Reproduction
Visual validation
https://profiler.firefox.com/