Reap completed exec host state in the Linux runtime helper - #2060
Open
rogerneal wants to merge 1 commit into
Open
Reap completed exec host state in the Linux runtime helper#2060rogerneal wants to merge 1 commit into
rogerneal wants to merge 1 commit into
Conversation
Drop ExitMonitor bookkeeping after exit and remove per-exec process and waiter entries so long-lived container-runtime-linux helpers do not grow with every finished command.
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.
Summary
ExitMonitor.tracknow drops callback/task entries after the exit path finishes, so completed work does not retain host state forever.RuntimeServicereaps per-execprocesses/waiterson exit, failed start, and container cleanup. Latewaitstill works via a compactcompletedExitscache when no waiter was present yet.createProcessregistration and failedstartExecProcessalso reap instead of leaving orphaned entries.Fixes #2057
Test plan
Tested
swift test --filter ExitMonitorTests(3/3 passed)MultiWriterTestsstill compile againstRuntimeServicechangesNot tested
container-runtime-linuxmalloc growth repro with thousands ofcontainer machine run ... /usr/bin/true(needs installing this build into a running daemon session and measuring helper allocations)