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/tools/cmd/goimports: hangs in uninterruptible sleep #19225

Closed
tcoffee-google opened this issue Feb 21, 2017 · 7 comments
Closed

x/tools/cmd/goimports: hangs in uninterruptible sleep #19225

tcoffee-google opened this issue Feb 21, 2017 · 7 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@tcoffee-google
Copy link

Please answer these questions before submitting your issue. Thanks!

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

go version go1.7.3 linux/amd64

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/usr/local/google/home/tcoffee/go"
GORACE=""
GOROOT="/usr/lib/google-golang"
GOTOOLDIR="/usr/lib/google-golang/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build134362667=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

What did you do?

Run goimports -w myfile.go.

What did you expect to see?

Program termination.

What did you see instead?

The goimports process goes into uninterruptible sleep, blocking on disk I/O (status 'D') for at least 20 minutes, and hence cannot be killed without rebooting.

@kevinburke
Copy link
Contributor

tcoffee-google, is there anything special or interesting about myfile.go?

@bradfitz
Copy link
Contributor

Are you using one of Google's internal FUSE filesystems? If so I'd mail the Google internal mailing lists for tips.

@gopherbot gopherbot added this to the Unreleased milestone Mar 21, 2017
@agnivade agnivade added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Oct 1, 2018
@aeneasr
Copy link

aeneasr commented Oct 9, 2018

I have the same issue on Windows, it's a larger project. Command goimports $(go list -f {{.Dir}} ./... | grep -v vendor) outputs files but is incredibly slow - probably 1-2 seconds per file? Running with flags -d or -w nothing happens and goimport just hangs. I'm not sure if it's just very slow to process everything or if it really hangs. This took at most 2 seconds some time back.

I recently did go get -u golang.org/x/tools/cmd/goimports and used your (@bradfitz ) version before that but I'm experiencing the same issue when downgrading. I recently upgraded to Go 1.11.1

Also, goimports runs with almost zero resources used (CPU, Disk, Memory):

image

Any ideas?

@aeneasr
Copy link

aeneasr commented Oct 9, 2018

After a reboot the issue persists. What's interesting though is that gofmt works perfectly, so I doubt that this is an OS issue.

@gopherbot
Copy link

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

@arnavsharma93
Copy link

I'm facing this too. goimports used to be much faster. Now, it hangs my editor for a second or two. Any idea how to fix it?

@bradfitz
Copy link
Contributor

bradfitz commented Jan 2, 2019

@arnavsharma93, this is a closed bug and we don't track closed bugs. If you want to open a new bug, please include a lot more info. Piling on this overloaded bug just gets distracting.

@golang golang locked and limited conversation to collaborators Jan 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

7 participants