-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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/compile/internal/syntax: test failure without -short #17697
Comments
Cannot reproduce with the command-line above. However, in syntax directory:
which is the same error. The panic happens because there's no error handler installed and we do expect an error. CL forthcoming (probably tomorrow). |
CL https://golang.org/cl/32456 mentions this issue. |
I now see this: $ cd cmd/compile/internal/syntax
$ go test
... giant syntax tree dump elided ...
fatal error: all goroutines are asleep - deadlock!
goroutine 1 [chan receive]:
testing.(*T).Run(0xc420096000, 0x113e20f, 0xa, 0x1146160, 0x1052d01)
/Users/josh/go/tip/src/testing/testing.go:684 +0x2ee
testing.runTests.func1(0xc420096000)
/Users/josh/go/tip/src/testing/testing.go:839 +0x67
testing.tRunner(0xc420096000, 0xc420041e30)
/Users/josh/go/tip/src/testing/testing.go:646 +0x85
testing.runTests(0x11461e8, 0x11f0560, 0x8, 0x8, 0x113d1fb)
/Users/josh/go/tip/src/testing/testing.go:845 +0x29d
testing.(*M).Run(0xc420266f28, 0x0)
/Users/josh/go/tip/src/testing/testing.go:780 +0x90
main.main()
cmd/compile/internal/syntax/_test/_testmain.go:68 +0xc6
goroutine 21 [chan receive]:
cmd/compile/internal/syntax.TestStdLib(0xc4200963c0)
/Users/josh/go/tip/src/cmd/compile/internal/syntax/parser_test.go:69 +0x162
testing.tRunner(0xc4200963c0, 0x1146160)
/Users/josh/go/tip/src/testing/testing.go:646 +0x85
created by testing.(*T).Run
/Users/josh/go/tip/src/testing/testing.go:683 +0x2c4
FAIL cmd/compile/internal/syntax 1.866s |
@josharian I cannot reproduce this on tip. Anything unusual about your system? |
I can still reproduce. Nothing unusual that I know of. $ git rev-parse HEAD
d89ab1398eef9a3f08db2a49ff3cbe158001474d
$ ./make.bash
... ok ...
$ cd cmd/compile/internal/syntax
$ go test
... same result ...
$ go version
go version devel darwin/amd64
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/josh"
GORACE=""
GOROOT="/Users/josh/go/tip"
GOTOOLDIR="/Users/josh/go/tip/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/pp/0010hzld5b12h_92j5th082r0000gn/T/go-build036093094=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2" |
Hold on, will send a CL. |
CL 32486 fixes the deadlock. After that CL, I see test failures. Please let me know whether you can reproduce. |
CL https://golang.org/cl/32486 mentions this issue. |
When the err from ReadFile is non-nil, we call t.Fatal(err). Switch t.Fatal to t.Error + return. ensure that close(results) happens on that code path as well. Updates #17697. Change-Id: Ifaacf27a76c175446d642086ff32f4386428080d Reviewed-on: https://go-review.googlesource.com/32486 Run-TryBot: Josh Bleecher Snyder <[email protected]> Reviewed-by: Robert Griesemer <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
Ok, Robert, hopefully you can now reproduce a regular test failure in cmd/compile/internal/syntax. |
@josharian Just sync'ed and rebuilt. Don't see any test failures. Do you have files in your tree that I might not have? TestStdLib runs through any .go files it finds. |
Nope. $ git clean -n
$ Adding some logging shows the test failure coming from test/alias2.go. |
Ah, ok. Not sure why I don't see it f not run explicitly. Will investigate.
|
PS: The syntax failure is correctly reported. I should either exclude that file or not have a syntax error in that file. |
@josharian Is your $GOROOT directory where you run the tests called something else than "go"? (which is perfectly fine, I'm just trying to verify my hypothesis). |
CL https://golang.org/cl/32539 mentions this issue. |
Yes: |
Broken out from #17472.
go test -timeout=1h cmd/compile/internal/syntax
Results in a giant parser dump followed by:
cc @mdempsky @griesemer
The text was updated successfully, but these errors were encountered: