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.
This commit is contained in:
Nicolas Lacasse 2020-06-12 12:30:58 -07:00 committed by Dmitry Vyukov
parent f4724dd308
commit db5f1d07c3

@ -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, " ")...)