You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version devel +cbcc1db Sun Dec 11 21:59:59 2016 +0000 windows/amd64
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:\dev
set GORACE=
set GOROOT=C:\dev\go
set GOTOOLDIR=C:\dev\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\brainman\AppData\Local\Temp\go-build999495023=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
set PKG_CONFIG=pkg-config
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
This only happens occasionally. But easy enough to reproduce. I do not understand why Wait should not succeed, so suggestions on how to debug this are welcome. Thank you.
Alex
The text was updated successfully, but these errors were encountered:
The test TestStdinCloseRace starts a child process that reads from standard input. It starts one goroutine that kills the child process, and one goroutine that writes a string to the child's standard input. In the normal case, the process should be killed, so Wait should return a non-zero exit status.
That said, the test does seem to itself have a race condition, in that it is possible for the the string to be written to the child's standard input and for the child to exit normally before the other goroutine kills the child. And it appears that I was the one who added the racy test. Will send a fix.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version devel +cbcc1db Sun Dec 11 21:59:59 2016 +0000 windows/amd64
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:\dev
set GORACE=
set GOROOT=C:\dev\go
set GOTOOLDIR=C:\dev\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\brainman\AppData\Local\Temp\go-build999495023=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1
set PKG_CONFIG=pkg-config
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
What did you do?
go test -short os/exec
What did you expect to see?
test pass
What did you see instead?
--- FAIL: TestStdinCloseRace (0.02s)
exec_test.go:271: Wait: succeeded unexpectedly
FAIL
exit status 1
FAIL os/exec 2.645s
This only happens occasionally. But easy enough to reproduce. I do not understand why Wait should not succeed, so suggestions on how to debug this are welcome. Thank you.
Alex
The text was updated successfully, but these errors were encountered: