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

SIGSEGV error #53

Closed
mitar opened this issue Oct 3, 2018 · 3 comments · Fixed by #54
Closed

SIGSEGV error #53

mitar opened this issue Oct 3, 2018 · 3 comments · Fixed by #54
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@mitar
Copy link
Contributor

mitar commented Oct 3, 2018

If control plane Docker container already exists, SIGSEGV is reached:

INFO[1003-05:37:50] Running: /usr/bin/docker [docker run -d --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run --tmpfs /var/lib/docker:exec -v /lib/modules:/lib/modules:ro --hostname kind-1-control-plane --name kind-1-control-plane --label io.k8s.sigs.kind.cluster=1 --expose 6443 --publish-all --entrypoint=/usr/local/bin/entrypoint kindest/node:v1.11.3 /sbin/init] 
ERRO[1003-05:37:50] docker: Error response from daemon: Conflict. The container name "/kind-1-control-plane" is already in use by container "0e7e0562ad123ce2430b12c44c3606be4458b1189770d2bfef3ab88a97ab5282". You have to remove (or rename) that container to be able to reuse that name. 
ERRO[1003-05:37:50] See 'docker run --help'.                     
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x5e26b9]

goroutine 1 [running]:
sigs.k8s.io/kind/pkg/cluster.(*nodeHandle).Run(0x0, 0x69654d, 0x5, 0xc4200d7638, 0x3, 0x3, 0x6978f0, 0xa)
	/usr/local/go/src/sigs.k8s.io/kind/pkg/cluster/node.go:112 +0x99
sigs.k8s.io/kind/pkg/cluster.(*nodeHandle).FixMounts(0x0, 0x14, 0x69aabb)
	/usr/local/go/src/sigs.k8s.io/kind/pkg/cluster/node.go:243 +0x96
sigs.k8s.io/kind/pkg/cluster.(*Context).provisionControlPlane(0xc420015dd0, 0xc42000d5c0, 0x14, 0xc420073620, 0x1, 0xc42000d5c0, 0x14, 0x5dc2bd)
	/usr/local/go/src/sigs.k8s.io/kind/pkg/cluster/cluster.go:158 +0xd5
sigs.k8s.io/kind/pkg/cluster.(*Context).Create(0xc420015dd0, 0xc420073620, 0x0, 0x0)
	/usr/local/go/src/sigs.k8s.io/kind/pkg/cluster/cluster.go:114 +0x13d
sigs.k8s.io/kind/cmd/kind/create.run(0xc420073530, 0xc4200cac80, 0x7f1c98, 0x0, 0x0)
	/usr/local/go/src/sigs.k8s.io/kind/cmd/kind/create/create.go:84 +0x4f6
sigs.k8s.io/kind/cmd/kind/create.NewCommand.func1(0xc4200cac80, 0x7f1c98, 0x0, 0x0)
	/usr/local/go/src/sigs.k8s.io/kind/cmd/kind/create/create.go:44 +0x52
sigs.k8s.io/kind/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200cac80, 0x7f1c98, 0x0, 0x0, 0xc4200cac80, 0x7f1c98)
	/usr/local/go/src/sigs.k8s.io/kind/vendor/github.com/spf13/cobra/command.go:766 +0x2b9
sigs.k8s.io/kind/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc4200ca280, 0xc4200caf00, 0xc4200cac80, 0xc4200ca500)
	/usr/local/go/src/sigs.k8s.io/kind/vendor/github.com/spf13/cobra/command.go:852 +0x37e
sigs.k8s.io/kind/vendor/github.com/spf13/cobra.(*Command).Execute(0xc4200ca280, 0x6a86d0, 0xc42005a0cc)
	/usr/local/go/src/sigs.k8s.io/kind/vendor/github.com/spf13/cobra/command.go:800 +0x2b
sigs.k8s.io/kind/cmd/kind.Run(0x7bade0, 0xc420056e00)
	/usr/local/go/src/sigs.k8s.io/kind/cmd/kind/kind.go:45 +0x2f
sigs.k8s.io/kind/cmd/kind.Main()
	/usr/local/go/src/sigs.k8s.io/kind/cmd/kind/kind.go:56 +0x7a
main.main()
	/usr/local/go/src/sigs.k8s.io/kind/main.go:25 +0x20

I am not familiar with Go, but SIGSEGV should never happen, no?

@BenTheElder
Copy link
Member

BenTheElder commented Oct 3, 2018

it should not, this is a bad bug.

My apologies, kind is still a bit alpha, I've held off cutting any releases while I finish arranging the config and qualifying it for these kinds of bugs.

I know exactly where this bug is from that trace, I introduced it very recently (~ last day). This will be an easy fix thankfully.

This also relates to #39. We can detect existing clusters with the same name and gracefully warn, but we are not yet.

@BenTheElder
Copy link
Member

Also relates to #23, in general the logging is somewhat atrocious at this point. I've been drafting a plan / PR to clean this up throughout the whole tool...

/kind bug
/priority important-soon
/assign

@k8s-ci-robot k8s-ci-robot added 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. labels Oct 3, 2018
@BenTheElder
Copy link
Member

/lifecycle active
A PR to fix this is out in #54.

@k8s-ci-robot k8s-ci-robot added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Oct 3, 2018
stg-0 pushed a commit to stg-0/kind that referenced this issue Mar 14, 2023
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. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. 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