Remove XPC timeout based on SIGTERM timeout in container stop#1387
Merged
dcantah merged 1 commit intoapple:mainfrom Apr 4, 2026
Merged
Remove XPC timeout based on SIGTERM timeout in container stop#1387dcantah merged 1 commit intoapple:mainfrom
dcantah merged 1 commit intoapple:mainfrom
Conversation
Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
dkovba
approved these changes
Apr 4, 2026
dcantah
approved these changes
Apr 4, 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.
Type of Change
Motivation and Context
container stophas an option-tforSeconds to wait before killing the containers(see here). This timeout is used to determine when the SandboxService should stop waiting for the container to gracefully exit withSIGTERM(or another provided signal) and sendSIGKILL.Today, we were setting the
SandboxService.stopXPC call's timeout to the value provided tocontainer stop -tplus 1 second. This is problematic in cases where the code flow to send SIGKILL to the container then forcefully stop the VM does not complete within one second of the SIGTERM timeout being hit. In those cases, we will return that the XPC stop call failed due to hitting the timeout. In some cases this may happen even though the container and VM have both been successfully stopped.This PR removes that XPC timeout for
SandboxService.stopentirely. We cannot reliably determine in the SandboxClient, which may be used by third party runtime plugins to support additional container runtimes, how long it may take for SIGKILL to kill the container and stop related resources.Testing