From 192a55970faec623d9ecf4dcd6190b44e71070c5 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Mon, 6 Mar 2023 15:44:27 +0100 Subject: [PATCH] windows: disable parallelism on Windows This is an attempt to figure out why the Windows CI keeps crashing. It should be removed before the next release, by which point we should know whether this has helped or not. --- main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.go b/main.go index 3bfea182..481e92ba 100644 --- a/main.go +++ b/main.go @@ -1508,6 +1508,15 @@ func main() { defer pprof.StopCPUProfile() } + // Limit the number of threads to one. + // This is an attempted workaround for the crashes we're seeing in CI on + // Windows. If this change helps, it indicates there is a concurrency issue. + // If it doesn't, then there is something else going on. Either way, this + // should be removed once the test is done. + if runtime.GOOS == "windows" { + runtime.GOMAXPROCS(1) + } + switch command { case "build": pkgName := "."