diff options
author | Jamie Liu <jamieliu@google.com> | 2020-11-13 18:09:15 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-13 18:10:55 -0800 |
commit | 182c126013a28f19594ff61326f1f9a2c481f1b4 (patch) | |
tree | 154781219cefea14a41d32e2465cebb6bfc0fd51 /pkg/sentry/watchdog | |
parent | 0fee59c8c84bff0185e681b4550ba077a65739f2 (diff) |
Log task goroutine IDs in the sentry watchdog.
PiperOrigin-RevId: 342373580
Diffstat (limited to 'pkg/sentry/watchdog')
-rw-r--r-- | pkg/sentry/watchdog/watchdog.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pkg/sentry/watchdog/watchdog.go b/pkg/sentry/watchdog/watchdog.go index bbafb8b7f..1d1062aeb 100644 --- a/pkg/sentry/watchdog/watchdog.go +++ b/pkg/sentry/watchdog/watchdog.go @@ -336,11 +336,9 @@ func (w *Watchdog) report(offenders map[*kernel.Task]*offender, newTaskFound boo buf.WriteString(fmt.Sprintf("Sentry detected %d stuck task(s):\n", len(offenders))) for t, o := range offenders { tid := w.k.TaskSet().Root.IDOfTask(t) - buf.WriteString(fmt.Sprintf("\tTask tid: %v (%#x), entered RunSys state %v ago.\n", tid, uint64(tid), now.Sub(o.lastUpdateTime))) + buf.WriteString(fmt.Sprintf("\tTask tid: %v (goroutine %d), entered RunSys state %v ago.\n", tid, t.GoroutineID(), now.Sub(o.lastUpdateTime))) } - buf.WriteString("Search for '(*Task).run(0x..., 0x<tid>)' in the stack dump to find the offending goroutine") - // Force stack dump only if a new task is detected. w.doAction(w.TaskTimeoutAction, newTaskFound, &buf) } |