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: go run hangs for a few minutes from windows command line #22055

Closed
dargopolis opened this issue Sep 26, 2017 · 4 comments
Closed

cmd/go: go run hangs for a few minutes from windows command line #22055

dargopolis opened this issue Sep 26, 2017 · 4 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Milestone

Comments

@dargopolis
Copy link

Please answer these questions before submitting your issue. Thanks!

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

go version go1.9 windows/amd64

Does this issue reproduce with the latest release?

Yes

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

set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\dglass\go
set GORACE=
set GOROOT=C:\go
set GOTOOLDIR=C:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\dglass\AppData\Local\Temp\go-build241023583=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config

Windows 7 Enterprise
Service Pack 1
64-bit operating system

Intel(R)Core(TM)i5-5300U CPU @2.30GHz 2.30 GHz

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

From the Windows command line (CMD), I used go run to run a hello world program like https://play.golang.org/p/v3rrZLwEUC

go run hello.go

What did you expect to see?

I expected the program to return to the command line immediately.

What did you see instead?

The program hung for a few minutes after it appeared to be done (e.g. after the last output was written).
And, it could not be interrupted with Control-C.

Note that the problem (delay) does not seem to occur with a compiled version of the program, just with go run.

@ianlancetaylor ianlancetaylor changed the title go run hangs for a few minutes from windows command line cmd/go: go run hangs for a few minutes from windows command line Sep 27, 2017
@ianlancetaylor ianlancetaylor added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows labels Sep 27, 2017
@ianlancetaylor ianlancetaylor added this to the Go1.10 milestone Sep 27, 2017
@ianlancetaylor
Copy link
Contributor

CC @alexbrainman

@alexbrainman
Copy link
Member

I tried reproducing your problem and I cannot:

c:\Users\Alex\dev\src\issue\go\22055>go version
go version go1.9 windows/amd64

c:\Users\Alex\dev\src\issue\go\22055>go run hello.go
Hello, playground

c:\Users\Alex\dev\src\issue\go\22055>

I have no bright ideas about why this is happening to you. Maybe get Process Explorer https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer and see which process is hanging. Maybe once you know the culprit , you could debug it with delve or gdb.

Alex

@cznic
Copy link
Contributor

cznic commented Sep 27, 2017

@dargopolis Please verify if AV SW is running and if so, if there's a difference when it's turned off.

@rsc
Copy link
Contributor

rsc commented Dec 1, 2017

Timed out waiting for information.

@rsc rsc closed this as completed Dec 1, 2017
@golang golang locked and limited conversation to collaborators Dec 1, 2018
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. OS-Windows
Projects
None yet
Development

No branches or pull requests

6 participants