-
Notifications
You must be signed in to change notification settings - Fork 18k
debug/elf: viewcore cannot read s390x z/Linux Go coredump: decoding dwarf section info at offset 0x0: too short #64431
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
Comments
CC @golang/s390x, @golang/compiler. |
I'll take a look, most likely a bit later this week. |
Thanks. I should have added that the error is about the
|
Hi @kgibm , I spent a little while exploring this issue. I have limited access to our s390x machine (no ssh, only gomote commands), and our machine does not have "gcore", but I did get as far as creating a core dump using a toy program and then running 'viewcore' on the dump. The good news is that viewcore was able to read the DWARF info for my toy program; the bad news is that it ran into problems later on (crash due to a different error of some sort). The crash I am seeing is
which is fairly early in the coredump reading process, it's having trouble making sense of the "g" structure for one of the program's goroutines. Viewcore is only sporadically/sparsely maintained, so it is entirely possible that something has changed in the runtime datastructures in the 1.21 timeframe that is throwing it off. Some questions for you:
Thanks. |
Empty
Empty I guess this explains my proximate issue. The executable also notes "stripped" which I presume is another symptom of lacking DWARF information: $ file manager
manager: ELF 64-bit MSB executable, IBM S/390, version 1 (SYSV), statically linked, Go BuildID=Kz1lgHB4w_kxUOvlQqtu/tq5tP0TciDudwbRV8f6M/f7kzpDaG_HNG7APeD9w6/3cdjWHx8fvnsL3NCm5MQ, stripped I will pass this on to the team producing the package. This is based on the Kubernetes operator-lifecycle-manager so I'm not sure if OLM is doing this or our build scripts. If you have any tips on how to check what is causing the stripping and/or how to maximize symbols, that would be helpful. Thanks! |
Yup, does indeed look like a stripped executable. Kubernetes for a number of other big binaries like So I think the thing to do would be to check if the build is being done with |
Yes, confirmed we are using |
Go version
go version go1.21.4 linux/s390x
What operating system and processor architecture are you using (
go env
)?What did you do?
A Go program is using excessive memory on z/Linux. We took a core dump with
gcore
, builtviewcore
on a z/Linux machine and tried to analyze the core but it failed:The error is coming from https://github.com/golang/debug/blob/master/internal/core/process.go#L263
Therefore it seems this is an issue with
debug/elf
rather thanviewcore
.The core dump looks fine and it is of the expected size matching the virtual size of the process:
What did you expect to see?
viewcore
worksWhat did you see instead?
The text was updated successfully, but these errors were encountered: