seabird icon indicating copy to clipboard operation
seabird copied to clipboard

Crash after selecting cluster

Open hamnis opened this issue 1 year ago • 2 comments

Issue description

select a cluster with limited access rights. This uses the latest flatpak version.

crash:

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: closure error: unexpected panic caught: runtime error: invalid memory address or nil pointer dereference

Closure added at:
	github.com/diamondburned/gotk4/pkg/glib/v2.IdleAdd at github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:33679
	github.com/getseabird/seabird/internal/ui.(*WelcomeWindow).createContent.func3.1 at github.com/getseabird/seabird/internal/ui/welcome_window.go:132
	runtime.goexit at runtime/asm_amd64.s:1695
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x2797efa]

goroutine 1 [running, locked to thread]:
github.com/diamondburned/gotk4/pkg/core/closure.(*FuncStack).Panicf(0xc0007d4fc0, {0x309be3b, 0x1b}, {0xc000725258, 0x1, 0x1})
	github.com/diamondburned/gotk4/[email protected]/core/closure/funcstack.go:104 +0x908
github.com/diamondburned/gotk4/pkg/core/closure.(*FuncStack).TryRepanic(0xc0007d4fc0)
	github.com/diamondburned/gotk4/[email protected]/core/closure/funcstack.go:122 +0xc5
panic({0x2b9aae0?, 0x56e46a0?})
	runtime/panic.go:770 +0x132
github.com/getseabird/seabird/internal/ui/list.(*List).createColumns(0xc00079f800)
	github.com/getseabird/seabird/internal/ui/list/list.go:141 +0x7a
github.com/getseabird/seabird/internal/ui/list.(*List).onObjectsChange(0xc00079f800, {0x0, 0x0, 0x5626eb?})
	github.com/getseabird/seabird/internal/ui/list/list.go:112 +0x2f2
github.com/getseabird/seabird/internal/ui/common.OnChange[...]({0x34810d0, 0xc00020e360}, {0x3472ca8, 0xc0002a01c0}, 0xc000a01480)
	github.com/getseabird/seabird/internal/ui/common/on.go:27 +0x12a
github.com/getseabird/seabird/internal/ui/list.NewList({0x34810d0, 0xc00020e360}, 0xc0004db290, 0xc00020e8d0, 0xc0006fe000)
	github.com/getseabird/seabird/internal/ui/list/list.go:72 +0x478
github.com/getseabird/seabird/internal/ui.NewClusterWindow({0x34810d0, 0xc000124030}, 0xc0006d0c90, 0xc0004db290)
	github.com/getseabird/seabird/internal/ui/cluster_window.go:112 +0x874
github.com/getseabird/seabird/internal/ui.(*WelcomeWindow).createContent.func3.1.1()
	github.com/getseabird/seabird/internal/ui/welcome_window.go:140 +0xb8
github.com/diamondburned/gotk4/pkg/core/glib._gotk4_sourceFunc(0x1007)
	github.com/diamondburned/gotk4/[email protected]/core/glib/glib.go:352 +0xd9
github.com/diamondburned/gotk4/pkg/gio/v2._Cfunc_g_application_run(0x18652f30, 0x1, 0x186bd490)
	_cgo_gotypes.go:12555 +0x4b
github.com/diamondburned/gotk4/pkg/gio/v2.(*Application).Run.func3(0x18652f30, 0x1, 0x186bd490)
	github.com/diamondburned/gotk4/[email protected]/gio/v2/gio.go:36988 +0x67
github.com/diamondburned/gotk4/pkg/gio/v2.(*Application).Run(0xc0006120a8, {0xc000052090, 0x1, 0x1})
	github.com/diamondburned/gotk4/[email protected]/gio/v2/gio.go:36988 +0x1f1
github.com/getseabird/seabird/internal/ui.(*Application).Run(0x3079ffb?)
	github.com/getseabird/seabird/internal/ui/application.go:70 +0x2d
main.main()
	github.com/getseabird/seabird/main.go:31 +0xc5

expected result: not crash

Steps to reproduce

Select a cluster with limited access rights

System information

flatpak dev.skynomads.Seabird v0.5.1, Pop! OS, linux kernel: 6.9.3-76060903-generic

hamnis avatar Nov 01 '24 10:11 hamnis

