Skip to content
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

build: make.bash fails for GOOS=plan9 GOARCH=386 #67502

Open
dmitshur opened this issue May 18, 2024 · 6 comments
Open

build: make.bash fails for GOOS=plan9 GOARCH=386 #67502

dmitshur opened this issue May 18, 2024 · 6 comments
Labels
arch-386 Issues solely affecting the 32-bit x86 architecture NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Plan9

Comments

@dmitshur
Copy link
Contributor

dmitshur commented May 18, 2024

As reported by the plan9-386-0intro builder and legacy misc-compile-plan9-386 trybot, the plan9/386 port fails to bootstrap:

gotip $ git rev-parse HEAD
e7bf9959fd9ea649e1513cef16f91f81b136045f
gotip $ cd src                           
src $ GOOS=plan9 GOARCH=386 ./make.bash
Building Go cmd/dist using /usr/local/go. (go1.22.3 darwin/arm64)
Building Go toolchain1 using /usr/local/go.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building commands for host, darwin/arm64.
Building packages and commands for target, plan9/386.
go tool dist: unexpected stale targets reported by /Users/gopher/gotip/pkg/tool/darwin_arm64/go_bootstrap list -gcflags="" -ldflags="" for [cmd/asm cmd/cgo cmd/compile cmd/link cmd/preprofile] (consider rerunning with GOMAXPROCS=1 GODEBUG=gocachehash=1):
	STALE cmd/compile: not installed but available in build cache

src $ echo $?
2

Also see https://build.golang.org/log/f237bed35a32f61819468d4cfd1b28946cb3e4d1 and https://storage.googleapis.com/go-build-log/ecc40e66/misc-compile-plan9-386_f210191c.log.

This doesn't happen for other ports. It also doesn't happen for other GOARCH values of GOOS=plan9 like plan9/amd64 and plan9/arm, only for plan9/386.

CC @golang/plan9.

@dmitshur dmitshur added OS-Plan9 NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. arch-386 Issues solely affecting the 32-bit x86 architecture labels May 18, 2024
@0intro
Copy link
Member

0intro commented May 18, 2024

It looks like it's broken since CL 577935.

CC @millerresearch

@0intro
Copy link
Member

0intro commented May 18, 2024

This change works around the issue:

--- a/src/cmd/compile/internal/ssagen/ssa.go
+++ b/src/cmd/compile/internal/ssagen/ssa.go
@@ -7316,7 +7316,7 @@ func genssa(f *ssa.Func, pp *objw.Progs) {
 		//   good for amd64
 		//   not helpful for Apple Silicon
 		//
-		case "amd64", "386":
+		case "amd64":
 			// Align to 64 if 31 or fewer bytes remain in a cache line
 			// benchmarks a little better than always aligning, and also
 			// adds slightly less to the (PGO-compiled) binary size.

The question is now why it doesn't work for plan9/386?

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/586775 mentions this issue: dashboard: remove misc-compile-plan9-386

gopherbot pushed a commit to golang/build that referenced this issue May 20, 2024
The plan/386 port doesn't bootstrap at this time. Remove it from the
current misc-compile trybot set to get them passing while the Plan 9
issue is being investigated and fixed.

For golang/go#67502.

Change-Id: Ie7bb48c9efd3e82bf72a18ac976e609d795d5c81
Reviewed-on: https://go-review.googlesource.com/c/build/+/586775
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/586835 mentions this issue: cmd/compile: disable AlignHot on plan9/386

gopherbot pushed a commit that referenced this issue May 21, 2024
CL 577935 enabled hot block alignment on 386
and amd64 architecture.

However, this change broke the plan9/386 build.

This change disables  AlignHot on plan9/386.

Updates #67502.

Change-Id: If73b066824c7218a9408c6e8f06aec5908b7a64f
Reviewed-on: https://go-review.googlesource.com/c/go/+/586835
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: David du Colombier <0intro@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/589656 mentions this issue: dashboard: restore misc-compile-plan9-386

@dmitshur
Copy link
Contributor Author

dmitshur commented Jun 1, 2024

The bootstrap failure is now resolved via CL 586835, which is what the original report was about. Perhaps it would work well to close this issue and open a separate one to investigate why AlignHot breaks plan9/386 bootstrapping, and possibly track re-enabling it.

gopherbot pushed a commit to golang/build that referenced this issue Jun 3, 2024
CL 586835 made "disabled due to go.dev/issue/67502" no longer apply,
so bring it back.

For golang/go#67502.

Change-Id: Ibe22740f155f46da7ae6ae2ea0087b51e3e99b7b
Reviewed-on: https://go-review.googlesource.com/c/build/+/589656
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David du Colombier <0intro@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-386 Issues solely affecting the 32-bit x86 architecture NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Plan9
Projects
None yet
Development

No branches or pull requests

4 participants
@dmitshur @0intro @gopherbot and others