aboutsummaryrefslogtreecommitdiffstats
path: root/vm/gvisor/gvisor.go
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2018-12-21 07:59:31 -0800
committerDmitry Vyukov <dvyukov@google.com>2018-12-21 18:08:49 +0100
commit603b512405c78d0143dc44bed638f70f01f9f95c (patch)
tree7fb43773a069d0cf80c6b2458b90c9b2c3282f08 /vm/gvisor/gvisor.go
parent2fc01104d0081e0178522d3aa59938b7c3e0de57 (diff)
vm/gvisor: use runsc debug --stacks to diagnose
This feature has been around longer than -trace-signal. It returns the stacks directly, which we then append to the kernel log.
Diffstat (limited to 'vm/gvisor/gvisor.go')
-rw-r--r--vm/gvisor/gvisor.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/vm/gvisor/gvisor.go b/vm/gvisor/gvisor.go
index e1e18b98a..6ae6151b6 100644
--- a/vm/gvisor/gvisor.go
+++ b/vm/gvisor/gvisor.go
@@ -190,7 +190,6 @@ func (inst *instance) runscCmd(add ...string) *exec.Cmd {
args := []string{
"-root", inst.rootDir,
"-watchdog-action=panic",
- "-trace-signal=12",
"-network=none",
"-debug",
}
@@ -328,8 +327,11 @@ func (inst *instance) guestProxy() (*os.File, error) {
}
func (inst *instance) Diagnose() ([]byte, bool) {
- osutil.Run(time.Minute, inst.runscCmd("debug", "-signal=12", inst.name))
- return nil, true
+ b, err := osutil.Run(time.Minute, inst.runscCmd("debug", "-stacks", inst.name))
+ if err != nil {
+ b = append(b, []byte(fmt.Sprintf("\n\nError collecting stacks: %v", err))...)
+ }
+ return b, false
}
func init() {