-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boom!! runtime error: invalid memory address or nil pointer dereference - v0.30.8 #2428
Comments
@Loth4r Thanks for reporting this! |
I'm running into the same issue. |
Same here on MacOS. |
Thanks for quick response @derailed!. Please find my config file below
Note that I have not been fiddling around with this file at all. Only thing i did was to update k9s and this issue started to pop up. If this helps -> I maintain k9s via homebrew, tried uninstalling it, clearing / |
Same issue here, also have not been fiddling with config files, but tried clearing out that ~/Library/Application\ Support/k9s folder with no effect. Is there an easy way to roll back to a previous version of k9s? |
I'm running into the same issue. |
@Loth4r Thanks for the details! I think I've found the issue ;( Fix on the way... |
I'm not sure if related or not, but on version v0.30.8, if you do |
As a quick fix disable the ConfigWatcher (https://github.com/derailed/k9s/blob/master/internal/ui/config.go#L125). The problem is a race condition on config reloads. If i understand it correctly a namespace change will be written to the config file. This triggers the watcher and reloads the config back. The config handling is not thread safe. |
Thanks! Can you give us some pointers on how to disable that? Do we need to comment out some code and compile locally or is that something we can do at the config or CLI level? Also, in the meantime would someone be able to roll back the k9s version on homebrew? |
Same issue on Mac. |
Had the same issue after upgrading via Homebrew for Mac. I can't seems to install older version via @ version either. Looks like i have to manually download the older binary from release and run it ? |
* [Bug] Fix #2428 * [Bug] Ensures primordials configs are gen/saved if not present * v0.31.1 release notes
I can confirm this got solved for me after upgrading to v0.31.1. Thanks for the support @derailed! |
This still happens in v0.31.3 if KUBECONFIG env is not set |
* cleaning up * [Bug] Fix derailed#2425 - no context skin issue * [Bug] Fix derailed#2428 * [Feat] schema validation * v0.31.0 Release notes
* [Bug] Fix derailed#2428 * [Bug] Ensures primordials configs are gen/saved if not present * v0.31.1 release notes
* [Bug] Fix derailed#2428 * fix derailed#2446 * fix derailed#2449 * schemas updates * Add debug info * v0.31.2 rel notes
* cleaning up * [Bug] Fix derailed#2425 - no context skin issue * [Bug] Fix derailed#2428 * [Feat] schema validation * v0.31.0 Release notes
* [Bug] Fix derailed#2428 * [Bug] Ensures primordials configs are gen/saved if not present * v0.31.1 release notes
* [Bug] Fix derailed#2428 * fix derailed#2446 * fix derailed#2449 * schemas updates * Add debug info * v0.31.2 rel notes
happening in macOs 0.32.4 |
Describe the bug
k9s is crashing for me after update from 0.29.1 to v0.30.8 when switching through namespaces with following message: Boom!! runtime error: invalid memory address or nil pointer dereference
To Reproduce
Steps to reproduce the behavior:
Boom!! runtime error: invalid memory address or nil pointer dereference
Boom!! runtime error: invalid memory address or nil pointer dereference
Expected behavior
Browsing namespace works on the first try.
Versions (please complete the following information):
Additional context
Results of running
k9s --logLevel debug --logFile k9s_0.30.8.log
1:55AM INF 🐶 K9s starting up... 11:55AM DBG Found existing context config: "/Users/test_user/Library/Application Support/k9s/clusters/test-cluster/test-cluster/config.yaml" 11:55AM DBG Active Context "test-cluster" 11:55AM INF ✅ Kubernetes connectivity 11:55AM DBG No custom skin found. Using stock skin 11:55AM DBG Factory START with ns
"test-ns"11:55AM DBG Fetching latest k9s rev...
11:55AM DBG K9s latest rev: "v0.30.8"
11:55AM DBG ConfigWatcher watching: "/Users/test_user/Library/Application Support/k9s/config.yaml"
11:55AM DBG ConfigWatcher watching: "/Users/test_user/Library/Application Support/k9s/clusters/test-cluster/test-cluster/config.yaml"
11:55AM WRN CustomView watcher failed error="open /Users/test_user/Library/Application Support/k9s/views.yaml: no such file or directory"
11:55AM DBG ConfigWatcher file changed: /Users/test_user/Library/Application Support/k9s/clusters/test-cluster/test-cluster/config.yaml -- "WRITE"
11:55AM DBG Found existing context config: "/Users/test_user/Library/Application Support/k9s/clusters/test-cluster/test-cluster/config.yaml"
11:55AM DBG ConfigWatcher file changed: /Users/test_user/Library/Application Support/k9s/config.yaml -- "WRITE|CHMOD"
11:55AM DBG No custom skin found. Using stock skin
11:55AM DBG No custom skin found. Using stock skin
11:55AM DBG ConfigWatcher file changed: /Users/test_user/Library/Application Support/k9s/clusters/test-cluster/test-cluster/config.yaml -- "WRITE"
11:55AM DBG Found existing context config: "/Users/test_user/Library/Application Support/k9s/clusters/test-cluster/test-cluster/config.yaml"
11:55AM DBG ConfigWatcher file changed: /Users/test_user/Library/Application Support/k9s/config.yaml -- "WRITE"
11:55AM DBG ConfigWatcher file changed: /Users/test_user/Library/Application Support/k9s/clusters/test-cluster/test-cluster/config.yaml -- "WRITE|CHMOD"
11:55AM DBG Found existing context config: "/Users/test_user/Library/Application Support/k9s/clusters/test-cluster/test-cluster/config.yaml"
11:55AM ERR Boom! runtime error: invalid memory address or nil pointer dereference
11:55AM DBG ConfigWatcher file changed: /Users/test_user/Library/Application Support/k9s/config.yaml -- "WRITE|CHMOD"
11:55AM ERR goroutine 1 [running]:
runtime/debug.Stack()
runtime/debug/stack.go:24 +0x64
github.com/derailed/k9s/cmd.run.func2()
github.com/derailed/k9s/cmd/root.go:84 +0x9c
panic({0x106490bc0?, 0x1089b51e0?})
runtime/panic.go:914 +0x218
github.com/derailed/tview.(*Application).Run.func1()
github.com/derailed/[email protected]/application.go:243 +0x4c
panic({0x106490bc0?, 0x1089b51e0?})
runtime/panic.go:914 +0x218
github.com/derailed/k9s/internal/config.(*K9s).ActiveContextNamespace(...)
github.com/derailed/k9s/internal/config/k9s.go:152
github.com/derailed/k9s/internal/config.(*Config).ActiveNamespace(0x14000e4adb0?)
github.com/derailed/k9s/internal/config/config.go:132 +0x28
github.com/derailed/k9s/internal/view.(*Command).run(0x14000e4adb0, 0x14001a87400, {0x0, 0x0}, 0x80?)
github.com/derailed/k9s/internal/view/command.go:139 +0xdc
github.com/derailed/k9s/internal/view.(*App).gotoResource(0x14000b5fc20, {0x1054eadac, 0x4}, {0x0, 0x0}, 0x2?)
github.com/derailed/k9s/internal/view/app.go:688 +0x84
github.com/derailed/k9s/internal/view.(*Namespace).switchNs(0x14001a87558?, 0x105351cf8?, {0x1000002d5?, 0x14000dc8900?}, {{0x14001a875b8, 0x102ce72b8}, {0x14001a87588, 0x1052d0ac0}, {0x14000dbcd60, 0x14001a87540}, ...}, ...)
github.com/derailed/k9s/internal/view/ns.go:46 +0x4c
github.com/derailed/k9s/internal/view.(*Browser).enterCmd(0x14000e56300, 0x14001a876d6?)
github.com/derailed/k9s/internal/view/browser.go:330 +0xe8
github.com/derailed/k9s/internal/view.(*Table).keyboard(0x14000abd280, 0x140004fece0)
github.com/derailed/k9s/internal/view/table.go:90 +0x120
github.com/derailed/k9s/internal/view.(*Browser).InputHandler.(*Table).InputHandler.(*Box).WrapInputHandler.func2(0x14001a87768?, 0x1053cd620?)
github.com/derailed/[email protected]/box.go:179 +0x3c
github.com/derailed/k9s/internal/view.(*PageStack).InputHandler.(*Pages).InputHandler.func1(0x110da3f58?, 0x14000dd3380?)
github.com/derailed/[email protected]/pages.go:332 +0xa8
github.com/derailed/k9s/internal/view.(*PageStack).InputHandler.(*Pages).InputHandler.(*Box).WrapInputHandler.func2(0x14001a877e8?, 0x103f55900?)
github.com/derailed/[email protected]/box.go:182 +0x54
github.com/derailed/tview.(*Flex).InputHandler.func1(0x14001a87878?, 0x4?)
github.com/derailed/[email protected]/flex.go:261 +0xd0
github.com/derailed/tview.(*Flex).InputHandler.(*Box).WrapInputHandler.func2(0x14000dd2810?, 0xeccc?)
github.com/derailed/[email protected]/box.go:182 +0x54
github.com/derailed/k9s/internal/ui.(*Pages).InputHandler.(*Pages).InputHandler.func1(0x10?, 0x106595d60?)
github.com/derailed/[email protected]/pages.go:332 +0xa8
github.com/derailed/k9s/internal/ui.(*Pages).InputHandler.(*Pages).InputHandler.(*Box).WrapInputHandler.func2(0x14001a879e0?, 0x14001a87920?)
github.com/derailed/[email protected]/box.go:182 +0x54
github.com/derailed/tview.(*Application).Run(0x14000238d20)
github.com/derailed/[email protected]/application.go:334 +0x470
github.com/derailed/k9s/internal/view.(*App).Run(0x14000b5fc20)
github.com/derailed/k9s/internal/view/app.go:530 +0x90
github.com/derailed/k9s/cmd.run(0x14000209100?, {0x1054ead04?, 0x4?, 0x1054eac20?})
github.com/derailed/k9s/cmd/root.go:102 +0x40c
github.com/spf13/cobra.(*Command).execute(0x1089e80e0, {0x1400010e060, 0x4, 0x4})
github.com/spf13/[email protected]/command.go:983 +0x840
github.com/spf13/cobra.(*Command).ExecuteC(0x1089e80e0)
github.com/spf13/[email protected]/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/[email protected]/command.go:1039
github.com/derailed/k9s/cmd.Execute(...)
github.com/derailed/k9s/cmd/root.go:59
main.main()
github.com/derailed/k9s/main.go:32 +0x28
`
The text was updated successfully, but these errors were encountered: