]> Cypherpunks repositories - gostls13.git/commit
runtime: clean up dead P trace state when disabling tracing too
authorMichael Anthony Knyszek <mknyszek@google.com>
Mon, 26 Feb 2024 20:36:29 +0000 (20:36 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 8 Mar 2024 19:58:37 +0000 (19:58 +0000)
commitccfcc30f3e3ce90bad0b7a40f79eee78da6adb47
tree9b0764a2eb840d2c90a80471ce344be0101d9cab
parent7348773640c1cf5c1c9d00e1957d859d9115c230
runtime: clean up dead P trace state when disabling tracing too

Right now, we're careful to clean up dead P state when we advance to
future trace generations. If we don't, then if that P comes back to
life, we might end up using its old stale trace state.

Unfortunately, we never handled this in the case when tracing stops,
only when advancing to new generations. As a result, stopping a trace,
starting it again, and then bringing a P back to life in the following
generation meant that the dead P could be using stale state.

Fixes #65318.

Change-Id: I9297d9e58a254f2be933b8007a6ef7c5ec3ef4f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/567077
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
src/runtime/trace2.go