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/cgo: broken on darwin by latest c toolchain update from Apple #19741

Closed
josharian opened this issue Mar 28, 2017 · 5 comments

Comments

@josharian
Copy link
Contributor

commented Mar 28, 2017

I updated to the latest "Command Line Tools for Xcode" (version 8.3), and now see these all.bash failures:

--- FAIL: TestCgoTracebackContext (4.29s)
	crash_test.go:106: testprogcgo TracebackContext exit status: signal: killed
	crash_cgo_test.go:267: expected "OK\n" got 
--- FAIL: TestCgoCrashHandler (4.29s)
	crash_test.go:106: testprogcgo Crash exit status: signal: killed
	crash_test.go:193: output:
		
		
		wanted:
		main: recovered done
		new-thread: recovered done
		second-new-thread: recovered done
		main-again: recovered done
--- FAIL: TestCgoCCodeSIGPROF (3.83s)
	crash_test.go:106: testprogcgo CgoCCodeSIGPROF exit status: signal: killed
	crash_cgo_test.go:245: expected "OK\n" got 
--- FAIL: TestCgoPanicDeadlock (3.26s)
	crash_test.go:106: testprogcgo CgoPanicDeadlock exit status: signal: killed
	crash_cgo_test.go:236: output does not start with "panic: cgo error\n\n":
--- FAIL: TestCgoExternalThreadSIGPROF (9.88s)
	crash_cgo_test.go:115: exit status: signal: killed
--- FAIL: TestEnsureDropM (7.33s)
	crash_test.go:106: testprogcgo EnsureDropM exit status: signal: killed
	crash_cgo_test.go:183: expected "OK\n", got 
--- FAIL: TestCgoExecSignalMask (7.33s)
	crash_test.go:106: testprogcgo CgoExecSignalMask exit status: signal: killed
	crash_cgo_test.go:169: expected "OK\n", got 
--- FAIL: TestCgoCallbackGC (6.08s)
	crash_test.go:106: testprogcgo CgoCallbackGC exit status: signal: killed
	crash_cgo_test.go:66: expected "OK\n", but got:
--- FAIL: TestCgoSignalDeadlock (0.02s)
	crash_test.go:106: testprogcgo CgoSignalDeadlock exit status: signal: killed
	crash_cgo_test.go:34: expected "OK\n", but got:
--- FAIL: TestCgoTraceback (1.14s)
	crash_test.go:106: testprogcgo CgoTraceback exit status: signal: killed
	crash_cgo_test.go:43: expected "OK\n", but got:
--- FAIL: TestCgoExternalThreadSignal (7.35s)
	crash_cgo_test.go:138: exit status: signal: killed
--- FAIL: TestCgoExternalThreadPanic (7.24s)
	crash_test.go:106: testprogcgo CgoExternalThreadPanic exit status: signal: killed
	crash_cgo_test.go:78: want failure containing "panic: BOOM". output:
		
FAIL
FAIL	runtime	19.285s
--- FAIL: TestCoverageWithCgo (0.00s)
    --- FAIL: TestCoverageWithCgo/cgocover3 (1.09s)
    	go_test.go:260: running testgo [test -short -cover cgocover4]
    	go_test.go:275: standard output:
    	go_test.go:276: signal: killed
    		FAIL	cgocover4	0.009s
    		
    	go_test.go:289: go [test -short -cover cgocover4] failed unexpectedly: exit status 1
    --- FAIL: TestCoverageWithCgo/cgocover (1.09s)
    	go_test.go:260: running testgo [test -short -cover cgocover4]
    	go_test.go:275: standard output:
    	go_test.go:276: signal: killed
    		FAIL	cgocover4	0.010s
    		
    	go_test.go:289: go [test -short -cover cgocover4] failed unexpectedly: exit status 1
    --- FAIL: TestCoverageWithCgo/cgocover4 (1.10s)
    	go_test.go:260: running testgo [test -short -cover cgocover4]
    	go_test.go:275: standard output:
    	go_test.go:276: signal: killed
    		FAIL	cgocover4	0.005s
    		
    	go_test.go:289: go [test -short -cover cgocover4] failed unexpectedly: exit status 1
    --- FAIL: TestCoverageWithCgo/cgocover2 (1.10s)
    	go_test.go:260: running testgo [test -short -cover cgocover4]
    	go_test.go:275: standard output:
    	go_test.go:276: signal: killed
    		FAIL	cgocover4	0.005s
    		
    	go_test.go:289: go [test -short -cover cgocover4] failed unexpectedly: exit status 1
--- FAIL: TestCgoPkgConfig (1.41s)
	go_test.go:260: running testgo [env PKG_CONFIG]
	go_test.go:275: standard output:
	go_test.go:276: pkg-config
		
	go_test.go:260: running testgo [run /var/folders/1t/n61cbvls5bl293bbb0zyypqw0000gn/T/gotest346627925/foo.go]
	go_test.go:279: standard error:
	go_test.go:280: signal: killed
		
	go_test.go:289: go [run /var/folders/1t/n61cbvls5bl293bbb0zyypqw0000gn/T/gotest346627925/foo.go] failed unexpectedly: exit status 1
FAIL
FAIL	cmd/go	48.799s
--- FAIL: TestExternalLinkerCgoFile (1.10s)
	nm_test.go:114: running test executable failed: signal: killed 
FAIL
FAIL	cmd/nm	3.033s

cc @ianlancetaylor

System details

$ clang++ --version
Apple LLVM version 8.1.0 (clang-802.0.38)
Target: x86_64-apple-darwin16.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
go version devel darwin/amd64
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/1t/n61cbvls5bl293bbb0zyypqw0000gn/T/go-build917437237=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOROOT/bin/go version: go version devel darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel X:framepointer
uname -v: Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.12.3
BuildVersion:	16D32
lldb --version: lldb-370.0.37
  Swift-3.1
@josharian

This comment has been minimized.

Copy link
Contributor Author

commented Mar 28, 2017

Also affects 1.8. Depending on the details of the cause and the fix, this might be 1.8.1 material. Tentatively marking it as such.

@josharian josharian added this to the Go1.8.1 milestone Mar 28, 2017

@martisch

This comment has been minimized.

Copy link
Member

commented Mar 28, 2017

dup of #19734 ?

@repustate

This comment has been minimized.

Copy link

commented Mar 28, 2017

Adding another data point here - all my cgo stuff broke when upgrading to XCode 8.3. I was able to get around this by building binaries with -ldflags -s.

@josharian

This comment has been minimized.

Copy link
Contributor Author

commented Mar 28, 2017

Yes, dup of #19734. Apparently my search-fu was weak.

@repustate, knowing that -ldflags=-s is a workaround seems useful. Will you duplicate that comment at #19734? Thanks.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2017

Removing milestone because this is a dup of another bug that is already correctly milestoned.

@rsc rsc removed this from the Go1.8.1 milestone Apr 5, 2017

@golang golang locked and limited conversation to collaborators Apr 5, 2018

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