mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Handle sighandling.KillItself() return error.
Call dumpAndPanicSyscallError for the rare case where we fail to kill the the Sentry upon detecting an unexpected stub exit. This will provide enough information determine if a panic occur due to failed SIGKILL attempt or an unexpected event. PiperOrigin-RevId: 737751257
This commit is contained in:
@@ -609,7 +609,11 @@ func (t *thread) unexpectedStubExit() {
|
||||
// these cases, we don't need to panic. There is no reasons to
|
||||
// think that something wrong in gVisor.
|
||||
log.Warningf("The ptrace stub process %v has been killed by SIGKILL.", t.tgid)
|
||||
sighandling.KillItself()
|
||||
err := sighandling.KillItself()
|
||||
if err != nil {
|
||||
t.dumpAndPanic(fmt.Sprintf(
|
||||
"failed to kill the process %d:%d: %v", t.tgid, t.tid, err))
|
||||
}
|
||||
}
|
||||
t.dumpAndPanic(fmt.Sprintf("wait failed: the process %d:%d exited: %x (err %v)", t.tgid, t.tid, msg, err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user