diff options
| author | Nicolas Lacasse <nlacasse@google.com> | 2020-06-12 12:30:58 -0700 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-06-13 11:27:59 +0200 |
| commit | db5f1d07c3966c2ef26cd0e7d81fd65f3458c328 (patch) | |
| tree | 690a5f38afe6155e459801fd65d15986e04d958c | |
| parent | f4724dd308db90b80e69e5374332ef8c92bc38ec (diff) | |
vm/gvisor: Send debug logs to stderr so they can be read by syzkaller
The -alsologtostderr flag is a noop if -panic-log is also set. So before
this change, debug logs were not included in the syzkaller output logs.
By setting -debug-log=/dev/stderr, all debug logs are sent to stderr,
which syzkaller scrapes and includes in the output logs.
| -rw-r--r-- | vm/gvisor/gvisor.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vm/gvisor/gvisor.go b/vm/gvisor/gvisor.go index 5ba4bccf1..8d8454e25 100644 --- a/vm/gvisor/gvisor.go +++ b/vm/gvisor/gvisor.go @@ -215,7 +215,9 @@ func (inst *instance) runscCmd(add ...string) *exec.Cmd { "-watchdog-action=panic", "-network=none", "-debug", - "-alsologtostderr", + // Send debug logs to stderr, so that they will be picked up by + // syzkaller. Without this, debug logs are sent to /dev/null. + "-debug-log=/dev/stderr", } if inst.cfg.RunscArgs != "" { args = append(args, strings.Split(inst.cfg.RunscArgs, " ")...) |
