talos
talos copied to clipboard
CLI nil pointer on old dashboard
Bug Report
Still had a dashboard command running while I deleted a server, and got the following nil pointer:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x555b822b6ad2]
goroutine 1 [running]:
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard/components.(*ProcessTable).Update(0xc000c45560, {0xc0009b8060?, 0xc000536000?}, 0xc000ebe000?)
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard/components/tables.go:74 +0xf2
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard.(*UI).UpdateData(0xc0011f99a0)
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard/ui.go:202 +0x112
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard.(*UI).Main(0xc0011f99a0, {0x555b8311a920, 0xc000d688a0}, 0xc0005d7200)
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard/ui.go:173 +0x3698
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard.Main({0x555b8311a920, 0xc000d688a0}, 0xc000cfaf80, 0xb2d05e00)
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard/dashboard.go:27 +0x125
github.com/talos-systems/talos/cmd/talosctl/cmd/talos.glob..func16.1({0x555b8311a920?, 0xc000d688a0?}, 0xc00017cff0?)
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard.go:41 +0x2a
github.com/talos-systems/talos/cmd/talosctl/cmd/talos.WithClient.func1({0x555b8311a878?, 0xc000d503c0?}, 0xc000cfaf80)
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/root.go:98 +0x115
github.com/talos-systems/talos/cmd/talosctl/cmd/talos.WithClientNoNodes.func1({0x555b8311a878, 0xc000d503c0})
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/root.go:74 +0x459
github.com/talos-systems/talos/pkg/cli.WithContext({0x555b8311a8b0?, 0xc000052170?}, 0xc000cc9cc0)
github.com/talos-systems/talos/pkg/cli/context.go:40 +0x1d1
github.com/talos-systems/talos/cmd/talosctl/cmd/talos.WithClientNoNodes(0xc000c3d600?)
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/root.go:47 +0x45
github.com/talos-systems/talos/cmd/talosctl/cmd/talos.WithClient(0x0?)
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/root.go:81 +0x35
github.com/talos-systems/talos/cmd/talosctl/cmd/talos.glob..func16(0x555b845bb800?, {0xc000d50380?, 0x4?, 0x4?})
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard.go:40 +0x25
github.com/spf13/cobra.(*Command).execute(0x555b845bb800, {0xc000d50340, 0x4, 0x4})
github.com/spf13/[email protected]/command.go:856 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0x555b845b5e00)
github.com/spf13/[email protected]/command.go:974 +0x3b4
github.com/talos-systems/talos/cmd/talosctl/cmd.Execute()
github.com/talos-systems/talos/cmd/talosctl/cmd/root.go:45 +0x1d5
main.main()
github.com/talos-systems/talos/cmd/talosctl/main.go:18 +0x25
Just want to add we are running into a similar issue with the dashboard. Difference being our nodes are definitely up and the error code and stack trace is somewhat different. Still a dashboard panic though.
Command that bugs out after running for about a minute:
& '.\talosctl v1.1.2.exe' --context testkube -n testkube1,testkube2,testkube3,testnode1,testnode2,testnode3,testnode4,testnode5,testnode6,testnode7 dashboard
Error and stack trace:
panic: runtime error: index out of range [-1]
goroutine 1 [running]:
github.com/gizak/termui/v3/widgets.(*List).Draw(0xc0003a1200, 0xc00061c540)
/.cache/mod/github.com/gizak/termui/[email protected]/widgets/list.go:47 +0x69c
github.com/gizak/termui/v3.Render({0xc0009dc708?, 0x1, 0x50?})
/.cache/mod/github.com/gizak/termui/[email protected]/render.go:25 +0x173
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard.(*UI).Main(0xc0009dd9a0, {0x2ced0c8, 0xc0004cd980}, 0xc00074f440)
/src/cmd/talosctl/cmd/talos/dashboard/ui.go:151 +0x3472
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard.Main({0x2ced0c8, 0xc0004cd980}, 0xc00060f000, 0xb2d05e00)
/src/cmd/talosctl/cmd/talos/dashboard/dashboard.go:27 +0x125
github.com/talos-systems/talos/cmd/talosctl/cmd/talos.glob..func16.1({0x2ced0c8?, 0xc0004cd980?}, 0xc000497ea0?) /src/cmd/talosctl/cmd/talos/dashboard.go:41 +0x2a
github.com/talos-systems/talos/cmd/talosctl/cmd/talos.WithClient.func1({0x2ced020?, 0xc0000cc100?}, 0xc00060f000) /src/cmd/talosctl/cmd/talos/root.go:98 +0x115
github.com/talos-systems/talos/cmd/talosctl/cmd/talos.WithClientNoNodes.func1({0x2ced020, 0xc0000cc100}) /src/cmd/talosctl/cmd/talos/root.go:74 +0x459
github.com/talos-systems/talos/pkg/cli.WithContext({0x2ced058?, 0xc00004e120?}, 0xc000d65cc0) /src/pkg/cli/context.go:40 +0x1d1
github.com/talos-systems/talos/cmd/talosctl/cmd/talos.WithClientNoNodes(0xc00005d700?) /src/cmd/talosctl/cmd/talos/root.go:47 +0x45
github.com/talos-systems/talos/cmd/talosctl/cmd/talos.WithClient(0x0?) /src/cmd/talosctl/cmd/talos/root.go:81 +0x35
github.com/talos-systems/talos/cmd/talosctl/cmd/talos.glob..func16(0x3ebfe40?, {0xc0000cc0c0?, 0x4?, 0x4?}) /src/cmd/talosctl/cmd/talos/dashboard.go:40 +0x25
github.com/spf13/cobra.(*Command).execute(0x3ebfe40, {0xc0000cc080, 0x4, 0x4}) /.cache/mod/github.com/spf13/[email protected]/command.go:856 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0x3eba940) /.cache/mod/github.com/spf13/[email protected]/command.go:974 +0x3b4
github.com/talos-systems/talos/cmd/talosctl/cmd.Execute()
/src/cmd/talosctl/cmd/root.go:45 +0x1d5
main.main()
/src/cmd/talosctl/main.go:18 +0x25
I can take a look at this, if no one else is working on it currently
Also experiencing this.
Talos 1.2.5 - Fedora.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x207717c]
goroutine 1 [running]:
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard/components.(*ProcessTable).Update(0xc00156a120, {0xc000bf1580?, 0xc000944180?}, 0x2063aea?)
/src/cmd/talosctl/cmd/talos/dashboard/components/tables.go:82 +0x15c
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard.(*UI).UpdateData(0xc001a3f848)
/src/cmd/talosctl/cmd/talos/dashboard/ui.go:202 +0x112
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard.(*UI).Main(0xc001a3f848, {0x2ef4e48, 0xc00091ec30}, 0xc00010e900)
/src/cmd/talosctl/cmd/talos/dashboard/ui.go:173 +0x36cf
github.com/talos-systems/talos/cmd/talosctl/cmd/talos/dashboard.Main({0x2ef4e48, 0xc00091ec30}, 0xc0004a2900, 0xb2d05e00)
/src/cmd/talosctl/cmd/talos/dashboard/dashboard.go:27 +0x125
github.com/talos-systems/talos/cmd/talosctl/cmd/talos.glob..func16.1({0x2ef4e48?, 0xc00091ec30?}, 0xc00043b5e0?)
/src/cmd/talosctl/cmd/talos/dashboard.go:41 +0x2a
github.com/talos-systems/talos/cmd/talosctl/pkg/talos/global.(*Args).WithClient.func1({0x2ef4da0?, 0xc0008fa540?}, 0xc0004a2900)
/src/cmd/talosctl/pkg/talos/global/client.go:92 +0x115
github.com/talos-systems/talos/cmd/talosctl/pkg/talos/global.(*Args).WithClientNoNodes.func1({0x2ef4da0, 0xc0008fa540})
/src/cmd/talosctl/pkg/talos/global/client.go:65 +0x619
github.com/talos-systems/talos/pkg/cli.WithContext({0x2ef4dd8?, 0xc00012e000?}, 0xc00142bbc0)
/src/pkg/cli/context.go:40 +0x1d1
github.com/talos-systems/talos/cmd/talosctl/pkg/talos/global.(*Args).WithClientNoNodes(0x0?, 0x0?, {0x0?, 0x0?, 0x0?})
/src/cmd/talosctl/pkg/talos/global/client.go:33 +0x6b
github.com/talos-systems/talos/cmd/talosctl/pkg/talos/global.(*Args).WithClient(0x0?, 0x0?, {0x0?, 0x0?, 0x0?})
/src/cmd/talosctl/pkg/talos/global/client.go:75 +0x48
github.com/talos-systems/talos/cmd/talosctl/cmd/talos.WithClient(...)
/src/cmd/talosctl/cmd/talos/root.go:46
github.com/talos-systems/talos/cmd/talosctl/cmd/talos.glob..func16(0x44e6060?, {0xc0002b9560?, 0x2?, 0x2?})
/src/cmd/talosctl/cmd/talos/dashboard.go:40 +0x2e
github.com/spf13/cobra.(*Command).execute(0x44e6060, {0xc0002b9520, 0x2, 0x2})
/.cache/mod/github.com/spf13/[email protected]/command.go:872 +0x694
github.com/spf13/cobra.(*Command).ExecuteC(0x44df760)
/.cache/mod/github.com/spf13/[email protected]/command.go:990 +0x3bd
github.com/talos-systems/talos/cmd/talosctl/cmd.Execute()
/src/cmd/talosctl/cmd/root.go:51 +0x37f
main.main()
/src/cmd/talosctl/main.go:18 +0x25