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

[BUG] invalid memory address or nil pointer dereference upon node creation with role #1565

Open
SpiderUnderUrBed opened this issue Mar 9, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@SpiderUnderUrBed
Copy link

SpiderUnderUrBed commented Mar 9, 2025

EDIT: I realized even without flags this issue is present, (except the cluster flag)

What did you do

  • How was the cluster created?

  • Ran this: https://pastebin.com/QyesjUb9 for my various services

  • I deleted the current node (I only wanted one server node and one on my main machine)

  • Ran: k3d cluster create mycluster --k3s-arg "--service-node-port-range=0-32767@server:0"

  • What did you do afterwards?
    k3d node create myfirstserver --role server --k3s-arg '--tls-san=192.168.68.77' --token TOKEN --cluster mycluster
    ( I also tried a token generated via openssl rand -base64 32)

Error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xd0 pc=0x8280ec]

goroutine 60 [running]:
github.com/k3d-io/k3d/v5/pkg/runtimes/docker.getNodeContainer({0xe6f500, 0x40004e0b40}, 0x0)
        /home/runner/work/k3d/k3d/pkg/runtimes/docker/container.go:140 +0x8c
github.com/k3d-io/k3d/v5/pkg/runtimes/docker.Docker.GetNode({}, {0xe6f500, 0x40004e0b40}, 0x0)
        /home/runner/work/k3d/k3d/pkg/runtimes/docker/node.go:214 +0x2c
github.com/k3d-io/k3d/v5/pkg/client.NodeGet({0xe6f500?, 0x40004e0b40?}, {0xe84c08?, 0x16aa180?}, 0x400001adc0?)
        /home/runner/work/k3d/k3d/pkg/client/node.go:782 +0x40
github.com/k3d-io/k3d/v5/pkg/client.NodeAddToCluster({0xe6f500, 0x40004e0b40}, {0xe84c08, 0x16aa180}, 0x4000388000, 0x4000458000, {0x1, 0x0, {0x0, 0x0, ...}, ...})
        /home/runner/work/k3d/k3d/pkg/client/node.go:111 +0x4c8
github.com/k3d-io/k3d/v5/pkg/client.NodeAddToClusterMulti.func1()
        /home/runner/work/k3d/k3d/pkg/client/node.go:353 +0x60
golang.org/x/sync/errgroup.(*Group).Go.func1()
        /home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x58
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1
        /home/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x98

What did you expect to happen

Concise description of what you expected to happen after doing what you described above.
I expected the node to be created, I was actually following the advice said here:
#408
so I could have nodes across multiple machines

Screenshots or terminal output

If applicable, add screenshots or terminal output (code block) to help explain your problem.
https://pastebin.com/h7G2KTp5
(Its fine, I will change all the TOKENS afterwards)

Which OS & Architecture

Debian 12.

  • output of k3d runtime-info
    arch: aarch64
    cgroupdriver: systemd
    cgroupversion: "2"
    endpoint: /var/run/docker.sock
    filesystem: extfs
    infoname: raspberrypi
    name: docker
    os: Debian GNU/Linux 12 (bookworm)
    ostype: linux
    version: 28.0.1

Which version of k3d

  • output of k3d version
    k3d version v5.8.3
    k3s version v1.31.5-k3s1 (default)

Which version of docker

  • output of docker version and docker info
    Client: Docker Engine - Community
    Version: 28.0.1
    API version: 1.48
    Go version: go1.23.6
    Git commit: 068a01e
    Built: Wed Feb 26 10:40:57 2025
    OS/Arch: linux/arm64
    Context: default

Server: Docker Engine - Community
Engine:
Version: 28.0.1
API version: 1.48 (minimum version 1.24)
Go version: go1.23.6
Git commit: bbd0a17
Built: Wed Feb 26 10:40:57 2025
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.7.25
GitCommit: bcc810d6b9066471b0b6fa75f557a15a1cbf31bb
runc:
Version: 1.2.4
GitCommit: v1.2.4-0-g6c52b3f
docker-init:
Version: 0.19.0
GitCommit: de40ad0

Client: Docker Engine - Community
Version: 28.0.1
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.21.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.33.1
Path: /usr/libexec/docker/cli-plugins/docker-compose

Server:
Containers: 14
Running: 1
Paused: 0
Stopped: 13
Images: 58
Server Version: 28.0.1
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: bcc810d6b9066471b0b6fa75f557a15a1cbf31bb
runc version: v1.2.4-0-g6c52b3f
init version: de40ad0
Security Options:
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.6.74+rpt-rpi-v8
Operating System: Debian GNU/Linux 12 (bookworm)
OSType: linux
Architecture: aarch64
CPUs: 4
Total Memory: 7.627GiB
Name: raspberrypi
ID: 83a63588-31c1-46ed-9388-6a9443561cd0
Docker Root Dir: /var/lib/docker
Debug Mode: false
Username: spiderunderurbed
Experimental: false
Insecure Registries:
::1/128
127.0.0.0/8
Live Restore Enabled: false

@SpiderUnderUrBed SpiderUnderUrBed added the bug Something isn't working label Mar 9, 2025
@SpiderUnderUrBed SpiderUnderUrBed changed the title [BUG] [BUG] invalid memory address or nil pointer dereference upon node creation with role, tls-san and token options set Mar 9, 2025
@SpiderUnderUrBed SpiderUnderUrBed changed the title [BUG] invalid memory address or nil pointer dereference upon node creation with role, tls-san and token options set [BUG] invalid memory address or nil pointer dereference upon node creation with role Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant