cmd/go: rare corruption of elf binary #63191
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
I have been unable to reproduce this at all. So it is obviously a rare failure of some component somewhere.
I believe this may have nothing to do with the Go toolchain but that an error report may be appreciated anyway. Please feel free to close this if that seems the appropriate course of action.
What operating system and processor architecture are you using (
go env
)?go version: 1.20.8, linux/amd64. Linux 6.4.16; Small binary built on NixOS (NixOS/nixpkgs@d64aec9 using nixpkgs
buildGoModule
[0]).What did you do?
Build a fairly simple Go binary which uses HTTP and run it.
What did you expect to see?
A well formed binary.
What did you see instead?
Upon running the program, junk binary data printed to terminal, segfault. Corrupted binary. Rebuild [via nixpkgs, so no caches involved] produced the expected result.
Details
Reproduction attempts so far failed across thousands of builds. I can't rule out filesystem or hardware corruption though was unable to detect those with memcheck and further testing either. Could also be a nixpkgs or other toolchain bug. A friend and I worked out the corruption function (
bork
, below). Which from the offsets doesn't feel likely to be filesystem corruption either.[0] Build env repro below, supply your own sources, if you have nix installed, put source code in
.
and fixvendorHash
when it complains. Note that NixOS also does other binary mangling, those things may also be implicated.The text was updated successfully, but these errors were encountered: