Skip to content

Handle Process/Container not found errors and force exits#571

Merged
jterry75 merged 3 commits intomasterfrom
shim_mitigations
Apr 17, 2019
Merged

Handle Process/Container not found errors and force exits#571
jterry75 merged 3 commits intomasterfrom
shim_mitigations

Conversation

@jterry75
Copy link
Contributor

  • Fix panic on hcs/process.Close() with nil error
  • Force HCS process exit on ERROR_NOT_FOUND
  • Force UVM exit after 30 seconds of issuing SIGKILL

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
1. When a SIGKILL is sent to the init process we force the UVM exit after 30
seconds in order to make sure that whatever state the guest is in the exit is
honored.

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
@jterry75 jterry75 requested review from kevpar and lowenna April 17, 2019 20:11
@jterry75
Copy link
Contributor Author

The GCS side: microsoft/opengcs#294

// closing `he.p` and unblocking all waiters.
go func() {
// Give the HCS 1 second to finish and deliver the notification.
time.Sleep(1 * time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why even wait?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have to wait because if we don't and this was a valid exit we wont be able to capture the proper exit code

@jterry75 jterry75 merged commit 672e52e into master Apr 17, 2019
@jterry75 jterry75 deleted the shim_mitigations branch April 17, 2019 21:10
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