mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-27 05:10:43 +00:00
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.
This commit is contained in:
parent
2fc01104d0
commit
603b512405
@ -190,7 +190,6 @@ func (inst *instance) runscCmd(add ...string) *exec.Cmd {
|
|||||||
args := []string{
|
args := []string{
|
||||||
"-root", inst.rootDir,
|
"-root", inst.rootDir,
|
||||||
"-watchdog-action=panic",
|
"-watchdog-action=panic",
|
||||||
"-trace-signal=12",
|
|
||||||
"-network=none",
|
"-network=none",
|
||||||
"-debug",
|
"-debug",
|
||||||
}
|
}
|
||||||
@ -328,8 +327,11 @@ func (inst *instance) guestProxy() (*os.File, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (inst *instance) Diagnose() ([]byte, bool) {
|
func (inst *instance) Diagnose() ([]byte, bool) {
|
||||||
osutil.Run(time.Minute, inst.runscCmd("debug", "-signal=12", inst.name))
|
b, err := osutil.Run(time.Minute, inst.runscCmd("debug", "-stacks", inst.name))
|
||||||
return nil, true
|
if err != nil {
|
||||||
|
b = append(b, []byte(fmt.Sprintf("\n\nError collecting stacks: %v", err))...)
|
||||||
|
}
|
||||||
|
return b, false
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
Loading…
Reference in New Issue
Block a user