diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-08-27 20:35:00 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-08-27 20:36:10 -0700 |
commit | ae648bafda2d82a6641e4a28bed34dae40d426ec (patch) | |
tree | 5dc17ed7030585e6b140e1e743474e78e501a2d9 /runsc/boot/config.go | |
parent | a4529c1b5b485f6283367bfdc0e4228bbbd3e51f (diff) |
Add command-line parameter to trigger panic on signal
This is to troubleshoot problems with a hung process that is
not responding to 'runsc debug --stack' command.
PiperOrigin-RevId: 210483513
Change-Id: I4377b210b4e51bc8a281ad34fd94f3df13d9187d
Diffstat (limited to 'runsc/boot/config.go')
-rw-r--r-- | runsc/boot/config.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runsc/boot/config.go b/runsc/boot/config.go index bc392deb3..efb8563ea 100644 --- a/runsc/boot/config.go +++ b/runsc/boot/config.go @@ -204,7 +204,12 @@ type Config struct { // TODO: Remove this when multiple container is fully supported. MultiContainer bool + // WatchdogAction sets what action the watchdog takes when triggered. WatchdogAction watchdog.Action + + // PanicSignal register signal handling that panics. Usually set to + // SIGUSR2(12) to troubleshoot hangs. -1 disables it. + PanicSignal int } // ToFlags returns a slice of flags that correspond to the given Config. @@ -225,5 +230,6 @@ func (c *Config) ToFlags() []string { "--strace-syscalls=" + strings.Join(c.StraceSyscalls, ","), "--strace-log-size=" + strconv.Itoa(int(c.StraceLogSize)), "--watchdog-action=" + c.WatchdogAction.String(), + "--panic-signal=" + strconv.Itoa(c.PanicSignal), } } |