runsc: Set asyncpreemptoff for the kvm platform

The asynchronous goroutine preemption is a new feature of Go 1.14.

When we switched to go 1.14 (cl/297915917) in the bazel config,
the kokoro syscall-kvm job started permanently failing. Lets
temporary set asyncpreemptoff for the kvm platform to unblock tests.

PiperOrigin-RevId: 300372387
This commit is contained in:
Andrei Vagin
2020-03-11 11:45:50 -07:00
committed by gVisor bot
parent 2c2622b942
commit d3fa741fb5
+6
View File
@@ -444,6 +444,12 @@ func (s *Sandbox) createSandboxProcess(conf *boot.Config, args *Args, startSyncF
nextFD++
}
// TODO(b/151157106): syscall tests fail by timeout if asyncpreemptoff
// isn't set.
if conf.Platform == "kvm" {
cmd.Env = append(cmd.Env, "GODEBUG=asyncpreemptoff=1")
}
// The current process' stdio must be passed to the application via the
// --stdio-fds flag. The stdio of the sandbox process itself must not
// be connected to the same FDs, otherwise we risk leaking sandbox