0.6.1 SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xd23b47] #23

Closed
opened 2025-12-29 01:20:17 +01:00 by adam · 3 comments
Owner

Originally created by @outbackdingo on GitHub (Aug 20, 2021).

while doing some testing

sudo /root/headscale -n optim nodes list
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xd23b47]

goroutine 1 [running]:
github.com/juanfont/headscale/cmd/headscale/cli.nodesToPtables(0xc0003d6000, 0xb, 0x14, 0xc0000ab560, 0x0, 0x0, 0x0, 0xc0000aacf0)
/home/runner/work/headscale/headscale/cmd/headscale/cli/nodes.go:167 +0x2c7
github.com/juanfont/headscale/cmd/headscale/cli.glob..func8(0x179eee0, 0xc0004da1e0, 0x0, 0x2)
/home/runner/work/headscale/headscale/cmd/headscale/cli/nodes.go:92 +0x2a5
github.com/spf13/cobra.(*Command).execute(0x179eee0, 0xc0004da1a0, 0x2, 0x2, 0x179eee0, 0xc0004da1a0)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:856 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x179d5e0, 0x0, 0xc00031fd28, 0xd1e937)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897
github.com/juanfont/headscale/cmd/headscale/cli.Execute()
/home/runner/work/headscale/headscale/cmd/headscale/cli/root.go:24 +0x31
main.main()
/home/runner/work/headscale/headscale/cmd/headscale/headscale.go:64 +0x287

Originally created by @outbackdingo on GitHub (Aug 20, 2021). while doing some testing sudo /root/headscale -n optim nodes list panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xd23b47] goroutine 1 [running]: github.com/juanfont/headscale/cmd/headscale/cli.nodesToPtables(0xc0003d6000, 0xb, 0x14, 0xc0000ab560, 0x0, 0x0, 0x0, 0xc0000aacf0) /home/runner/work/headscale/headscale/cmd/headscale/cli/nodes.go:167 +0x2c7 github.com/juanfont/headscale/cmd/headscale/cli.glob..func8(0x179eee0, 0xc0004da1e0, 0x0, 0x2) /home/runner/work/headscale/headscale/cmd/headscale/cli/nodes.go:92 +0x2a5 github.com/spf13/cobra.(*Command).execute(0x179eee0, 0xc0004da1a0, 0x2, 0x2, 0x179eee0, 0xc0004da1a0) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:856 +0x2c2 github.com/spf13/cobra.(*Command).ExecuteC(0x179d5e0, 0x0, 0xc00031fd28, 0xd1e937) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x375 github.com/spf13/cobra.(*Command).Execute(...) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897 github.com/juanfont/headscale/cmd/headscale/cli.Execute() /home/runner/work/headscale/headscale/cmd/headscale/cli/root.go:24 +0x31 main.main() /home/runner/work/headscale/headscale/cmd/headscale/headscale.go:64 +0x287
adam closed this issue 2025-12-29 01:20:17 +01:00
Author
Owner

@kradalby commented on GitHub (Aug 21, 2021):

Hi, could you describe the setup process before this? or is this the first command issued with a completely fresh headscale?

@kradalby commented on GitHub (Aug 21, 2021): Hi, could you describe the setup process before this? or is this the first command issued with a completely fresh `headscale`?
Author
Owner

@outbackdingo commented on GitHub (Sep 2, 2021):

well heres another... seems cannot list nodes in "plain text"

root@portaladmin:~# ./headscale nodes list -n optim
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xd27747]

goroutine 1 [running]:
github.com/juanfont/headscale/cmd/headscale/cli.nodesToPtables(0xc00059a000, 0x11, 0x14, 0xc000560c78, 0x0, 0x0, 0x0, 0xc0000b7488)
/home/runner/work/headscale/headscale/cmd/headscale/cli/nodes.go:167 +0x2c7
github.com/juanfont/headscale/cmd/headscale/cli.glob..func8(0x17a5ee0, 0xc000544820, 0x0, 0x2)
/home/runner/work/headscale/headscale/cmd/headscale/cli/nodes.go:92 +0x2a5
github.com/spf13/cobra.(*Command).execute(0x17a5ee0, 0xc0005447e0, 0x2, 0x2, 0x17a5ee0, 0xc0005447e0)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:856 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x17a45e0, 0x0, 0xc00029fd28, 0xd22417)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897
github.com/juanfont/headscale/cmd/headscale/cli.Execute()
/home/runner/work/headscale/headscale/cmd/headscale/cli/root.go:24 +0x31
main.main()
/home/runner/work/headscale/headscale/cmd/headscale/headscale.go:64 +0x287

@outbackdingo commented on GitHub (Sep 2, 2021): well heres another... seems cannot list nodes in "plain text" root@portaladmin:~# ./headscale nodes list -n optim panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xd27747] goroutine 1 [running]: github.com/juanfont/headscale/cmd/headscale/cli.nodesToPtables(0xc00059a000, 0x11, 0x14, 0xc000560c78, 0x0, 0x0, 0x0, 0xc0000b7488) /home/runner/work/headscale/headscale/cmd/headscale/cli/nodes.go:167 +0x2c7 github.com/juanfont/headscale/cmd/headscale/cli.glob..func8(0x17a5ee0, 0xc000544820, 0x0, 0x2) /home/runner/work/headscale/headscale/cmd/headscale/cli/nodes.go:92 +0x2a5 github.com/spf13/cobra.(*Command).execute(0x17a5ee0, 0xc0005447e0, 0x2, 0x2, 0x17a5ee0, 0xc0005447e0) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:856 +0x2c2 github.com/spf13/cobra.(*Command).ExecuteC(0x17a45e0, 0x0, 0xc00029fd28, 0xd22417) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x375 github.com/spf13/cobra.(*Command).Execute(...) /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897 github.com/juanfont/headscale/cmd/headscale/cli.Execute() /home/runner/work/headscale/headscale/cmd/headscale/cli/root.go:24 +0x31 main.main() /home/runner/work/headscale/headscale/cmd/headscale/headscale.go:64 +0x287
Author
Owner

@SilverBut commented on GitHub (Sep 3, 2021):

@outbackdingo This should have been fixed in the main branch's build. SIGSEGV was caused since a node has never been seen before.

@SilverBut commented on GitHub (Sep 3, 2021): @outbackdingo This should have been fixed in the main branch's build. SIGSEGV was caused since a node has never been seen before.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#23