Skip to content

Change HCS TaskExit ownership responsibility#533

Merged
lowenna merged 2 commits intomasterfrom
wait_vm_or_container
Mar 25, 2019
Merged

Change HCS TaskExit ownership responsibility#533
lowenna merged 2 commits intomasterfrom
wait_vm_or_container

Conversation

@jterry75
Copy link
Contributor

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]

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]>
@jterry75 jterry75 requested a review from lowenna March 22, 2019 17:53
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]>
@jterry75
Copy link
Contributor Author

@jhowardmsft - This is good and should fully fix your RS1 issue. PTAL

Copy link
Contributor

@lowenna lowenna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Verified Private

@lowenna lowenna merged commit 8abdbb8 into master Mar 25, 2019
@lowenna lowenna deleted the wait_vm_or_container branch March 25, 2019 16:49
princepereira pushed a commit to princepereira/hcsshim that referenced this pull request Aug 29, 2024
Change HCS TaskExit ownership responsibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants