From 255ed03a94c4c91840f16fe417a7ed5097a04862 Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Mon, 23 Oct 2023 10:22:17 +0700 Subject: [PATCH] runtime: allow for 10 more threads in TestWindowsStackMemory* CL 473415 allowed 5 more threads in TestWindowsStackMemory, to cover sysmon and any new threads in future. However, during go1.22 dev cycle, the test becomes flaky again, failing in windows-386 builder a couple of times in CL 535975 and CL 536175 (and maybe others that haven't caught). This CL increases the extra threads from 5 to 10, hopefully to make the test stable again for windows-386. The theory is that Go process load a bunch of DLLs, which may start their own threads. We could investigate more deeply if the test still be flaky with 10 extra threads. Fixes #58570 Change-Id: I255d0d31ed554859a5046fa76dfae1ba89a89aa3 Reviewed-on: https://go-review.googlesource.com/c/go/+/536058 Reviewed-by: Benny Siegert Reviewed-by: Quim Muntal LUCI-TryBot-Result: Go LUCI Auto-Submit: Cuong Manh Le Reviewed-by: Michael Pratt --- src/runtime/testdata/testprog/syscall_windows.go | 4 ++-- src/runtime/testdata/testprogcgo/stack_windows.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runtime/testdata/testprog/syscall_windows.go b/src/runtime/testdata/testprog/syscall_windows.go index 71bf384dc1..a9b8c090cf 100644 --- a/src/runtime/testdata/testprog/syscall_windows.go +++ b/src/runtime/testdata/testprog/syscall_windows.go @@ -67,7 +67,7 @@ func StackMemory() { panic(err) } // assumes that this process creates 1 thread for each - // thread locked goroutine plus extra 5 threads + // thread locked goroutine plus extra 10 threads // like sysmon and others - print((mem2 - mem1) / (threadCount + 5)) + print((mem2 - mem1) / (threadCount + 10)) } diff --git a/src/runtime/testdata/testprogcgo/stack_windows.go b/src/runtime/testdata/testprogcgo/stack_windows.go index 0be1126bee..d095093c85 100644 --- a/src/runtime/testdata/testprogcgo/stack_windows.go +++ b/src/runtime/testdata/testprogcgo/stack_windows.go @@ -51,7 +51,7 @@ func StackMemory() { panic(err) } // assumes that this process creates 1 thread for each - // thread locked goroutine plus extra 5 threads + // thread locked goroutine plus extra 10 threads // like sysmon and others - print((mem2 - mem1) / (threadCount + 5)) + print((mem2 - mem1) / (threadCount + 10)) } -- 2.50.0