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: bsdthread_register error on macOS 12.6.9 #62686

Closed
vector20240801 opened this issue Sep 17, 2023 · 6 comments
Closed

runtime: bsdthread_register error on macOS 12.6.9 #62686

vector20240801 opened this issue Sep 17, 2023 · 6 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@vector20240801
Copy link

vector20240801 commented Sep 17, 2023

What version of Go are you using (go version)?

$ go version go1.21.1 darwin/amd64

Does this issue reproduce with the latest release?

Yes. I have tried updating go to the latest version, as well as updating to the latest of xcode and command tools. Also ran brew upgrade to make sure everything is updated. Also tried diffrent shells to see if that makes any difference.
I am also running the latest version of docker.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
```bash
GO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/xietangtao/Library/Caches/go-build'
GOENV='/Users/xietangtao/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/usr/local/go/bin/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/usr/local/go/bin'
GOPRIVATE=''
GOPROXY='https://goproxy.cn'
GOROOT='/usr/local/Cellar/go/1.21.1/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/Cellar/go/1.21.1/libexec/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.21.1'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/ds/40g_rxwj4lb2mvw2bqcrm2hh0000gn/T/go-build3912756394=/tmp/go-build -gno-record-gcc-switches -fno-common'
```

What did you do?

When running the following command to connect to a server running docker it produces the error. It does not matter if the server is hosted on AWS EC2 or Digital Ocean droplets.

It seems this issue is not related just to Docker, as I am also getting this error when running a command in the terminal inside of Mac OS.

eval "$(docker-machine env machinegoeshere)"

What did you expect to see?

Usually nothing displays which indicates its connected to the server

What did you see instead?

fatal error: runtime: bsdthread_register error

runtime stack:
runtime.throw(0x205dfa5, 0x21)
	/usr/local/go/src/runtime/panic.go:619 +0x81 fp=0x7ff7bfeff468 sp=0x7ff7bfeff448 pc=0x1029751
runtime.goenvs()
	/usr/local/go/src/runtime/os_darwin.go:129 +0x83 fp=0x7ff7bfeff498 sp=0x7ff7bfeff468 pc=0x10272d3
runtime.schedinit()
	/usr/local/go/src/runtime/proc.go:496 +0xa4 fp=0x7ff7bfeff4f0 sp=0x7ff7bfeff498 pc=0x102c014
runtime.rt0_go(0x7ff7bfeff528, 0x3, 0x7ff7bfeff528, 0x0, 0x1000000, 0x3, 0x7ff7bfeff6e8, 0x7ff7bfeff6f7, 0x7ff7bfeff6fb, 0x0, ...)
	/usr/local/go/src/runtime/asm_amd64.s:252 +0x1f4 fp=0x7ff7bfeff4f8 sp=0x7ff7bfeff4f0 pc=0x1052c64
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Sep 17, 2023
@seankhliao
Copy link
Member

is your docker-machine command built locally?

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Sep 17, 2023
@vector20240801
Copy link
Author

Yes I executed eval on macOS terminal.

@seankhliao
Copy link
Member

that's not what I asking, how did you get the docker-machine binary built?

@seankhliao seankhliao added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Sep 18, 2023
@cherrymui
Copy link
Member

See https://github.com/golang/go/wiki/MacOS12BSDThreadRegisterIssue . Your docker or a program it invokes must be built with an old version of Go. See also #49425, where a few candidate of old programs were mentioned. Thanks.

@cherrymui cherrymui closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2023
@vector20240801
Copy link
Author

@cherrymui Unfortunately, I have tried all the methods documented online, but none of them worked.

go version
go version go1.21.1 darwin/amd64
go tool dist clean
eval "$(docker-machine env machinegoeshere)"
fatal error: runtime: bsdthread_register error

runtime stack:
runtime.throw(0x205dfa5, 0x21)
	/usr/local/go/src/runtime/panic.go:619 +0x81 fp=0x7ff7bfeff868 sp=0x7ff7bfeff848 pc=0x1029751
runtime.goenvs()
	/usr/local/go/src/runtime/os_darwin.go:129 +0x83 fp=0x7ff7bfeff898 sp=0x7ff7bfeff868 pc=0x10272d3
runtime.schedinit()
	/usr/local/go/src/runtime/proc.go:496 +0xa4 fp=0x7ff7bfeff8f0 sp=0x7ff7bfeff898 pc=0x102c014
runtime.rt0_go(0x7ff7bfeff920, 0x3, 0x7ff7bfeff920, 0x1000000, 0x3, 0x7ff7bfeffaa8, 0x7ff7bfeffab7, 0x7ff7bfeffabb, 0x0, 0x7ff7bfeffacb, ...)
	/usr/local/go/src/runtime/asm_amd64.s:252 +0x1f4 fp=0x7ff7bfeff8f8 sp=0x7ff7bfeff8f0 pc=0x1052c64

@cherrymui
Copy link
Member

cherrymui commented Sep 19, 2023

@taojiaenx you ran into this because some binary that your command invokes is built with a very old version of Go. You need to find what binary that is, and rebuild it. Does docker have a verbose/debug mode that prints all the commands it invokes? If so, that could be helpful.

This is not a bug in Go, and unfortunately we couldn't help you resolve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants