Change HCS TaskExit ownership responsibility#533
Merged
Conversation
It turns out that eventing the TaskExit at the end of a process is not the correct time on Windows. In all cases there is a container Silo seperate from the init process and in Hypervisor isolated cases there is a parent UtilityVM. This change makes the init process TaskExit notification only fire once the Silo/UtilityVM are successfully torn down making sure there are no resources in use when the TaskExit is sent. Signed-off-by: Justin Terry (VM) <[email protected]>
If more than one thread called Wait* on the same hcs system/process handle the exit notification would only be sent to one of the callers. This would cause the other caller to wait for another event to be delivered on the channel that would never come. This makes the model honor a single internal waiter on the platform notification but allows for multiple Wait* calls from any number of goroutines. Signed-off-by: Justin Terry (VM) <[email protected]>
Contributor
Author
|
@jhowardmsft - This is good and should fully fix your RS1 issue. PTAL |
princepereira
pushed a commit
to princepereira/hcsshim
that referenced
this pull request
Aug 29, 2024
Change HCS TaskExit ownership responsibility
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.
It turns out that eventing the TaskExit at the end of a process is not the
correct time on Windows. In all cases there is a container Silo seperate from
the init process and in Hypervisor isolated cases there is a parent UtilityVM.
This change makes the init process TaskExit notification only fire once the
Silo/UtilityVM are successfully torn down making sure there are no resources in
use when the TaskExit is sent.
Signed-off-by: Justin Terry (VM) [email protected]