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/vendor/golang.org/x/arch/ppc64/ppc64asm: test deadlock without -short #17698

Closed
josharian opened this issue Oct 31, 2016 · 4 comments
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@josharian
Copy link
Contributor

Broken out from #17472.

$ go test -v cmd/vendor/golang.org/x/arch/ppc64/ppc64asm
=== RUN   TestDecode
--- PASS: TestDecode (0.00s)
=== RUN   TestBitField
--- PASS: TestBitField (0.00s)
=== RUN   TestObjdumpPowerTestdata
starting objdump
fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan receive]:
testing.(*T).Run(0xc4200ae0c0, 0x113e97e, 0x18, 0x1143750, 0x1055301)
	/Users/josh/go/tip/src/testing/testing.go:677 +0x2ee
testing.runTests.func1(0xc4200ae0c0)
	/Users/josh/go/tip/src/testing/testing.go:832 +0x67
testing.tRunner(0xc4200ae0c0, 0xc420041e30)
	/Users/josh/go/tip/src/testing/testing.go:639 +0x85
testing.runTests(0x1143800, 0x11e9980, 0x4, 0x4, 0x24)
	/Users/josh/go/tip/src/testing/testing.go:838 +0x29d
testing.(*M).Run(0xc420041f28, 0x0)
	/Users/josh/go/tip/src/testing/testing.go:773 +0x90
main.main()
	cmd/vendor/golang.org/x/arch/ppc64/ppc64asm/_test/_testmain.go:60 +0xc6

goroutine 21 [chan receive]:
cmd/vendor/golang.org/x/arch/ppc64/ppc64asm.testExtDis.func3(0xc420076ce0, 0x4, 0x4)
	/Users/josh/go/tip/src/cmd/vendor/golang.org/x/arch/ppc64/ppc64asm/ext_test.go:134 +0xf7
cmd/vendor/golang.org/x/arch/ppc64/ppc64asm.testdataCases.func1(0xc4200745a0)
	/Users/josh/go/tip/src/cmd/vendor/golang.org/x/arch/ppc64/ppc64asm/ext_test.go:519 +0x65
cmd/vendor/golang.org/x/arch/ppc64/ppc64asm.testExtDis(0xc4200ae3c0, 0x1138546, 0x3, 0x1143760, 0xc420070500, 0x1143758)
	/Users/josh/go/tip/src/cmd/vendor/golang.org/x/arch/ppc64/ppc64asm/ext_test.go:163 +0x44b
cmd/vendor/golang.org/x/arch/ppc64/ppc64asm.testObjdump(0xc4200ae3c0, 0xc420070500)
	/Users/josh/go/tip/src/cmd/vendor/golang.org/x/arch/ppc64/ppc64asm/objdumpext_test.go:32 +0xee
cmd/vendor/golang.org/x/arch/ppc64/ppc64asm.TestObjdumpPowerTestdata(0xc4200ae3c0)
	/Users/josh/go/tip/src/cmd/vendor/golang.org/x/arch/ppc64/ppc64asm/objdump_test.go:13 +0x43
testing.tRunner(0xc4200ae3c0, 0x1143750)
	/Users/josh/go/tip/src/testing/testing.go:639 +0x85
created by testing.(*T).Run
	/Users/josh/go/tip/src/testing/testing.go:676 +0x2c4

goroutine 22 [chan send]:
cmd/vendor/golang.org/x/arch/ppc64/ppc64asm.testExtDis.func2(0xc420074540, 0x1143760, 0xc42007aa80)
	/Users/josh/go/tip/src/cmd/vendor/golang.org/x/arch/ppc64/ppc64asm/ext_test.go:131 +0x68
created by cmd/vendor/golang.org/x/arch/ppc64/ppc64asm.testExtDis
	/Users/josh/go/tip/src/cmd/vendor/golang.org/x/arch/ppc64/ppc64asm/ext_test.go:132 +0x30a
FAIL	cmd/vendor/golang.org/x/arch/ppc64/ppc64asm	0.024s

Adding defer close(ext.Dec) to the beginning of func objdump in cmd/vendor/golang.org/x/arch/ppc64/ppc64asm/objdumpext_test.go changes this to regular test failures:

$ go test -v cmd/vendor/golang.org/x/arch/ppc64/ppc64asm
=== RUN   TestDecode
--- PASS: TestDecode (0.00s)
=== RUN   TestBitField
--- PASS: TestBitField (0.00s)
=== RUN   TestObjdumpPowerTestdata
--- FAIL: TestObjdumpPowerTestdata (0.01s)
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:176: 0 test cases, 0 expected mismatches, 0 failures; 0 cases/second
	ext_test.go:179: external disassembler: not enough results found [32768 32868]
=== RUN   TestObjdumpPowerManual
--- FAIL: TestObjdumpPowerManual (0.01s)
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:136: decoding stream ended early
	ext_test.go:176: 0 test cases, 0 expected mismatches, 0 failures; 0 cases/second
	ext_test.go:179: external disassembler: not enough results found [32768 32780]
FAIL
FAIL	cmd/vendor/golang.org/x/arch/ppc64/ppc64asm	0.030s

This is an improvement over a deadlock, but still not great. Presumably the problem is that I don't have the right cross-disassembler installed on my system, but the test should detect that and t.Skip instead.

cc @minux

@josharian josharian added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 31, 2016
@josharian josharian added this to the Go1.8 milestone Oct 31, 2016
@dr2chase
Copy link
Contributor

@laboger not sure if this concerns you guys or not

@laboger
Copy link
Contributor

laboger commented Nov 1, 2016

This failure only happens when built and run on cross? It doesn't fail natively.
I can add detection of the system disassembler and skip the test if it isn't available.

@laboger
Copy link
Contributor

laboger commented Nov 1, 2016

I created https://go-review.googlesource.com/32510 for the fix in golang.org/x/arch/ppc64/ppc64asm, and once this is in I will create the CL for the golang cmd/vendor directory and mark that one as fixing this issue.

@gopherbot
Copy link

CL https://golang.org/cl/32531 mentions this issue.

@golang golang locked and limited conversation to collaborators Nov 1, 2017
@rsc rsc unassigned minux Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants