You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cmd/trace: "failed to parse trace: no consistent ordering of events possible" #29707
I ran a network intensive go program (closed source) with a fairly light workload.
What did you expect to see?
I expect to be able to obtain a trace profile and explore it with the viewer program.
What did you see instead?
After obtaining the profile with wget -O trace.out "http://localhost:6060/debug/pprof/trace?seconds=10". When running go tool trace trace.out I received:
2019/01/12 12:37:26 Parsing trace...
failed to parse trace: no consistent ordering of events possible
changed the title [-]failed to parse trace: no consistent ordering of events possible[/-][+]net/http/pprof: "failed to parse trace: no consistent ordering of events possible"[/+]on Jan 30, 2019
changed the title [-]net/http/pprof: "failed to parse trace: no consistent ordering of events possible"[/-][+]cmd/trace: "failed to parse trace: no consistent ordering of events possible"[/+]on Jan 30, 2019
#16755 was the first one that came to my mind, but I've never seen the issue with darwin/amd64, so I am not sure. I am not aware of cmd/trace issues involving cgo.
@256dpi is it possible to share the captured trace with me?
--- FAIL: TestTraceStressStartStop (1.14s)
trace_test.go:147: failed to parse trace: no consistent ordering of events possible
FAIL
FAIL runtime/trace 1.574s
Have the same issue on Go 1.18.3 linux/amd64, in my case Python's the main, calling Go via CFFI (C basically). While Python/C creates its own threads, the problem happens when there's high concurrency. Unfortunately in my case I can't control the Python side so any idea on how to work around this would be great.
Activity
256dpi commentedon Jan 15, 2019
I have to add, I was testing a binary that was linked with C code (CGO). Is it possible that tracing does not work properly in CGO builds?
[-]failed to parse trace: no consistent ordering of events possible[/-][+]net/http/pprof: "failed to parse trace: no consistent ordering of events possible"[/+]bcmills commentedon Jan 30, 2019
CC @rsc @hyangah @matloob @dvyukov for
pprofandtrace[-]net/http/pprof: "failed to parse trace: no consistent ordering of events possible"[/-][+]cmd/trace: "failed to parse trace: no consistent ordering of events possible"[/+]hyangah commentedon Jan 30, 2019
#16755 was the first one that came to my mind, but I've never seen the issue with darwin/amd64, so I am not sure. I am not aware of cmd/trace issues involving cgo.
@256dpi is it possible to share the captured trace with me?
AlexRouSg commentedon May 4, 2019
@hyangah I just ran into this and made a repo.
Basically it happens when you export a Go function to C and then call that function inside a C created thread.
bcmills commentedon Jun 26, 2019
Here's a related flake in
runtime/trace.TestTraceStressStartStopon thefreebsd-amd64-12_0builder:https://build.golang.org/log/65ddd079bfd87715555a97b296b41dfa64ff12b6
let4be commentedon Feb 17, 2020
Any update? I cannot parse trace created on arm64 from x86 machine
bcmills commentedon May 4, 2020
2020-05-04T18:16:49-4c003f6/linux-amd64-jessie
2020-05-02T18:10:49-9439a7d/linux-arm
2020-05-01T18:01:28-b565d1e/linux-amd64
2020-05-01T15:02:37-f092be8/windows-amd64-longtest
2019-11-22T21:09:43-9f3c2b6/windows-amd64-longtest
21 remaining items
yalon commentedon Jul 11, 2022
Have the same issue on Go 1.18.3 linux/amd64, in my case Python's the main, calling Go via CFFI (C basically). While Python/C creates its own threads, the problem happens when there's high concurrency. Unfortunately in my case I can't control the Python side so any idea on how to work around this would be great.
prattmic commentedon Aug 15, 2022
Temporarily reverted in https://go.dev/cl/423437.
gopherbot commentedon Sep 10, 2022
Change https://go.dev/cl/429858 mentions this issue:
runtime/trace: add missing events for the locked g in extra M.runtime/trace: add missing events for the locked g in extra M.
runtime/trace: add missing events for the locked g in extra M.