go: runtime: Windows 2008: all goroutines are asleep - deadlock

I already reported this issue in https://github.com/golang/go/issues/20362 (which might be the same or related), but am opening a new issue as requested by @davecheney .

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

go version go1.9.1 linux/amd64

Does this issue reproduce with the latest release?

Yes.

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

GOARCH="amd64"
GOBIN=""
GOEXE=".exe"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="windows"
GOPATH="/dn"
GORACE=""
GOROOT="/usr/local/go19"
GOTOOLDIR="/usr/local/go19/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-m64 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build141570660=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="0"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

I was able to reproduce the deadlock with a minimal test program that basically just executes a http GET request.

I ran the command in a loop and got the following results:

  • go1.7.5: No deadlocks
  • go1.8.4: No deadlocks (This means that the e4371fb179ad69cbd057f2430120843948e09f2f aka go1.8beta2-389-ge4371fb179 commit mentioned in #20362 is probably not the root cause)
  • go1.9.1: Lots of deadlocks, see example

Notes:

  • I was able to consistently reproduce this in 64Bit Win7 VM with Cygwin. However, it doesn’t happen for every run of the program, but 20-50% of the runs trigger the problem.
  • I was not able to reproduce this in a local 64Bit Win7 Professional VM (also using Cygwin)

What did you expect to see?

No deadlock.

What did you see instead?

https://gist.github.com/felixge/a2efcaf098e1b8fa0ec1f7d67fb2481c

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 36 (33 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks to everybody who worked on this for the incredibly fast fix!