Open felixge opened 10 hours ago
Related Issues
Related Code Changes
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Change https://go.dev/cl/631895 mentions this issue: cmd/trace: also show end stack traces
I just realized that this also seems to be a regression compared to go1.22. It seems like the old behavior was to always show the end stack trace, and only to show the start stack trace when the goroutine was created (?), see screenshots below. (I re-executed the program in go1.22, but the 3rd screenshot also shows a span that was preceeded by a short execution that got preempted).
So maybe the case can be made to include this into go1.24 despite the freeze and potentially even a backport to go1.23?
cc: @golang/runtime
Since this is a regression and very simple, I personally think it would be OK to backport.
Go version
go version devel go1.24-733df2bc0a 2024-11-25 02:23:41 +0000 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
I generated an execution trace for a simple Go program that has a single goroutine that runs for 10ms on CPU followed by 10ms of sleep in a loop.
What did you see happen?
Clicking on the first three goroutine spans, I see:
Showing only the start stack traces also makes it impossible to see the last stack trace produced by a goroutine.
What did you expect to see?
Showing both start and end stack traces would make it much easier to understand the trace:
update: I realized this is not just a "nice to have" but actually a regression compared to go1.22, see comment below.
cc @mknyszek @prattmic @nsrip-dd - CL for this is submitted below