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/link: "external linking is forced by" logging disrupts toolstash-check #43601

Closed
josharian opened this issue Jan 8, 2021 · 3 comments
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@josharian
Copy link
Contributor

I ran toolstash-check. Result:

linux-mips64le
linux-mipsle
linux-ppc64
linux-ppc64le
linux-riscv64
linux-s390x
aix-ppc64
android-386
android-amd64
darwin-amd64
dragonfly-amd64
freebsd-386
freebsd-amd64
freebsd-arm
freebsd-arm64
illumos-amd64
ios-amd64
# cmd/buildid
toolstash: linker output differs

inconsistent log line:
/var/folders/1t/n61cbvls5bl293bbb0zyypqw0000gn/T/go-build2025424745/b254/exe/a.out.log:206:
	2021/01/07 19:52:35 external linking is forced by: buildmode=pie
/var/folders/1t/n61cbvls5bl293bbb0zyypqw0000gn/T/go-build2025424745/b254/exe/a.out.stash.log:206:
	2021/01/07 19:52:37 external linking is forced by: buildmode=pie
# cmd/addr2line
toolstash: linker output differs

inconsistent log line:
/var/folders/1t/n61cbvls5bl293bbb0zyypqw0000gn/T/go-build2025424745/b226/exe/a.out.log:278:
	2021/01/07 19:52:36 external linking is forced by: buildmode=pie
/var/folders/1t/n61cbvls5bl293bbb0zyypqw0000gn/T/go-build2025424745/b226/exe/a.out.stash.log:278:
	2021/01/07 19:52:38 external linking is forced by: buildmode=pie
# cmd/cover
toolstash: linker output differs

And lots more of the same.

The change here is the timestamp of the log line. @thanm @cherrymui it'd be nice to fix this. There are several options. (Remove the logging, log that line only at higher verbosity, remove timestamps from that log entry, remove timestamps from all cmd/link logging.) Thoughts?

@thanm
Copy link
Contributor

thanm commented Jan 8, 2021

I guess I would be in favor of removing the timestamps (either from this entry or all entries). I don't see how the stamp adds much myself.

@cherrymui
Copy link
Member

I also think removing timestamps from all entries makes sense.

Question: how does toolstash-check invoke the linker? Passing -v? The -v flag isn't that useful to debug linker (non)deterministic issues. Maybe it can just stop passing -v.

@cagedmantis cagedmantis added this to the Backlog milestone Jan 11, 2021
@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 11, 2021
@gopherbot
Copy link

Change https://golang.org/cl/296029 mentions this issue: cmd/link: use ctxt.Logf instead of package log

@golang golang locked and limited conversation to collaborators Feb 24, 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.
Projects
None yet
Development

No branches or pull requests

5 participants