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

runtime: TestCgoCallbackGC failing on FreeBSD/arm #18811

Closed
paulzhol opened this issue Jan 27, 2017 · 8 comments

Comments

Projects
None yet
3 participants
@paulzhol
Copy link
Member

commented Jan 27, 2017

I've starting running builds with CGO_ENABLED=1 on freebsd-arm-paulzhol and it fails consistently.
System is an ALLWINNER A20 running FreeBSD 11.0-RELEASE-p2. I've noticed CGO_ENABLED was off by default because the bootstrap 1.4.3 compilers need to be built with CGO_ENABLED=0.

ok  	regexp/syntax	4.360s
--- FAIL: TestCgoCallbackGC (180.81s)
	crash_test.go:106: testprogcgo CgoCallbackGC exit status: exit status 2
	crash_cgo_test.go:66: expected "OK\n", but got:
		SIGQUIT: quit
		PC=0x20263cd0 m=0 sigcode=65537
		signal arrived during cgo execution
		
		goroutine 206 [syscall, locked to thread]:
		runtime.cgocall(0xcc158, 0x30acc7d4, 0x10be80b)
			/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/runtime/cgocall.go:131 +0xb4 fp=0x30acc7bc sp=0x30acc7a0
		main._Cfunc_foo()
			_/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/runtime/testdata/testprogcgo/_obj/_cgo_gotypes.go:164 +0x30 fp=0x30acc7d0 sp=0x30acc7bc
		main.CgoCallbackGC.func2(0x30a90d80)
			/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/runtime/testdata/testprogcgo/callback.go:81 +0x14 fp=0x30acc7e4 sp=0x30acc7d0
		runtime.goexit()
			/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/runtime/asm_arm.s:1017 +0x4 fp=0x30acc7e4 sp=0x30acc7e4
		created by main.CgoCallbackGC
			/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/runtime/testdata/testprogcgo/callback.go:83 +0xcc
		
		goroutine 1 [chan receive]:
		main.CgoCallbackGC()
			/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/runtime/testdata/testprogcgo/callback.go:86 +0x104
		main.main()
			/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/runtime/testdata/testprogcgo/main.go:34 +0x168
		
		goroutine 17 [syscall, locked to thread]:
		runtime.goexit()
			/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/runtime/asm_arm.s:1017 +0x4
		
		goroutine 5 [syscall]:
		os/signal.signal_recv(0x0)
			/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/runtime/sigqueue.go:116 +0x154
		os/signal.loop()
			/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/os/signal/signal_unix.go:22 +0x14
		created by os/signal.init.1
			/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/os/signal/signal_unix.go:28 +0x30
		
		goroutine 133 [chan send]:
		main.CgoCallbackGC.func2(0x30a90d80)
			/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/runtime/testdata/testprogcgo/callback.go:82 +0x38
		created by main.CgoCallbackGC
			/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/runtime/testdata/testprogcgo/callback.go:83 +0xcc
		
		goroutine 130 [runnable, locked to thread]:
		main._Cfunc_foo()
			_/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/runtime/testdata/testprogcgo/_obj/_cgo_gotypes.go:164 +0x30
		main.CgoCallbackGC.func2(0x30a90d80)
			/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/runtime/testdata/testprogcgo/callback.go:81 +0x14
		created by main.CgoCallbackGC
			/tmp/gobuilder/freebsd-arm-paulzhol-21a8db1c5fdd/go/src/runtime/testdata/testprogcgo/callback.go:83 +0xcc
		

https://build.golang.org/log/bfcba940a506c85e37f975ac5f707a8e56016a28
https://build.golang.org/log/b6d6763f78183bb51792bc55ce055d1301e7cbbc
https://build.golang.org/log/24b97b0e2513b28f2b8b117ff0028cfc36ea7790

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jan 27, 2017

This may simply mean that the test program is timing out. What happens if you set GO_TEST_TIMEOUT_SCALE=4 in the environment?

@paulzhol

This comment has been minimized.

Copy link
Member Author

commented Jan 27, 2017

Running ./all.bash now, but note that I'm already on GO_TEST_TIMEOUT_SCALE=3 by default.

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jan 27, 2017

Another thing you can try is

cd src/runtime/testdata/testprogcgo
go build
./testprogcgo CgoCallbackGC

Does that complete, or does it just hang?

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jan 27, 2017

Note: updated previous comment to pass an argument to ./testprogcgo.

@paulzhol

This comment has been minimized.

Copy link
Member Author

commented Jan 27, 2017

GO_TEST_TIMEOUT_SCALE=4 also failed:
build.txt

I've built testprogcgo: testprogcgo_build.txt

It just spins:
screenshot at 2017-01-27 17 50 57

@paulzhol

This comment has been minimized.

Copy link
Member Author

commented Jan 27, 2017

Update: it exited after roughly 13m with OK, then I ran it again with some strange results:

time ./testprogcgo CgoCallbackGC                                                                        
OK

real    0m44.077s
user    0m57.942s
sys     0m0.681s

time ./testprogcgo CgoCallbackGC
OK

real    7m41.345s
user    1m41.639s
sys     12m46.762s

time ./testprogcgo CgoCallbackGC
OK

real    8m50.200s
user    1m46.821s
sys     14m58.288s

I'll try setting GO_TEST_TIMEOUT_SCALE=6

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jan 27, 2017

Probably related to #13926.

@paulzhol

This comment has been minimized.

Copy link
Member Author

commented Jan 29, 2017

Looks like setting GO_TEST_TIMEOUT_SCALE=16 does the trick, Thanks!

@paulzhol paulzhol closed this Jan 29, 2017

@golang golang locked and limited conversation to collaborators Jan 29, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.