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

kubectl SIGSEGV if k8s not running #13619

Closed
khk-globus opened this issue Feb 15, 2022 · 4 comments · Fixed by #13631
Closed

kubectl SIGSEGV if k8s not running #13619

khk-globus opened this issue Feb 15, 2022 · 4 comments · Fixed by #13631
Assignees
Labels
co/kubectl kubectl related bugs help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@khk-globus
Copy link

What Happened?

I'm just getting going with Kubernetes, so trying out minikube. I was in the middle of downloading my first instance with:

$ minikube start --driver=docker
😄  minikube v1.25.1 on Ubuntu 20.04
✨  Using the docker driver based on user configuration
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
💾  Downloading Kubernetes v1.23.1 preload ...
    > gcr.io/k8s-minikube/kicbase: 378.98 MiB / 378.98 MiB  100.00% 76.80 KiB p
    > preloaded-images-k8s-v16-v1...: 128.42 MiB / 504.42 MiB  25.46% 88.93 Ki

Meanwhile, in another shell I attempted to list. Bad move apparently:

$ minikube kubectl -- get pods -A
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x4a8 pc=0x1a60f12]

goroutine 1 [running]:
k8s.io/minikube/cmd/minikube/cmd.glob..func23(0x3530580, {0xc000acc800, 0x3, 0x4})
	/app/cmd/minikube/cmd/kubectl.go:102 +0x8d2
github.com/spf13/cobra.(*Command).execute(0x3530580, {0xc000acc7c0, 0x4, 0x4})
	/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:860 +0x5f8
github.com/spf13/cobra.(*Command).ExecuteC(0x3532380)
	/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
	/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902
k8s.io/minikube/cmd/minikube/cmd.Execute()
	/app/cmd/minikube/cmd/root.go:157 +0xa31
main.main()
	/app/cmd/minikube/main.go:86 +0x255

This worked after the download finished, but a segfault is, well, a segfault. :-/

Attach the log file

$ minikube logs --file=log.txt
[nothing written here, and empty log file]

Operating System

Ubuntu

Driver

Docker

@afbjorklund
Copy link
Collaborator

Should be easy enough to add a guard against unknown version

@afbjorklund afbjorklund added co/kubectl kubectl related bugs kind/bug Categorizes issue or PR as related to a bug. labels Feb 15, 2022
@spowelljr spowelljr added priority/backlog Higher priority than priority/awaiting-more-evidence. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Feb 16, 2022
@afbjorklund
Copy link
Collaborator

afbjorklund commented Feb 17, 2022

There was no error handling for cc.BinaryMirror, in 4a2c97f

@presztak

@presztak
Copy link
Member

I'll fix this.

@presztak
Copy link
Member

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/kubectl kubectl related bugs help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants