We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a905b0f + 7718d06 commit ffe0b69Copy full SHA for ffe0b69
1 file changed
cmd/containerd/command/main.go
@@ -291,4 +291,14 @@ func dumpStacks() {
291
}
292
buf = buf[:stackSize]
293
logrus.Infof("=== BEGIN goroutine stack dump ===\n%s\n=== END goroutine stack dump ===", buf)
294
+
295
+ // Also write to file to aid gathering diagnostics
296
+ name := filepath.Join(os.TempDir(), fmt.Sprintf("containerd.%d.stacks.log", os.Getpid()))
297
+ f, err := os.Create(name)
298
+ if err != nil {
299
+ return
300
+ }
301
+ defer f.Close()
302
+ f.WriteString(string(buf))
303
+ logrus.Infof("goroutine stack dump written to %s", name)
304
0 commit comments