英文:
Kubectl: fatal error: runtime: bsdthread_register error
问题
我大约两个月没有使用kubectl了。它在六月份的时候还能正常工作,但现在我遇到了以下错误:
$ kubectl
fatal error: runtime: bsdthread_register error
runtime stack:
runtime.throw(0x2cb65a5, 0x21)
/usr/local/go/src/runtime/panic.go:596 +0x95 fp=0x7fff5fbff810 sp=0x7fff5fbff7f0
runtime.goenvs()
/usr/local/go/src/runtime/os_darwin.go:108 +0xa0 fp=0x7fff5fbff840 sp=0x7fff5fbff810
runtime.schedinit()
/usr/local/go/src/runtime/proc.go:486 +0xa1 fp=0x7fff5fbff880 sp=0x7fff5fbff840
runtime.rt0_go(0x7fff5fbff8b0, 0x1, 0x7fff5fbff8b0, 0x0, 0x1, 0x7fff5fbffa38, 0x0, 0x7fff5fbffa40, 0x7fff5fbffa5c, 0x7fff5fbffa6c, ...)
/usr/local/go/src/runtime/asm_amd64.s:158 +0x183 fp=0x7fff5fbff888 sp=0x7fff5fbff880
我看到有人说这可能是由于websense引起的,但我在我的Mac上没有安装websense。据我所知,唯一改变的是Max OSX(10.12.6)的例行更新和gcloud(163)的例行更新。
我已经尝试重新安装kubectl和gcloud,但仍然失败。据我所知,这可能是Go出了问题,而我认为Go是gcloud sdk中包含的核心库的一部分。
有什么办法可以解决这个问题吗?由于这个问题,我无法连接到任何一个pod。
英文:
I haven't used kubectl in about two months. It was working well in June but now I get the following error:
$ kubectl
fatal error: runtime: bsdthread_register error
runtime stack:
runtime.throw(0x2cb65a5, 0x21)
/usr/local/go/src/runtime/panic.go:596 +0x95 fp=0x7fff5fbff810 sp=0x7fff5fbff7f0
runtime.goenvs()
/usr/local/go/src/runtime/os_darwin.go:108 +0xa0 fp=0x7fff5fbff840 sp=0x7fff5fbff810
runtime.schedinit()
/usr/local/go/src/runtime/proc.go:486 +0xa1 fp=0x7fff5fbff880 sp=0x7fff5fbff840
runtime.rt0_go(0x7fff5fbff8b0, 0x1, 0x7fff5fbff8b0, 0x0, 0x1, 0x7fff5fbffa38, 0x0, 0x7fff5fbffa40, 0x7fff5fbffa5c, 0x7fff5fbffa6c, ...)
/usr/local/go/src/runtime/asm_amd64.s:158 +0x183 fp=0x7fff5fbff888 sp=0x7fff5fbff880
I've read that this can be caused by websense but I don't have websense installed on my Mac. The only thing that has changed to my knowledge was a routine update to Max OSX (10.12.6), and a routine update to gcloud (163).
I've tried reinstalling kubectl, gcloud, but it still fails. As far as I can tell there is something wrong with Go, and I think Go is part of the core library included in gcloud sdk.
Any ideas on how to troubleshoot/fix this? I cannot connect to any of my pods due to this issue.
答案1
得分: 1
问题是由于MacOS 12中系统调用的库更改引起的。旧的二进制文件使用的是一个不再支持的旧库。
将您的kubectl更新到新版本。这应该可以解决问题。
如果您无法更新,因为您需要旧版本(例如,由于API更改),您可以使用新的go版本构建所需的kubectl。
必需条件:
go 1.11或更新版本
brew install go
获取存储库
git clone https://github.com/kubernetes/kubernetes.git
选择所需的版本,例如1.11.3
git checkout tags/v1.11.3
构建
GO111MODULE=off make
GO111MODULE=off
关闭了默认情况下从go v1.16开始需要的模块。如果您的Kubernetes版本更新,可能需要打开它们。如果是这种情况,只需省略GO111MODULE=off
。
构建完成后,您可以在_output/bin
中找到适用于您系统的kubectl。
英文:
The problem is caused by a library change for system calls in MacOS 12. Older binaries use an old library which isn't supported anymore.
Update your kubectl to a new version. This should fix it.
If you can't update because you need an older version (e.g. because of api changes) you can build the needed kubectl using a new go version.
Necessary:
go 1.11 or newer
brew install go
Get repo
git clone https://github.com/kubernetes/kubernetes.git
Select version needed. e.g. 1.11.3
git checkout tags/v1.11.3
Build
GO111MODULE=off make
GO111MODULE=off
turns off modules which are needed by default since go v1.16. If your kubernetes version is newer it might be necessary to have them turned on. If that is the case just leave out GO111MODULE=off
.
When the build is done you can find the kubectl for your system in _output/bin
.
答案2
得分: 0
我在 macOS 12 上遇到了相同的错误。根据这个问题,这是由于旧版本的 aws-iam-authenticator
引起的。通过重新安装 aws-iam-authenticator
,问题得到了解决。
brew install aws-iam-authenticator
英文:
I met the same error on mac os 12. Per this issue, it was caused by old version aws-iam-authenticator
. The issue is resolved after reinstalling the aws-iam-authenticator
through
brew install aws-iam-authenticator
答案3
得分: 0
我因为将OSX升级到12而遇到了这个问题。在升级后重新链接minikube可以解决这个问题。
$ brew link --overwrite minikube
英文:
I ran into this issue because of OSX upgrade to 12. Re-linking minikube after upgrading it fixed the issue for me.
$ brew link --overwrite minikube
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论