-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: build, run and test frequently fails to complete #40445
Comments
Looks like it hung in the linker. |
I also have some Go build tools hanging on my machine - see #36492. @GKempsell perhaps you have the same bug. Try disabling preemption - that fixes #36492 problem. I only know how to disable preemption by changing Go runtime source code. Perhaps there is an easier way. Alex |
You can set the environment variable |
Sorry for delay in coming back on this. Frustratingly, since you asked for the additional trace I've been unable to replicate the issue. I've gone from 95%+ replication success rate to 0%. I haven't made any additional environment changes; I didn't even get round to trying with preempt turned off. So I doubt the issue has gone away permanently. I guess I'll just have to keep an eye on it and if I do manage to replicate it again collect the trace information and send it over. |
Thank you, @cherrymui. Indeed that worked here. Alex |
Circling back on this issue; @GKempsell is this still a problem for? Can you still reproduce with the most recent Go release (1.19)? Thanks. |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Updated to latest version of Go, although issue presented on 1.14.4 first.
Opened a project in Intellij IDEA that was working on Go 1.13 and tried to Run/Debug/Test.
Also tried Goland,VSCode and go cmds from the terminal. All ended with the same result.
What did you expect to see?
The application compiling and running correctly.
Or
Tests running correctly.
What did you see instead?
Frequent non-completion of compile process for both Run and Debug
Test stuck at initialising stage and not completing.
Additional Context
While I can repeat this pretty much every time with some existing projects, it is hard to do so with a fresh project.
The problem will occur 9 times out of 10 and there doesn't appear to be a consistent way of getting round it. Occasionally rerunning will be enough for it to work, sometimes closing and reopening the IDE will help; but more often than not nothing works.
After doing a bit of research I came across this issue: census-instrumentation/opencensus-go#1200
Which pointed me to the fact that calls to go get were effectively timing out, but updating Git resolved this.
I then tried go build -x to get additional output and it appears to be stuck at this step:
"C:\\Users\\guy.kempsell\\sdk\\go1.14.6\\pkg\\tool\\windows_amd64\\link.exe" -o "$WORK\\b001\\exe\\a.out.exe" -importcfg "$WORK\\b001\\importcfg.link" -buildmode=exe -buildid=_MkyF9LK9jUjX681GePM/clZjGxyzEU7znLXb1E2P/DcgycDdsw9oELtDtmgqC/_MkyF9LK9jUjX681GePM -extld=gcc "C:\\Users\\guy.kempsell\\AppData\\Local\\go-build\\02\\02244c9f2d6b3361c85447f0b49ca91dd8640f827dfda53b688b271ca3be44e5-d"
The text was updated successfully, but these errors were encountered: