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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With