]> Cypherpunks repositories - gostls13.git/commit
runtime: track goroutine location until actual STW
authorMichael Pratt <mpratt@google.com>
Thu, 20 Nov 2025 21:21:09 +0000 (16:21 -0500)
committerGopher Robot <gobot@golang.org>
Thu, 20 Nov 2025 23:01:20 +0000 (15:01 -0800)
commitd58b733646d2d52638b08d5c44afbc7292aeca4d
tree661dfaf3d3b6252bf4892c42c2d9b4e7eb17a951
parent1bc54868d4fd03e3716e7ad9669d87c34c8aaa2d
runtime: track goroutine location until actual STW

TestTraceSTW / TestTraceGCSTW currently tracks the location (M/P) of the
target goroutines until it reaches the "start" log message, assuming the
actual STW comes immediately afterwards.

On 386 with TestTraceGCSTW, it actually tends to take >10ms after the
start log before the STW actually occurs. This is enough time for sysmon
to preempt the target goroutines and migration them to another location.

Fix this by continuing tracking all the way until the STW itself occurs.
We still keep the start log message so we can ignore any STW (if any)
before we expect.

Cq-Include-Trybots: luci.golang.try:gotip-linux-386-longtest,gotip-linux-amd64-longtest
Change-Id: I6a6a636cf2dcb18d8b33ac4ad88333cabff2eabb
Reviewed-on: https://go-review.googlesource.com/c/go/+/722520
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/proc_test.go