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/main.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/main.go')
-rw-r--r-- | runsc/main.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/runsc/main.go b/runsc/main.go index 0a2cbca6c..773ec6486 100644 --- a/runsc/main.go +++ b/runsc/main.go @@ -61,6 +61,7 @@ var ( overlay = flag.Bool("overlay", false, "wrap filesystem mounts with writable overlay. All modifications are stored in memory inside the sandbox.") multiContainer = flag.Bool("multi-container", false, "enable *experimental* multi-container support.") 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.") ) var gitRevision = "" @@ -139,6 +140,7 @@ func main() { StraceLogSize: *straceLogSize, MultiContainer: *multiContainer, WatchdogAction: wa, + PanicSignal: *panicSignal, } if len(*straceSyscalls) != 0 { conf.StraceSyscalls = strings.Split(*straceSyscalls, ",") |