From db5f1d07c3966c2ef26cd0e7d81fd65f3458c328 Mon Sep 17 00:00:00 2001 From: Nicolas Lacasse Date: Fri, 12 Jun 2020 12:30:58 -0700 Subject: 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. --- vm/gvisor/gvisor.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vm/gvisor') 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, " ")...) -- cgit mrf-deployment