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
{{ message }}
Repository navigation
runtime: re-enable TestCgoCallbackGC flaky on FreeBSD #16396
I think these are other versions of #15658 and #16136. There is something wrong on FreeBSD but I don't understand what it is and I have not been able to recreate it myself.
If anybody has a FreeBSD machine I can ssh into that would help.
I think I was incorrect in thinking that this was related to the other FreeBSD problems. The other FreeBSD problems are less frequent, and I have not been able to recreate them at all.
I now think this is the same as issue #13926: a problem that arises when there are many simultaneous callbacks from C to Go, which is exactly what the CgoCallbackGC test case does. The problem is that on FreeBSD you can surprisingly large delays during the callback. My theory is that when enough of those delays occur, the test times out. That is consistent with the failures reported on the builder, which are in all cases the program crashing from SIGQUIT; SIGQUIT is sent by the runtime test harness when the test program runs for more than 1 minute (runTestProg in runtime/crash_test.go).
@adg, @broady, should we at least document this as a known issue in the release notes for Go 1.7? And then punt this to Go 1.8 for actually fixing.
It'd be a pity to ship something with known crashes for a "first class port". I'd rather warn FreeBSD users about this bug so they don't deploy something with cgo callbacks in production and see crashes.
Hello,
I've starting running builds with CGO_ENABLED=1 on freebsd-arm-paulzhol and it fails consistently:
ok regexp/syntax 4.107s
--- FAIL: TestCgoCallbackGC (180.11s)
crash_test.go:105: testprogcgo CgoCallbackGC exit status: exit status 2
crash_cgo_test.go:61: expected "OK\n", but got:
SIGQUIT: quit
PC=0x20263cd0 m=0
signal arrived during cgo execution
goroutine 166 [syscall, locked to thread]:
runtime.cgocall(0xc0c78, 0x30a7d7c4, 0x0)
/tmp/gobuilder/freebsd-arm-paulzhol-6ceba5d5e85b/go/src/runtime/cgocall.go:131 +0x130 fp=0x30a7d7ac sp=0x30a7d790
main._Cfunc_foo()
_/tmp/gobuilder/freebsd-arm-paulzhol-6ceba5d5e85b/go/src/runtime/testdata/testprogcgo/_obj/_cgo_gotypes.go:176 +0x38 fp=0x30a7d7c0 sp=0x30a7d7ac
main.CgoCallbackGC.func2(0x30a5a040)
/tmp/gobuilder/freebsd-arm-paulzhol-6ceba5d5e85b/go/src/runtime/testdata/testprogcgo/callback.go:81 +0x14 fp=0x30a7d7d4 sp=0x30a7d7c0
runtime.goexit()
/tmp/gobuilder/freebsd-arm-paulzhol-6ceba5d5e85b/go/src/runtime/asm_arm.s:998 +0x4 fp=0x30a7d7d4 sp=0x30a7d7d4
created by main.CgoCallbackGC
/tmp/gobuilder/freebsd-arm-paulzhol-6ceba5d5e85b/go/src/runtime/testdata/testprogcgo/callback.go:83 +0xd8
goroutine 1 [chan receive]:
main.CgoCallbackGC()
/tmp/gobuilder/freebsd-arm-paulzhol-6ceba5d5e85b/go/src/runtime/testdata/testprogcgo/callback.go:86 +0x114
main.main()
/tmp/gobuilder/freebsd-arm-paulzhol-6ceba5d5e85b/go/src/runtime/testdata/testprogcgo/main.go:34 +0x1ac
goroutine 17 [runnable, locked to thread]:
runtime.goexit()
/tmp/gobuilder/freebsd-arm-paulzhol-6ceba5d5e85b/go/src/runtime/asm_arm.s:998 +0x4
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.
Activity
ianlancetaylor commentedon Jul 17, 2016
I think these are other versions of #15658 and #16136. There is something wrong on FreeBSD but I don't understand what it is and I have not been able to recreate it myself.
If anybody has a FreeBSD machine I can ssh into that would help.
bradfitz commentedon Jul 17, 2016
Our FreeBSD builders run on GCE. I can create you an instance there.
ianlancetaylor commentedon Jul 18, 2016
That would help if you have time. Thanks.
bradfitz commentedon Jul 18, 2016
@ianlancetaylor, done. Emailed you details.
ianlancetaylor commentedon Jul 19, 2016
I think I was incorrect in thinking that this was related to the other FreeBSD problems. The other FreeBSD problems are less frequent, and I have not been able to recreate them at all.
I now think this is the same as issue #13926: a problem that arises when there are many simultaneous callbacks from C to Go, which is exactly what the CgoCallbackGC test case does. The problem is that on FreeBSD you can surprisingly large delays during the callback. My theory is that when enough of those delays occur, the test times out. That is consistent with the failures reported on the builder, which are in all cases the program crashing from SIGQUIT; SIGQUIT is sent by the runtime test harness when the test program runs for more than 1 minute (
runTestProgin runtime/crash_test.go).Working on a patch.
gopherbot commentedon Jul 19, 2016
CL https://golang.org/cl/25047 mentions this issue.
ianlancetaylor commentedon Jul 21, 2016
TestCgoCallbackGCis still failing on FreeBSD on the builders. The change did not fix it, at least not completely.adg commentedon Jul 25, 2016
We may just have to punt on this for Go 1.7, which should be okay since IIUC this is not a regression in Go 1.7. (Or is it?)
ianlancetaylor commentedon Jul 26, 2016
To the best of my knowledge this is not a regression in 1.7.
bradfitz commentedon Jul 27, 2016
@adg, @broady, should we at least document this as a known issue in the release notes for Go 1.7? And then punt this to Go 1.8 for actually fixing.
It'd be a pity to ship something with known crashes for a "first class port". I'd rather warn FreeBSD users about this bug so they don't deploy something with cgo callbacks in production and see crashes.
19 remaining items
ianlancetaylor commentedon Dec 5, 2016
Thanks for trying it so thoroughly. Sounds like this issue can be closed.
bradfitz commentedon Dec 5, 2016
@ianlancetaylor, did you mean to close this? It sounds like we need to at least remove the
t.Skipfor this test on FreeBSD.[-]runtime: TestCgoCallbackGC flaky on FreeBSD[/-][+]runtime: re-enable TestCgoCallbackGC flaky on FreeBSD[/+]gopherbot commentedon Dec 5, 2016
CL https://golang.org/cl/33903 mentions this issue.
gopherbot commentedon Dec 6, 2016
CL https://golang.org/cl/33926 mentions this issue.
doc/go1.8: remove mention of #16396
paulzhol commentedon Jan 27, 2017
Hello,
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.
ianlancetaylor commentedon Jan 27, 2017
@paulzhol This issue is closed and the problem you are reporting has different symptoms. Please open a new issue with the details. Thanks.
paulzhol commentedon Jan 27, 2017
@ianlancetaylor I've opened #18811 but I do have the following in my log which look like the "Most are:" example in the original issue:
But the builder failed to push that: