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

Comments

@josharian
Copy link
Contributor

@josharian josharian commented Jan 8, 2021

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 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.

Loading

@cherrymui
Copy link
Contributor

@cherrymui cherrymui commented Jan 11, 2021

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.

Loading

@cagedmantis cagedmantis added this to the Backlog milestone Jan 11, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Feb 24, 2021

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

Loading

@gopherbot gopherbot closed this in 6c3f8a2 Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants