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: cgo tests fails with GCC7 #18855

Closed
jcajka opened this issue Jan 30, 2017 · 2 comments

Comments

Projects
None yet
5 participants
@jcajka
Copy link
Contributor

commented Jan 30, 2017

I'm seeing runtime test failures with all master/1.8rc3/1.7 on Fedora(rawhide/26) with gcc7

gcc7 build: https://koji.fedoraproject.org/koji/buildinfo?buildID=836768

ok  	reflect	0.184s
ok  	regexp	0.431s
ok  	regexp/syntax	0.548s
--- FAIL: TestCgoCrashHandler (0.77s)
	crash_test.go:70: building testprogcgo []: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoPprof (1.48s)
	crash_cgo_test.go:280: building testprogcgo []: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoTracebackContext (1.49s)
	crash_test.go:70: building testprogcgo []: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoPprofThread (1.28s)
	crash_cgo_test.go:280: building testprogcgo []: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoPprofPIE (2.04s)
	crash_cgo_test.go:280: building testprogcgo [-ldflags=-extldflags=-pie]: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoCCodeSIGPROF (2.04s)
	crash_test.go:70: building testprogcgo []: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoCheckBytes (2.05s)
	crash_cgo_test.go:196: building testprogcgo []: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoCrashTraceback (2.27s)
	crash_test.go:70: building testprogcgo []: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoPprofThreadNoTraceback (2.27s)
	crash_cgo_test.go:280: building testprogcgo []: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestEnsureDropM (2.05s)
	crash_test.go:70: building testprogcgo []: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoPanicDeadlock (2.04s)
	crash_test.go:70: building testprogcgo []: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoExternalThreadSignal (2.48s)
	crash_cgo_test.go:133: building testprogcgo [-tags=threadprof]: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoExternalThreadPanic (2.48s)
	crash_test.go:70: building testprogcgo []: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoExecSignalMask (2.75s)
	crash_test.go:70: building testprogcgo []: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoExternalThreadSIGPROF (2.49s)
	crash_cgo_test.go:110: building testprogcgo [-tags=threadprof]: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoTraceback (2.48s)
	crash_test.go:70: building testprogcgo []: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoCallbackGC (2.50s)
	crash_test.go:70: building testprogcgo []: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
--- FAIL: TestCgoSignalDeadlock (2.50s)
	crash_test.go:70: building testprogcgo []: exit status 2
		# _/builddir/build/BUILD/go/src/runtime/testdata/testprogcgo
		./threadpprof.go:107:2: call of non-function C.runCPUHogThread
		
FAIL
FAIL	runtime	10.379s

Looking in to the output of cgo with -debug-gcc I don't see any obvious problem apart that the gcc7 slightly changed the formatting of some messages(by including suggestions like not-type:3:45: error: '__cgo_undefined__' undeclared (first use in this function); did you mean '__int8_t_defined'? ). IMHO after brief look at code it shouldn't matter.

I believe that it has same/similar cause as ec654e2 . "void" workaround makes the tests pass.

I will try to look in to it further.

@minux

This comment has been minimized.

Copy link
Member

commented Jan 30, 2017

@bradfitz bradfitz added this to the Go1.9 milestone Jan 30, 2017

@bradfitz bradfitz changed the title cgo fails with GCC7 runtime: cgo tests fails with GCC7 Jan 30, 2017

@gopherbot

This comment has been minimized.

Copy link

commented Jan 30, 2017

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

@gopherbot gopherbot closed this in 0949659 Jan 30, 2017

@golang golang locked and limited conversation to collaborators Jan 30, 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.