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

x/build: "unexpected stale targets" on plan9-arm #49691

Open
bcmills opened this issue Nov 19, 2021 · 11 comments
Open

x/build: "unexpected stale targets" on plan9-arm #49691

bcmills opened this issue Nov 19, 2021 · 11 comments
Labels
arch-arm Issues solely affecting the 32-bit arm architecture. 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. OS-Plan9
Milestone

Comments

@bcmills bcmills added arch-arm Issues solely affecting the 32-bit arm architecture. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Plan9 labels Nov 19, 2021
@bcmills bcmills added this to the Backlog milestone Nov 19, 2021
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Nov 19, 2021
@millerresearch
Copy link
Contributor

millerresearch commented Nov 19, 2021

The error message is not that helpful for the uninitiated. What exactly does "build ID mismatch" mean? Is the staleness algorithm documented somewhere?

It can sometimes happen that make.rc is run on one builder, the result is saved as a snapshot and used to run 'dist test' on another builder. If the two builders are not configured exactly the same, is that likely to result in stale targets? I would hope not, because the snapshot contains all the source, object code, and toolchain, so it should be self-consistent in any environment. But it's hard to be certain without a definition of what "stale" is supposed to mean.

In some of the logs, there is clearly some other filesystem-related failure first (some bits of the tree have disappeared), which is likely what triggers the stale target report. But in other examples, the stale target report seems to be the first or only thing that has gone wrong.

@bcmills
Copy link
Contributor Author

bcmills commented Nov 19, 2021

@bcmills
Copy link
Contributor Author

bcmills commented Nov 19, 2021

The hash inputs include any relevant flags, tool versions, and whatever directory information will end up in the binary (which is itself a function of GOROOT_FINAL, GOROOT, and the working directory for the build.)

@bcmills
Copy link
Contributor Author

bcmills commented Nov 19, 2021

In the latest failure I see this line:

HASH[link cmd/dist]: "GOROOT=/tmp/workdir-rpi31/go\n"

Do all of the builders end up with the same working directory (/tmp/workdir-rpi31)? If not, then that could be the cause.

In #33598 we found that the darwin builders were sensitive to the PWD environment variable: their GOROOT was in a symlinked directory, so without a correct PWD they ended up reporting the underlying directory rather than the original path. Is there a similar consideration for Plan 9?

@millerresearch
Copy link
Contributor

There are two sets of plan9-arm Raspberry Pi builders, run by @0intro and myself, running slightly different scripts. Mine all use /boot/workdir/go as GOROOT, but David's use a different directory on each host because they're sharing the same server filesystem. @0intro, may I suggest that you add a bind in your script to use the same GOROOT as mine, and that should prevent stale target failures when the build and tests are run on different hosts.

That won't fix all cases, though. For example in this one, the tests are running immediately after building the whole system on the same machine, and getting stale dependencies on vendor/golang.org/x/text/unicode/norm. How is that possible? Is there something tricky about how the vendor subtree is built?

@0intro
Copy link
Member

0intro commented Nov 21, 2021

@0intro, may I suggest that you add a bind in your script to use the same GOROOT as mine, and that should prevent stale target failures when the build and tests are run on different hosts.

Yes, I'll try that.

@bcmills
Copy link
Contributor Author

bcmills commented Dec 7, 2022

@bcmills bcmills closed this as completed Dec 7, 2022
@gopherbot gopherbot reopened this Mar 8, 2023
@gopherbot
Copy link

Found new dashboard test flakes for:

#!watchflakes
post <- builder == "plan9-arm" && `unexpected stale targets`
2023-02-27 12:43 plan9-arm go@85b55c79 (log)
go tool dist: unexpected stale targets reported by /boot/workdir/go/pkg/tool/plan9_arm/go_bootstrap list -gcflags="" -ldflags="" for [std] (consider rerunning with GOMAXPROCS=1 GODEBUG=gocachehash=1):
	STALE encoding/csv: build ID mismatch
	STALE encoding/json: build ID mismatch
	STALE expvar: stale dependency: log
	STALE flag: build ID mismatch
	STALE go/ast: stale dependency: go/token
	STALE go/build: stale dependency: go/token
	STALE go/constant: stale dependency: go/token
	STALE go/doc: stale dependency: go/token
	STALE go/doc/comment: build ID mismatch
...
	STALE time/tzdata: build ID mismatch
	STALE vendor/golang.org/x/net/http/httpguts: stale dependency: log
	STALE vendor/golang.org/x/net/http/httpproxy: stale dependency: log
	STALE vendor/golang.org/x/net/http2/hpack: build ID mismatch
	STALE vendor/golang.org/x/net/idna: stale dependency: log
	STALE vendor/golang.org/x/net/nettest: stale dependency: internal/syscall/execenv
	STALE vendor/golang.org/x/text/secure/bidirule: stale dependency: log
	STALE vendor/golang.org/x/text/transform: build ID mismatch
	STALE vendor/golang.org/x/text/unicode/bidi: stale dependency: log
	STALE vendor/golang.org/x/text/unicode/norm: stale dependency: vendor/golang.org/x/text/transform

watchflakes

@gopherbot
Copy link

Found new dashboard test flakes for:

#!watchflakes
post <- builder == "plan9-arm" && `unexpected stale targets`
2023-05-23 11:36 plan9-arm go@5322e66a (log)
go tool dist: unexpected stale targets reported by /boot/workdir/go/pkg/tool/plan9_arm/go_bootstrap list -gcflags="" -ldflags="" for [cmd/asm cmd/cgo cmd/compile cmd/link] (consider rerunning with GOMAXPROCS=1 GODEBUG=gocachehash=1):
	STALE cmd/compile: stale dependency: go/build

watchflakes

@gopherbot
Copy link

Found new dashboard test flakes for:

#!watchflakes
post <- builder == "plan9-arm" && `unexpected stale targets`
2023-08-22 22:22 plan9-arm go@291a32aa (log)
go tool dist: unexpected stale targets reported by /boot/workdir/go/pkg/tool/plan9_arm/go_bootstrap list -gcflags="" -ldflags="" for [cmd] (consider rerunning with GOMAXPROCS=1 GODEBUG=gocachehash=1):
	STALE cmd/compile/internal/gc: stale dependency: cmd/compile/internal/importer
	STALE cmd/compile/internal/importer: build ID mismatch
	STALE cmd/compile/internal/noder: stale dependency: cmd/compile/internal/importer
	STALE cmd/compile/internal/pkginit: stale dependency: cmd/compile/internal/importer

watchflakes

@gopherbot
Copy link

Found new dashboard test flakes for:

#!watchflakes
post <- builder == "plan9-arm" && `unexpected stale targets`
2023-09-15 17:51 plan9-arm go@6192f461 (log)
go tool dist: unexpected stale targets reported by /boot/workdir/go/pkg/tool/plan9_arm/go_bootstrap list -gcflags="" -ldflags="" for [cmd] (consider rerunning with GOMAXPROCS=1 GODEBUG=gocachehash=1):
	STALE cmd/go: stale dependency: cmd/go/internal/work
	STALE cmd/go/internal/bug: stale dependency: cmd/go/internal/work
	STALE cmd/go/internal/clean: stale dependency: cmd/go/internal/work
	STALE cmd/go/internal/envcmd: stale dependency: cmd/go/internal/work
	STALE cmd/go/internal/fix: stale dependency: cmd/go/internal/work
	STALE cmd/go/internal/generate: stale dependency: cmd/go/internal/work
	STALE cmd/go/internal/list: stale dependency: cmd/go/internal/work
	STALE cmd/go/internal/modcmd: stale dependency: cmd/go/internal/work
	STALE cmd/go/internal/modget: stale dependency: cmd/go/internal/work
	STALE cmd/go/internal/run: stale dependency: cmd/go/internal/work
	STALE cmd/go/internal/test: stale dependency: cmd/go/internal/work
	STALE cmd/go/internal/toolchain: stale dependency: cmd/go/internal/work
	STALE cmd/go/internal/vet: stale dependency: cmd/go/internal/work
	STALE cmd/go/internal/work: build ID mismatch
	STALE cmd/go/internal/workcmd: stale dependency: cmd/go/internal/work

watchflakes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-arm Issues solely affecting the 32-bit arm architecture. 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. OS-Plan9
Projects
Status: Done
Development

No branches or pull requests

4 participants