-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/debug/cmd/viewcore: panic when loading Go 1.23 core #71182
Comments
cc @golang/runtime |
I think this crash can happen if there was a goroutine actively allocating a new large object. Are any of the goroutines in the core in the allocator? (If so, then the fix is straightforward, which is to tolerate the bad address being nil. It's used for finding pointers, and in this case there aren't any relevant pointers, so it's the correct fix.) |
Change https://go.dev/cl/641515 mentions this issue: |
Hmm... I don't see any goroutines doing allocation. Here are the "running" goroutines in the core, according to delve:
Goroutine 129 is getting signal. Goroutine 132 is crashing while stopping the tracer (this is from my investigation of #69085), and Goroutine 2679 is doing a cgo call. I dumped the rest of the stacks and grepped for I can also try poking around with a debugger and see if I can pinpoint where this failure is happening. |
Does delve show things running on the system stack? I'm not familiar enough with delve to say for sure. The patch, even if not the right fix, should allow viewcore to make progress on your core file, at the very least. But it would be helpful if you could print some information out of the mspan for the large object, just before the point of failure. |
Patch set 2 of the linked CL gets viewcore to run successfully for me. Still haven't tracked down in delve whether the program was allocating when the core was taken. Happy to keep looking/collecting info if you want to further diagnose this. |
Go version
go version go1.24rc1 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
Built
cmd/viewcore
from the latest commit (https://go.googlesource.com/debug/+/b341049684da5bace4625c231b50de1ef2e6a453) and tried to open a Go 1.23 core:What did you see happen?
The program ran for a bit, then panicked:
What did you expect to see?
No panic. FWIW Delve v1.23.1 seems to handle the core fine. I can open the core with the debugger and get goroutine stacks, etc.
The binary and core dump are from an internal production service so I'm hesitant to share them. But I'm happy to collect any info that would help, test out patches, etc.
The text was updated successfully, but these errors were encountered: