[PR #4309] fix: profilemanager panic when reading incomplete config #4191

Open
opened 2025-11-20 08:07:54 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/4309

State: closed
Merged: Yes


Describe your changes

properly initializes config in profilemanager

tests failure in nixpkgs https://github.com/NixOS/nixpkgs/pull/431976/checks?check_run_id=47683203864 / https://github.com/NixOS/nixpkgs/pull/431976

Aug 08 15:09:08 clients systemd[1]: Started A WireGuard-based mesh network that connects your devices into a single private network.
Aug 08 15:09:09 clients netbird[1599]: 2025-08-08T15:09:09Z INFO client/cmd/service_controller.go:27: starting Netbird service
Aug 08 15:09:09 clients netbird[1599]: panic: runtime error: invalid memory address or nil pointer dereference
Aug 08 15:09:09 clients netbird[1599]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x60f56c]
Aug 08 15:09:09 clients netbird[1599]: goroutine 13 [running]:
Aug 08 15:09:09 clients netbird[1599]: net/url.(*URL).String(0x2e117a0?)
Aug 08 15:09:09 clients netbird[1599]:         net/url/url.go:833 +0x2c
Aug 08 15:09:09 clients netbird[1599]: github.com/netbirdio/netbird/client/server.(*Server).Start(0xc00034ac00)
Aug 08 15:09:09 clients netbird[1599]:         github.com/netbirdio/netbird/client/server/server.go:159 +0x675
Aug 08 15:09:09 clients netbird[1599]: github.com/netbirdio/netbird/client/cmd.(*program).Start.func1()
Aug 08 15:09:09 clients netbird[1599]:         github.com/netbirdio/netbird/client/cmd/service_controller.go:65 +0x4e6
Aug 08 15:09:09 clients netbird[1599]: created by github.com/netbirdio/netbird/client/cmd.(*program).Start in goroutine 1
Aug 08 15:09:09 clients netbird[1599]:         github.com/netbirdio/netbird/client/cmd/service_controller.go:54 +0x2be
Aug 08 15:09:09 clients systemd[1]: netbird.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 08 15:09:09 clients systemd[1]: netbird.service: Failed with result 'exit-code'.

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

**Original Pull Request:** https://github.com/netbirdio/netbird/pull/4309 **State:** closed **Merged:** Yes --- ## Describe your changes properly initializes config in profilemanager ## Issue ticket number and link tests failure in nixpkgs https://github.com/NixOS/nixpkgs/pull/431976/checks?check_run_id=47683203864 / https://github.com/NixOS/nixpkgs/pull/431976 ``` Aug 08 15:09:08 clients systemd[1]: Started A WireGuard-based mesh network that connects your devices into a single private network. Aug 08 15:09:09 clients netbird[1599]: 2025-08-08T15:09:09Z INFO client/cmd/service_controller.go:27: starting Netbird service Aug 08 15:09:09 clients netbird[1599]: panic: runtime error: invalid memory address or nil pointer dereference Aug 08 15:09:09 clients netbird[1599]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x60f56c] Aug 08 15:09:09 clients netbird[1599]: goroutine 13 [running]: Aug 08 15:09:09 clients netbird[1599]: net/url.(*URL).String(0x2e117a0?) Aug 08 15:09:09 clients netbird[1599]: net/url/url.go:833 +0x2c Aug 08 15:09:09 clients netbird[1599]: github.com/netbirdio/netbird/client/server.(*Server).Start(0xc00034ac00) Aug 08 15:09:09 clients netbird[1599]: github.com/netbirdio/netbird/client/server/server.go:159 +0x675 Aug 08 15:09:09 clients netbird[1599]: github.com/netbirdio/netbird/client/cmd.(*program).Start.func1() Aug 08 15:09:09 clients netbird[1599]: github.com/netbirdio/netbird/client/cmd/service_controller.go:65 +0x4e6 Aug 08 15:09:09 clients netbird[1599]: created by github.com/netbirdio/netbird/client/cmd.(*program).Start in goroutine 1 Aug 08 15:09:09 clients netbird[1599]: github.com/netbirdio/netbird/client/cmd/service_controller.go:54 +0x2be Aug 08 15:09:09 clients systemd[1]: netbird.service: Main process exited, code=exited, status=2/INVALIDARGUMENT Aug 08 15:09:09 clients systemd[1]: netbird.service: Failed with result 'exit-code'. ``` ## Stack <!-- branch-stack --> ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md).
saavagebueno added the pull-request label 2025-11-20 08:07:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#4191