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
x/build/cmd/gorebuild: expects go1.21.1.linux-armv6l.tar.gz and v0.0.1-go1.21.1.linux-arm.zip to be rebuildable without explicitly setting GOARM=6
#62514
Closed
dmitshur opened this issue
Sep 7, 2023
· 1 comment
As visible at https://go.dev/rebuild, gorebuild has uncovered the possibility of non-reproducibility on go1.21.1.linux-armv6l.tar.gz (and its module zip version, v0.0.1-go1.21.1.linux-arm.zip) in the generated zbootstrap.go file:
00:18:56 start go1.21.1.linux-armv6l.tar.gz
00:18:57 running ./make.bash env=[GOOS=linux GOARCH=arm] args=[-distpack]
GOROOT=/tmp/gorebuild-2727667220/repro-go1.21.1-linux-arm
GOROOT_BOOTSTRAP=/tmp/gorebuild-2727667220/bootstrap-go1.17
00:23:28 ./make.bash completed:
[...]
00:23:30 downloaded https://go.dev/dl/go1.21.1.linux-armv6l.tar.gz
[...]
00:23:40 go/src/internal/buildcfg/zbootstrap.go: rebuilt content = 9b9b164a90356243047a503d31db564a28b1755bd29abae578e41de887f51411, posted = 6844cf01f46966ecda7d5d1536707cd8cba66633cf2855130aedd2ced023d4a9
00:23:41 FAIL: rebuilt SHA256 f3c90445e7966d887bb7fdbd59b24f1e6821458f28022558ce723ab4a7ad8ff5 does not match public download SHA256 f3716a43f59ae69999841d6007b42c9e286e8d8ce470656fb3e70d7be2d7ca85
The linux/arm release archives have been historically built with GOARM=6, not the more common modern GOARM value 7, with the "v6l" suffix in the filename alluding to that. That briefly broke after the switch to distpack and reported in #62164, and go1.21.1 is the first distpack-based release with that fix (CL 521555), so this is working as intended for the published binaries.
For this particular case, we can teach gorebuild to interpret the "v6l" suffix in the .tar.gz release archive and explicitly set GOARM=6 to the make.bash -distpack environment, though there's no filename-based indicator for the "v0.0.1-go1.21.1.linux-arm.zip" module zip file.
That said, a part of this problem is more general. When make.bash runs, GOARM can default to one of 5, 6, or 7 depending on the system where it's running (see here), so unless it's explicitly set, gorebuild will report false positives it run on a system that defaults to a value different from what we chose (or defaulted to) during the release process. This applies to other similar make.bash configuration (GO386, GOAMD64, GOPPC64, etc.) if its value is dynamically determined. But this is minor enough that it's fine to leave out of scope here; we can track it in a separate issue if needed.
The text was updated successfully, but these errors were encountered:
dmitshur
added
Builders
x/build issues (builders, bots, dashboards)
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Sep 7, 2023
Change https://go.dev/cl/526263 mentions this issue: cmd/gorebuild: add GOARM=6 special case to reproduce linux/arm downloads
dmitshur
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Sep 11, 2023
As visible at https://go.dev/rebuild,
gorebuild
has uncovered the possibility of non-reproducibility on go1.21.1.linux-armv6l.tar.gz (and its module zip version, v0.0.1-go1.21.1.linux-arm.zip) in the generated zbootstrap.go file:Full Log
I can reproduce the rebuild content with sha256 of "9b9b164a90356243047a503d31db564a28b1755bd29abae578e41de887f51411" locally with:
src $ git checkout go1.21.1 src $ GOOS=linux GOARCH=arm ./make.bash -distpack # extract ../pkg/distpack/go1.21.1.linux-arm.tar.gz to ../pkg/distpack/go src $ shasum -a 256 ../pkg/distpack/go/src/internal/buildcfg/zbootstrap.go 9b9b164a90356243047a503d31db564a28b1755bd29abae578e41de887f51411 ../pkg/distpack/go/src/internal/buildcfg/zbootstrap.go
The diff with the published zbootstrap.go in go1.21.1.linux-armv6l.tar.gz is:
The linux/arm release archives have been historically built with GOARM=6, not the more common modern GOARM value 7, with the "v6l" suffix in the filename alluding to that. That briefly broke after the switch to distpack and reported in #62164, and go1.21.1 is the first distpack-based release with that fix (CL 521555), so this is working as intended for the published binaries.
For this particular case, we can teach gorebuild to interpret the "v6l" suffix in the .tar.gz release archive and explicitly set GOARM=6 to the make.bash -distpack environment, though there's no filename-based indicator for the "v0.0.1-go1.21.1.linux-arm.zip" module zip file.
That said, a part of this problem is more general. When make.bash runs, GOARM can default to one of 5, 6, or 7 depending on the system where it's running (see here), so unless it's explicitly set, gorebuild will report false positives it run on a system that defaults to a value different from what we chose (or defaulted to) during the release process. This applies to other similar make.bash configuration (GO386, GOAMD64, GOPPC64, etc.) if its value is dynamically determined. But this is minor enough that it's fine to leave out of scope here; we can track it in a separate issue if needed.
CC @rsc, @golang/release.
The text was updated successfully, but these errors were encountered: