-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: panic bsdthread_register error due to anti virus software #8801
Comments
Tried to see if I could just build Go from source, but get the same failure... > ./all.bash # Building C bootstrap tool. cmd/dist # Building compilers and Go bootstrap tool for host, darwin/amd64. lib9 libbio liblink misc/pprof cmd/cc cmd/gc cmd/6l cmd/6a cmd/6c cmd/6g pkg/runtime pkg/errors pkg/sync/atomic pkg/sync pkg/io pkg/unicode pkg/unicode/utf8 pkg/unicode/utf16 pkg/bytes pkg/math pkg/strings pkg/strconv pkg/bufio pkg/sort pkg/container/heap pkg/encoding/base64 pkg/syscall pkg/time pkg/os pkg/reflect pkg/fmt pkg/encoding pkg/encoding/json pkg/flag pkg/path/filepath pkg/path pkg/io/ioutil pkg/log pkg/regexp/syntax pkg/regexp pkg/go/token pkg/go/scanner pkg/go/ast pkg/go/parser pkg/os/exec pkg/os/signal pkg/net/url pkg/text/template/parse pkg/text/template pkg/go/doc pkg/go/build cmd/go fatal error: runtime: bsdthread_register error runtime stack: runtime.throw(0x3e42b5) /Users/200019822/projects/go/src/pkg/runtime/panic.c:520 +0x69 runtime.goenvs() /Users/200019822/projects/go/src/pkg/runtime/os_darwin.c:88 +0x62 runtime.schedinit() /Users/200019822/projects/go/src/pkg/runtime/proc.c:164 +0x76 _rt0_go() /Users/200019822/projects/go/src/pkg/runtime/asm_amd64.s:91 +0x114 |
Tried to see if I could just build Go from source, but get the same failure... > ./all.bash # Building C bootstrap tool. cmd/dist # Building compilers and Go bootstrap tool for host, darwin/amd64. lib9 libbio liblink misc/pprof cmd/cc cmd/gc cmd/6l cmd/6a cmd/6c cmd/6g pkg/runtime pkg/errors pkg/sync/atomic pkg/sync pkg/io pkg/unicode pkg/unicode/utf8 pkg/unicode/utf16 pkg/bytes pkg/math pkg/strings pkg/strconv pkg/bufio pkg/sort pkg/container/heap pkg/encoding/base64 pkg/syscall pkg/time pkg/os pkg/reflect pkg/fmt pkg/encoding pkg/encoding/json pkg/flag pkg/path/filepath pkg/path pkg/io/ioutil pkg/log pkg/regexp/syntax pkg/regexp pkg/go/token pkg/go/scanner pkg/go/ast pkg/go/parser pkg/os/exec pkg/os/signal pkg/net/url pkg/text/template/parse pkg/text/template pkg/go/doc pkg/go/build cmd/go fatal error: runtime: bsdthread_register error runtime stack: runtime.throw(0x3e42b5) /Users/me/projects/go/src/pkg/runtime/panic.c:520 +0x69 runtime.goenvs() /Users/me/projects/go/src/pkg/runtime/os_darwin.c:88 +0x62 runtime.schedinit() /Users/me/projects/go/src/pkg/runtime/proc.c:164 +0x76 _rt0_go() /Users/me/projects/go/src/pkg/runtime/asm_amd64.s:91 +0x114 |
Discussion continues: https://groups.google.com/forum/#!topic/golang-nuts/HtcZc3wO-rw AV software is injecting a thread into the process (i'm guessing at startup). Labels changed: added release-none, repo-main. Status changed to Accepted. |
This happens for me using dtruss. Repro: go test -c runtime stack: It is a bummer that I cannot dtruss Go files. |
If you build with -ldflags -linkmode=external then you should not get this |
build fails with: ``` fatal error: runtime: bsdthread_register error (unset DYLD_INSERT_LIBRARIES) ``` building with `-ldflags -linkmode=external`[1] and `CGO_ENABLED=1` has no affect on `go-native`, it does let `go` bootstrap, but then fails with a similar error: ``` fatal error: runtime: bsdthread_register error ``` easiest to unset DYLD_INSERT_LIBRARIES - no need to check for `darwin` as it only exists on that platform. [1] golang/go#8801 (comment)
@randall77, you're now the macOS expert (sorry). Thoughts? Do your latest changes impact this at all? |
Yes, this should have been fixed when we moved the runtime to use libSystem for 1.11. |
by berniedurfee:
The text was updated successfully, but these errors were encountered: