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

cmd/go: staleness-related failures in make.bash #22531

Closed
huguesb opened this issue Nov 1, 2017 · 7 comments
Closed

cmd/go: staleness-related failures in make.bash #22531

huguesb opened this issue Nov 1, 2017 · 7 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@huguesb
Copy link
Contributor

huguesb commented Nov 1, 2017

What version of Go are you using (go version)?

tip 18525735

Does this issue reproduce with the latest release?

Unlikely. This didn't happen on tip as of bc723cf3

What operating system and processor architecture are you using (go env)?

Darwin/amd64

What did you do?

./make.bash

Make some debug logging changes to the compiler (specifically cmd/compile/internal/gc/inl.go), all gated behind appropriate Debug check to avoid impacting the compiler build/test flow.

./make.bash

What did you expect to see?

Building Go cmd/dist using /usr/local/Cellar/go/1.9.1/libexec.
Building Go toolchain1 using /usr/local/Cellar/go/1.9.1/libexec.
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 packages and commands for darwin/amd64.
---
Installed Go for darwin/amd64 in /Users/hugues/go
Installed commands in /Users/hugues/go/bin

What did you see instead?

Building Go cmd/dist using /usr/local/Cellar/go/1.9.1/libexec.
Building Go toolchain1 using /usr/local/Cellar/go/1.9.1/libexec.
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 packages and commands for darwin/amd64.
go tool dist: unexpected stale targets reported by /Users/hugues/go/pkg/tool/darwin_amd64/go_bootstrap list -gcflags="" -ldflags="" for [std cmd]:
	cmd/go: build ID mismatch
	cmd/gofmt: build ID mismatch

NB: once this error shows up, it persists until a run of ./clean.bash

@rsc This seems likely to be related to your recent changes to cmd/go and/or cmd/dist

@huguesb huguesb changed the title spurious staleness failures in make.bash staleness-related failures in make.bash Nov 1, 2017
@ianlancetaylor
Copy link
Contributor

Can you show us exactly what you changed? Thanks.

@ianlancetaylor ianlancetaylor changed the title staleness-related failures in make.bash cmd/go: staleness-related failures in make.bash Nov 1, 2017
@ianlancetaylor ianlancetaylor added this to the Go1.10 milestone Nov 1, 2017
@ianlancetaylor ianlancetaylor added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels Nov 1, 2017
@huguesb
Copy link
Contributor Author

huguesb commented Nov 1, 2017

@ianlancetaylor Of course:

diff --git a/src/cmd/compile/internal/gc/inl.go b/src/cmd/compile/internal/gc/inl.go
index a509d2d648..b3919bc0d1 100644
--- a/src/cmd/compile/internal/gc/inl.go
+++ b/src/cmd/compile/internal/gc/inl.go
@@ -677,6 +677,9 @@ func (v *reassignVisitor) visit(n *Node) *Node {
        switch n.Op {
        case OAS:
                if n.Left == v.name && n != v.name.Name.Defn {
+                       if Debug['m'] > 1 {
+                               fmt.Printf("%p %p\n%+v\n%+v\n", n, v.name.Name.Defn, n, v.name.Name.Defn)
+                       }
                        return n
                }
                return nil

@huguesb
Copy link
Contributor Author

huguesb commented Nov 5, 2017

Still happening on tip as of c4b65fa4. Triggers reliably with as small a change as tweaking an existing format string (no code added/removed).

@rsc anything I can do to help debug this?

@rsc
Copy link
Contributor

rsc commented Nov 5, 2017

What does $GOROOT/VERSION.cache say?

@huguesb
Copy link
Contributor Author

huguesb commented Nov 5, 2017

devel +c4b65fa4cc Sun Nov 5 04:18:05 2017 +0000

NB: GOROOT is not set in my environment. This is the content of VERSION.cache in the root of my local copy of this repo.

edit: setting GOROOT doesn't have any impact on this issue. The content of VERSION.cache remains unchanged even after multiple ./make.bash / ./clean.bash

@rsc
Copy link
Contributor

rsc commented Nov 5, 2017

Reproduced at least.

@gopherbot
Copy link

Change https://golang.org/cl/76014 mentions this issue: cmd/go: fix corner case missed rebuild of binary

@golang golang locked and limited conversation to collaborators Nov 6, 2018
@rsc rsc removed their assignment Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants