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

minikube update-context: invalid memory address or nil pointer dereference #8988

Closed
superbrothers opened this issue Aug 13, 2020 · 0 comments · Fixed by #8989
Closed

minikube update-context: invalid memory address or nil pointer dereference #8988

superbrothers opened this issue Aug 13, 2020 · 0 comments · Fixed by #8989
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@superbrothers
Copy link
Member

minikube update-context command occurs the following error:

 panic: runtime error: invalid memory address or nil pointer dereference
 [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x523891f]
 
 goroutine 1 [running]:
 k8s.io/minikube/pkg/minikube/kubeconfig.UpdateEndpoint(0x57bad36, 0x8, 0xc000bd9410, 0xe, 0x20fb, 0xc00013f560, 0x19, 0x5b32f40, 0xc000bdd560, 0xc000bd9410)
         /private/tmp/minikube-20200812-94589-17snemo/pkg/minikube/kubeconfig/kubeconfig.go:143 +0x2af
 k8s.io/minikube/cmd/minikube/cmd.glob..func31(0x6927200, 0x696cf80, 0x0, 0x0)
         /private/tmp/minikube-20200812-94589-17snemo/cmd/minikube/cmd/update-context.go:37 +0x10a
 github.com/spf13/cobra.(*Command).execute(0x6927200, 0x696cf80, 0x0, 0x0, 0x6927200, 0x696cf80)
         /Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:846 +0x29d
 github.com/spf13/cobra.(*Command).ExecuteC(0x6925280, 0x0, 0x1, 0xc00024fbe0)
         /Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x349
 github.com/spf13/cobra.(*Command).Execute(...)
         /Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:887
 k8s.io/minikube/cmd/minikube/cmd.Execute()
         /private/tmp/minikube-20200812-94589-17snemo/cmd/minikube/cmd/root.go:106 +0x72c
 main.main()
         /private/tmp/minikube-20200812-94589-17snemo/cmd/minikube/main.go:71 +0x11f

Steps to reproduce the issue:

$ minikube start --vm-driver virtualbox
😄  minikube v1.12.3 on Darwin 10.15.5
✨  Using the virtualbox driver based on user configuration
👍  Starting control plane node minikube in cluster minikube
🔥  Creating virtualbox VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.18.3 on Docker 19.03.12 ...
🔎  Verifying Kubernetes components...
🌟  Enabled addons: default-storageclass, storage-provisioner
🏄  Done! kubectl is now configured to use "minikube"
$ cat <<EOL > kubeconfig
apiVersion: v1
clusters:
- cluster:
    certificate-authority: /home/la-croix/apiserver.crt
    server: 192.168.1.1:8080
  name: la-croix
contexts:
- context:
    cluster: la-croix
    user: la-croix
  name: la-croix
current-context: la-croix
kind: Config
preferences: {}
users:
- name: la-croix
  user:
    client-certificate: /home/la-croix/apiserver.crt
    client-key: /home/la-croix/apiserver.key
EOL
$ KUBECONFIG=./kubeconfig minikube update-context
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x523891f]

goroutine 1 [running]:
k8s.io/minikube/pkg/minikube/kubeconfig.UpdateEndpoint(0x57bad36, 0x8, 0xc000c4c3a0, 0xe, 0x20fb, 0xc00003e22b, 0xc, 0x5b32f40, 0xc0003d2000, 0xc000c4c3a0)
        /private/tmp/minikube-20200812-94589-17snemo/pkg/minikube/kubeconfig/kubeconfig.go:143 +0x2af
k8s.io/minikube/cmd/minikube/cmd.glob..func31(0x6927200, 0x696cf80, 0x0, 0x0)
        /private/tmp/minikube-20200812-94589-17snemo/cmd/minikube/cmd/update-context.go:37 +0x10a
github.com/spf13/cobra.(*Command).execute(0x6927200, 0x696cf80, 0x0, 0x0, 0x6927200, 0x696cf80)
        /Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:846 +0x29d
github.com/spf13/cobra.(*Command).ExecuteC(0x6925280, 0x0, 0x1, 0xc00053a0c0)
        /Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/brew/Library/Caches/Homebrew/go_mod_cache/pkg/mod/github.com/spf13/[email protected]/command.go:887
k8s.io/minikube/cmd/minikube/cmd.Execute()
        /private/tmp/minikube-20200812-94589-17snemo/cmd/minikube/cmd/root.go:106 +0x72c
main.main()
        /private/tmp/minikube-20200812-94589-17snemo/cmd/minikube/main.go:71 +0x11f

Full output of failed command:

Full output of minikube start command used, if not already included:

Optional: Full output of minikube logs command:

@tstromberg tstromberg added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Aug 14, 2020
@tstromberg tstromberg added this to the v1.13.0 milestone Aug 14, 2020
@sharifelgamal sharifelgamal added the kind/bug Categorizes issue or PR as related to a bug. label Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants