diff options
author | Michael Pratt <mpratt@google.com> | 2018-12-11 16:11:53 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-12-11 16:12:41 -0800 |
commit | 24c1158b9c21f7f8b7126e810d623a518422052e (patch) | |
tree | 960457b3b0476b1b9c61710f9526db953ba80f17 /runsc/main.go | |
parent | 2b6df6a2049e839e39717f90c1760f3d410c98f1 (diff) |
Add "trace signal" option
This option is effectively equivalent to -panic-signal, except that the
sandbox does not die after logging the traceback.
PiperOrigin-RevId: 225089593
Change-Id: Ifb1c411210110b6104613f404334bd02175e484e
Diffstat (limited to 'runsc/main.go')
-rw-r--r-- | runsc/main.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runsc/main.go b/runsc/main.go index 81c36067b..013b250f7 100644 --- a/runsc/main.go +++ b/runsc/main.go @@ -62,7 +62,8 @@ var ( fileAccess = flag.String("file-access", "exclusive", "specifies which filesystem to use for the root mount: exclusive (default), shared. Volume mounts are always shared.") overlay = flag.Bool("overlay", false, "wrap filesystem mounts with writable overlay. All modifications are stored in memory inside the sandbox.") watchdogAction = flag.String("watchdog-action", "log", "sets what action the watchdog takes when triggered: log (default), panic.") - panicSignal = flag.Int("panic-signal", -1, "register signal handling that panics. Usually set to SIGUSR2(12) to troubleshoot hangs. -1 disables it.") + panicSignal = flag.Int("panic-signal", -1, "register signal handling that panics. Usually set to SIGUSR2(12) to troubleshoot hangs. -1 disables it. This takes precendence over -trace-signal.") + traceSignal = flag.Int("trace-signal", -1, "register signal handling that logs a traceback of all goroutines. Usually set to SIGUSR2(12) to troubleshoot hangs. -1 disables it.") ) // gitRevision is set during linking. @@ -144,6 +145,7 @@ func main() { StraceLogSize: *straceLogSize, WatchdogAction: wa, PanicSignal: *panicSignal, + TraceSignal: *traceSignal, } if len(*straceSyscalls) != 0 { conf.StraceSyscalls = strings.Split(*straceSyscalls, ",") |