diff --git a/pkg/sentry/platform/systrap/subprocess.go b/pkg/sentry/platform/systrap/subprocess.go index 0de9fb592..3a4416385 100644 --- a/pkg/sentry/platform/systrap/subprocess.go +++ b/pkg/sentry/platform/systrap/subprocess.go @@ -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)) }