Not happening on version 0.4.2, commit cb6f99a4ac1b32a4c7d88f86b7da3ccd65d490f9126aa64010b993389c00b751.

Temporary using old flatpak version. Downgrade:

sudo flatpak update --commit=cb6f99a4ac1b32a4c7d88f86b7da3ccd65d490f9126aa64010b993389c00b751 dev.skynomads.Seabird

ghost avatar Nov 21 '24 14:11 ghost

This still crashes, but even earlier than before. Now I dont even get the namespace selection screen.

E1021 08:46:03.600293   18639 reflector.go:158] "Unhandled Error" err="k8s.io/[email protected]/tools/cache/reflector.go:243: Failed to watch *v1.Event: failed to list *v1.Event: events.events.k8s.io is forbidden: User \"https://console.paas.example.com#hamnis\" cannot list resource \"events\" in API group \"events.k8s.io\" at the cluster scope" logger="UnhandledError"
E1021 08:46:03.732665   18639 cluster.go:228] namespaces informer: unknown (get namespaces)
I1021 08:46:03.818598   18639 metrics.go:40] unable to fetch pod metrics: pods.metrics.k8s.io is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "pods" in API group "metrics.k8s.io" at the cluster scope
I1021 08:46:03.864649   18639 metrics.go:46] unable to fetch node metrics: nodes.metrics.k8s.io is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "nodes" in API group "metrics.k8s.io" at the cluster scope
E1021 08:46:03.864708   18639 state.go:74] failed to load extension: %scustomresourcedefinitions.apiextensions.k8s.io is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "customresourcedefinitions" in API group "apiextensions.k8s.io" at the cluster scope
W1021 08:46:03.919373   18639 reflector.go:561] k8s.io/[email protected]/tools/cache/reflector.go:243: failed to list *v1.Deployment: deployments.apps is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "deployments" in API group "apps" at the cluster scope
E1021 08:46:03.919404   18639 cluster.go:228] deployments informer: failed to list *v1.Deployment: deployments.apps is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "deployments" in API group "apps" at the cluster scope
W1021 08:46:03.920507   18639 reflector.go:561] k8s.io/[email protected]/tools/cache/reflector.go:243: failed to list *v1.ConfigMap: configmaps is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "configmaps" in API group "" at the cluster scope
E1021 08:46:03.920527   18639 cluster.go:228] configmaps informer: failed to list *v1.ConfigMap: configmaps is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "configmaps" in API group "" at the cluster scope
W1021 08:46:03.920686   18639 reflector.go:561] k8s.io/[email protected]/tools/cache/reflector.go:243: failed to list *v1.Ingress: ingresses.networking.k8s.io is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "ingresses" in API group "networking.k8s.io" at the cluster scope
E1021 08:46:03.920696   18639 cluster.go:228] ingresses informer: failed to list *v1.Ingress: ingresses.networking.k8s.io is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "ingresses" in API group "networking.k8s.io" at the cluster scope
W1021 08:46:03.922474   18639 reflector.go:561] k8s.io/[email protected]/tools/cache/reflector.go:243: failed to list *v1.Node: nodes is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "nodes" in API group "" at the cluster scope
E1021 08:46:03.922505   18639 cluster.go:228] nodes informer: failed to list *v1.Node: nodes is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "nodes" in API group "" at the cluster scope
W1021 08:46:03.922475   18639 reflector.go:561] k8s.io/[email protected]/tools/cache/reflector.go:243: failed to list *v1.PersistentVolumeClaim: persistentvolumeclaims is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "persistentvolumeclaims" in API group "" at the cluster scope
E1021 08:46:03.922542   18639 cluster.go:228] persistentvolumeclaims informer: failed to list *v1.PersistentVolumeClaim: persistentvolumeclaims is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "persistentvolumeclaims" in API group "" at the cluster scope
W1021 08:46:03.922698   18639 reflector.go:561] k8s.io/[email protected]/tools/cache/reflector.go:243: failed to list *v1.Pod: pods is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "pods" in API group "" at the cluster scope
E1021 08:46:03.922719   18639 cluster.go:228] pods informer: failed to list *v1.Pod: pods is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "pods" in API group "" at the cluster scope
W1021 08:46:03.923057   18639 reflector.go:561] k8s.io/[email protected]/tools/cache/reflector.go:243: failed to list *v1.Service: services is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "services" in API group "" at the cluster scope
E1021 08:46:03.923087   18639 cluster.go:228] services informer: failed to list *v1.Service: services is forbidden: User "https://console.paas.example.com#hamnis" cannot list resource "services" in API group "" at the cluster scope
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: closure error: unexpected panic caught: runtime error: invalid memory address or nil pointer dereference
	
	Closure added at:
		github.com/diamondburned/gotk4/pkg/glib/v2.IdleAdd at github.com/diamondburned/gotk4/[email protected]/glib/v2/glib.go:33679
		github.com/getseabird/seabird/internal/ui.(*WelcomeWindow).createContent.func3.1 at github.com/getseabird/seabird/internal/ui/welcome_window.go:130
		runtime.goexit at runtime/asm_amd64.s:1693
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x2507c77]

