panic: runtime error: invalid memory address or nil pointer dereference on 0.14.5 #303

Closed
opened 2025-11-20 05:09:20 -05:00 by saavagebueno · 1 comment
Owner

Originally created by @misuzu on GitHub (Mar 27, 2023).

Describe the problem
0.14.5 release looks potentially broken

To Reproduce
Steps to reproduce the behavior:

  1. Start netbird daemon 0.14.5 on a clean linux vm
  2. Wait for unix socket to appear
  3. Run netbird status
  4. See error

Expected behavior
netbird status should return Daemon status: NeedsLogin, netbird daemon should not panic

Additional context
Reproducible using NixOS test on aarch64 and x86_64, here are the logs: https://logs.nix.ci/?key=nixos/nixpkgs.223194&attempt_id=1560fe63-abee-4393-9a0f-7ea337bbc37c

<.........................................................>
node # [    4.985691] systemd[1]: Started Getty on tty1.
node # [    4.986561] systemd[1]: Reached target Login Prompts.
node # [    5.048883] netbird[826]: 2023-03-26T04:58:02Z INFO client/cmd/service_controller.go:23: starting Netbird service
node # [    5.054181] netbird[826]: 2023-03-26T04:58:02Z INFO client/internal/config.go:107: generating new config /var/lib/netbird/config.json
node # [    5.062793] netbird[826]: 2023-03-26T04:58:02Z INFO client/cmd/service_controller.go:63: started daemon server: /var/run/netbird/sock
node # [    5.293766] dhcpcd[686]: eth0: soliciting an IPv6 router
(finished: waiting for unit netbird.service, in 6.30 seconds)
node: waiting for file '/var/run/netbird/sock'
(finished: waiting for file '/var/run/netbird/sock', in 0.01 seconds)
node: must succeed: netbird status | grep -q 'Daemon status: NeedsLogin'
node # [    5.901552] netbird[826]: panic: runtime error: invalid memory address or nil pointer dereference
node # [    5.903324] netbird[826]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x6fd4e0]
node # [    5.905098] netbird[826]: goroutine 18 [running]:
node # [    5.909303] netbird[826]: github.com/netbirdio/netbird/client/server.(*Server).Status(0x40002d7040, {0x40003cec60?, 0x400039f0a0?}, 0x40003cec60)
node # [    5.911542] netbird[826]:     github.com/netbirdio/netbird/client/server/server.go:437 +0x220
node # [    5.913233] netbird[826]: github.com/netbirdio/netbird/client/proto._DaemonService_Status_Handler({0xabec00?, 0x40002d7040}, {0xcdf878, 0x40003cec30}, 0x400039f0a0, 0x0)
node # [    5.916470] netbird[826]:     github.com/netbirdio/netbird/client/proto/daemon_grpc.pb.go:213 +0x164
node # [    5.918249] netbird[826]: google.golang.org/grpc.(*Server).processUnaryRPC(0x40001201e0, {0xce7e78, 0x40003e61a0}, 0x400018db00, 0x40003ce630, 0x137eb08, 0x0)
node: output: 
cleanup
kill machine (pid 8)
node # [    5.921300] netbird[826]:     google.golang.org/grpc@v1.52.3/server.go:1336 +0xqemu-system-aarch64: terminating on signal 15 from pid 6 (/nix/store/953amx31bm7m96nnpsfqkp1nga01dck4-python3-3.10.10/bin/python3.10)
node # b
(finished: cleanup, in 0.02 seconds)
<.........................................................>
Originally created by @misuzu on GitHub (Mar 27, 2023). **Describe the problem** 0.14.5 release looks potentially broken **To Reproduce** Steps to reproduce the behavior: 1. Start netbird daemon 0.14.5 on a clean linux vm 2. Wait for unix socket to appear 3. Run `netbird status` 4. See error **Expected behavior** `netbird status` should return `Daemon status: NeedsLogin`, netbird daemon should not panic **Additional context** Reproducible using NixOS test on aarch64 and x86_64, here are the logs: https://logs.nix.ci/?key=nixos/nixpkgs.223194&attempt_id=1560fe63-abee-4393-9a0f-7ea337bbc37c ``` <.........................................................> node # [ 4.985691] systemd[1]: Started Getty on tty1. node # [ 4.986561] systemd[1]: Reached target Login Prompts. node # [ 5.048883] netbird[826]: 2023-03-26T04:58:02Z INFO client/cmd/service_controller.go:23: starting Netbird service node # [ 5.054181] netbird[826]: 2023-03-26T04:58:02Z INFO client/internal/config.go:107: generating new config /var/lib/netbird/config.json node # [ 5.062793] netbird[826]: 2023-03-26T04:58:02Z INFO client/cmd/service_controller.go:63: started daemon server: /var/run/netbird/sock node # [ 5.293766] dhcpcd[686]: eth0: soliciting an IPv6 router (finished: waiting for unit netbird.service, in 6.30 seconds) node: waiting for file '/var/run/netbird/sock' (finished: waiting for file '/var/run/netbird/sock', in 0.01 seconds) node: must succeed: netbird status | grep -q 'Daemon status: NeedsLogin' node # [ 5.901552] netbird[826]: panic: runtime error: invalid memory address or nil pointer dereference node # [ 5.903324] netbird[826]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x6fd4e0] node # [ 5.905098] netbird[826]: goroutine 18 [running]: node # [ 5.909303] netbird[826]: github.com/netbirdio/netbird/client/server.(*Server).Status(0x40002d7040, {0x40003cec60?, 0x400039f0a0?}, 0x40003cec60) node # [ 5.911542] netbird[826]: github.com/netbirdio/netbird/client/server/server.go:437 +0x220 node # [ 5.913233] netbird[826]: github.com/netbirdio/netbird/client/proto._DaemonService_Status_Handler({0xabec00?, 0x40002d7040}, {0xcdf878, 0x40003cec30}, 0x400039f0a0, 0x0) node # [ 5.916470] netbird[826]: github.com/netbirdio/netbird/client/proto/daemon_grpc.pb.go:213 +0x164 node # [ 5.918249] netbird[826]: google.golang.org/grpc.(*Server).processUnaryRPC(0x40001201e0, {0xce7e78, 0x40003e61a0}, 0x400018db00, 0x40003ce630, 0x137eb08, 0x0) node: output: cleanup kill machine (pid 8) node # [ 5.921300] netbird[826]: google.golang.org/grpc@v1.52.3/server.go:1336 +0xqemu-system-aarch64: terminating on signal 15 from pid 6 (/nix/store/953amx31bm7m96nnpsfqkp1nga01dck4-python3-3.10.10/bin/python3.10) node # b (finished: cleanup, in 0.02 seconds) <.........................................................> ```
Author
Owner

@pappz commented on GitHub (Mar 27, 2023):

@misuzu Thank you for the detailed report and sorry for the inconvenience. In the next release the problem will be fixed.

@pappz commented on GitHub (Mar 27, 2023): @misuzu Thank you for the detailed report and sorry for the inconvenience. In the next release the problem will be fixed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#303