]> Cypherpunks repositories - gostls13.git/commit
internal/trace: emit a Sync event even if the next generation is broken
authorMichael Anthony Knyszek <mknyszek@google.com>
Mon, 10 Feb 2025 20:10:22 +0000 (20:10 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 10 Feb 2025 21:39:31 +0000 (13:39 -0800)
commit283296195b7a06239310871a4321bd649a078924
tree2c1af0d22b08ce8fc5232caac7329ef7bba0ff44
parentee8db080c8ca99bae0288f4cf19110cdfb179e35
internal/trace: emit a Sync event even if the next generation is broken

Since CL 644215 each Sync event now represents the coming generation,
with a final Sync event emitted even when there's nothing ahead. This
change however failed to emit a Sync event at the end of a completely
valid generation when the next generation was invalid, causing the
runtime test TestCrashWhileTracing to start failing.

Fix this by emitting a final Sync event even when the next generation is
broken. We hold onto the error in parsing the next generation and emit
it after that final Sync event.

(Should these "final" Sync events distinguish themselves in some way?)

Fixes #71615.

Change-Id: I1f8abee5abaa39e1219e6fa05e9f82f1478db4c9
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/648195
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/internal/trace/reader.go