goroutine 1 [running, locked to thread]:
github.com/diamondburned/gotk4/pkg/core/closure.(*FuncStack).Panicf(0xc00091d590, {0x2f3a9ba, 0x1b}, {0xc000073300, 0x1, 0x1})
	github.com/diamondburned/gotk4/[email protected]/core/closure/funcstack.go:104 +0x928
github.com/diamondburned/gotk4/pkg/core/closure.(*FuncStack).TryRepanic(0xc00091d590)
	github.com/diamondburned/gotk4/[email protected]/core/closure/funcstack.go:122 +0xbc
panic({0x29951a0?, 0x568f1e0?})
	runtime/panic.go:783 +0x132
github.com/getseabird/seabird/internal/ui/list.(*List).createColumns(0xc00026a690)
	github.com/getseabird/seabird/internal/ui/list/list.go:142 +0x77
github.com/getseabird/seabird/internal/ui/list.(*List).onObjectsChange(0xc00026a690, {0x0, 0x0, 0xc0000736e0?})
	github.com/getseabird/seabird/internal/ui/list/list.go:113 +0x370
github.com/getseabird/seabird/internal/pubsub.(*property[...]).Sub(0x5266c5, {0x3345cd0?, 0xc00097d050?}, 0xc000964e10?)
	github.com/getseabird/seabird/internal/pubsub/pubsub.go:73 +0x48
github.com/getseabird/seabird/internal/ui/list.NewList({0x3345cd0, 0xc00097d050}, 0xc00031a6c0, 0xc00097d650, 0xc00095ec00)
	github.com/getseabird/seabird/internal/ui/list/list.go:73 +0x4a6
github.com/getseabird/seabird/internal/ui.NewClusterWindow({0x3345cd0, 0xc000126120}, 0xc000966378, 0xc00031a6c0)
	github.com/getseabird/seabird/internal/ui/cluster_window.go:118 +0x931
github.com/getseabird/seabird/internal/ui.(*WelcomeWindow).createContent.func3.1.1()
	github.com/getseabird/seabird/internal/ui/welcome_window.go:138 +0xb5
github.com/diamondburned/gotk4/pkg/core/glib._gotk4_sourceFunc(0x1007)
	github.com/diamondburned/gotk4/[email protected]/core/glib/glib.go:352 +0xb9
github.com/diamondburned/gotk4/pkg/gio/v2._Cfunc_g_application_run(0x3e17ff50, 0x1, 0x3e24c2a0)
	_cgo_gotypes.go:14094 +0x46
github.com/diamondburned/gotk4/pkg/gio/v2.(*Application).Run.func3(...)
	github.com/diamondburned/gotk4/[email protected]/gio/v2/gio.go:42200
github.com/diamondburned/gotk4/pkg/gio/v2.(*Application).Run(0xc000614180, {0xc0000501c0, 0x1, 0x1})
	github.com/diamondburned/gotk4/[email protected]/gio/v2/gio.go:42200 +0x20e
github.com/getseabird/seabird/internal/ui.(*Application).Run(0x3318608?)
	github.com/getseabird/seabird/internal/ui/application.go:70 +0x2d
main.main()
	github.com/getseabird/seabird/main.go:31 +0xc5

I have access to some namespaces, but not the default one.

hamnis avatar Oct 21 '25 06:10 hamnis