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
bad MACH cpu subtype with cgo #6481
Labels
Comments
g% ./cgotest.test -test.cpuprofile=prof.out -test.bench=. -test.benchtime=3s -test.v testing: warning: no tests to run PASS BenchmarkMe 100000000 63.8 ns/op g% go tool pprof cgotest.test prof.out Welcome to pprof! For help, type 'help'. (pprof) top10 Total: 590 samples 590 100.0% 100.0% 590 100.0% runtime.mach_semaphore_wait 0 0.0% 100.0% 590 100.0% System (pprof) Status changed to Duplicate. Merged into issue #6197. |
There were some errors in my original report, sorry. I left some things out. That's the warning I get when I run: go tool pprof cgotest.test prof.out I think I also got the output from g++ and clang++ backwards. This is the result from g++4.8: $ CXX=g++-4.8 go test -c $ ./cgotest.test -test.cpuprofile=prof.out -test.bench=. -test.benchtime=3s -test.v .. benchmark output ... $ go tool pprof cgotest.test prof.out addr2line: crackhdr: bad MACH cpu subtype - not amd64 Welcome to pprof! For help, type 'help'. (pprof) top Total: 527 samples 61 11.6% 11.6% 61 11.6% 00000000040247e1 57 10.8% 22.4% 57 10.8% 00000000040248bb 20 3.8% 26.2% 20 3.8% 0000000004018ca2 15 2.8% 29.0% 15 2.8% 0000000004017e1c 11 2.1% 31.1% 11 2.1% 0000000004018cd5 10 1.9% 33.0% 10 1.9% 0000000004017c77 10 1.9% 34.9% 10 1.9% 0000000004018d35 9 1.7% 36.6% 9 1.7% 0000000004004b09 8 1.5% 38.1% 8 1.5% 0000000004004b57 7 1.3% 39.5% 7 1.3% 0000000004017ce9 This is what I get from clang++: $ CXX=clang++ go test -c $ ./cgotest.test -test.cpuprofile=prof.out -test.bench=. -test.benchtime=3s -test.v .. benchmark output ... $ go tool pprof cgotest.test prof.out addr2line: crackhdr: bad MACH cpu subtype - not amd64 Welcome to pprof! For help, type 'help'. (pprof) top Total: 516 samples 516 100.0% 100.0% 516 100.0% 000000000402567b 0 0.0% 100.0% 516 100.0% 0000000004018e60 This is using: go version devel +d744da8c8cbf Wed Sep 25 16:18:33 2013 -0400 darwin/amd64 |
This really really looks like the same bug. And using clang++ works fine for me. (I don't have g++-4.8 to try.) Please try CL https://golang.org/cl/15080046 and see what extra information you get in the failure. If you don't get any extra information then I think somehow pprof is finding a stale addr2line binary. Russ |
I do not have $GOROOT set at all, just $GOPATH. Here are my env results for both versions: 1.1: $ go env GOARCH="amd64" GOBIN="" GOCHAR="6" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/lukescott/Projects/go" GORACE="" GOROOT="/usr/local/go" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" CC="gcc" GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread -fno-common" CGO_ENABLED="1" Tip: $ gotip env GOARCH="amd64" GOBIN="" GOCHAR="6" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/lukescott/Projects/go" GORACE="" GOROOT="/Users/lukescott/gotip" GOTOOLDIR="/Users/lukescott/gotip/pkg/tool/darwin_amd64" TERM="dumb" CC="gcc-4.8" GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread -fno-common" CXX="g++-4.8" CGO_ENABLED="1" As you can see GOTOOLDIR is different on both versions. |
Status changed to Duplicate. Merged into issue #6197. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Attachments:
The text was updated successfully, but these errors were encountered: