-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Describe the bug
K9s crashed when trying to view pod log, showing error:
Boom!! runtime error: invalid memory address or nil pointer dereference.
To Reproduce
Steps to reproduce the behavior:
- Go to 'Pod view
- Click on any pod
- Hit l
- See error
Expected behavior
See logs of the chosen pod.
Versions (please complete the following information):
- OS: OSX 10.14.6
- K9s 0.9.2
- K8s client 1.15.1, K8s server 1.13.12
Additional context
Logs generated from debug mode:
12:11PM WRN NodeMetrics &errors.errorString{s:"Invalid informer"}
12:11PM WRN No plugin configuration found
12:11PM WRN No plugin configuration found
12:11PM WRN No plugin configuration found
12:11PM WRN NodeMetrics &errors.errorString{s:"Invalid informer"}
12:11PM DBG Cluster updater canceled!
12:11PM DBG po updater canceled!
12:11PM ERR Boom! runtime error: invalid memory address or nil pointer dereference
12:11PM ERR goroutine 1 [running]:
runtime/debug.Stack(0x3346a80, 0x2460b03, 0x0)
/usr/local/Cellar/go/1.13/libexec/src/runtime/debug/stack.go:24 +0x9d
github.com/derailed/k9s/cmd.run.func1()
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/cmd/root.go:64 +0x181
panic(0x227a0c0, 0x332aa40)
/usr/local/Cellar/go/1.13/libexec/src/runtime/panic.go:679 +0x1b2
github.com/derailed/tview.(*Application).Run.func1(0xc0005e1e00)
/Users/fernand/go_wk/derailed/pkg/mod/github.com/derailed/[email protected]/application.go:149 +0x82
panic(0x227a0c0, 0x332aa40)
/usr/local/Cellar/go/1.13/libexec/src/runtime/panic.go:679 +0x1b2
github.com/derailed/k9s/internal/watch.(*Informer).Get(0x0, 0x245ccaf, 0x2, 0xc0009a0540, 0x26, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/internal/watch/informer.go:133 +0x37
github.com/derailed/k9s/internal/resource.(*Pod).PodLogs(0xc00000dd00, 0x26aefc0, 0xc0000e7d00, 0xc000ccd020, 0xc000846540, 0xb, 0xc00084654c, 0x1a, 0x0, 0x0, ...)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/internal/resource/pod.go:123 +0x116
github.com/derailed/k9s/internal/resource.(*Pod).Logs(0xc00000dd00, 0x26aefc0, 0xc0000e7d00, 0xc000ccd020, 0xc000846540, 0xb, 0xc00084654c, 0x1a, 0x0, 0x0, ...)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/internal/resource/pod.go:157 +0x218
github.com/derailed/k9s/internal/views.(*logsView).doLoad(0xc0005e68a0, 0xc000846540, 0x26, 0x0, 0x0, 0x0, 0xc0005b8660, 0xc)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/internal/views/logs.go:116 +0x35e
github.com/derailed/k9s/internal/views.(*logsView).load(0xc0005e68a0, 0x0, 0x0, 0x26c1200)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/internal/views/logs.go:87 +0x63
github.com/derailed/k9s/internal/views.(*logsView).reload(0xc0005e68a0, 0x0, 0x0, 0x269c540, 0xc0000b7b50, 0xc00000de00)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/internal/views/logs.go:55 +0x130
github.com/derailed/k9s/internal/views.(*podView).showLogs(0xc0000b7b50, 0xc000846540, 0x26, 0x0, 0x0, 0x269c540, 0xc0000b7b50, 0xc000198b00)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/internal/views/pod.go:157 +0xa2
github.com/derailed/k9s/internal/views.(*podView).viewLogs(0xc0000b7b50, 0x3334c00, 0xc000198be0)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/internal/views/pod.go:150 +0x121
github.com/derailed/k9s/internal/views.(*podView).logsCmd(...)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/internal/views/pod.go:131
github.com/derailed/k9s/internal/ui.(*Table).keyboard(0xc000460000, 0xc0001dc100, 0xc00054b920)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/internal/ui/table.go:187 +0x214
github.com/derailed/tview.(*Box).WrapInputHandler.func1(0xc0001dc100, 0xc0006a82c0)
/Users/fernand/go_wk/derailed/pkg/mod/github.com/derailed/[email protected]/box.go:161 +0x75
github.com/derailed/tview.(*Application).Run(0xc0005e1e00, 0x0, 0x0)
/Users/fernand/go_wk/derailed/pkg/mod/github.com/derailed/[email protected]/application.go:234 +0x415
github.com/derailed/k9s/internal/views.(*appView).Run(0xc0005303c0)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/internal/views/app.go:309 +0x122
github.com/derailed/k9s/cmd.run(0x3336040, 0xc0000c8160, 0x0, 0x2)
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/cmd/root.go:77 +0x131
github.com/spf13/cobra.(*Command).execute(0x3336040, 0xc0000bc040, 0x2, 0x2, 0x3336040, 0xc0000bc040)
/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/[email protected]/command.go:830 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0x3336040, 0x0, 0x0, 0x0)
/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
/Users/fernand/go_wk/derailed/pkg/mod/github.com/spf13/[email protected]/command.go:864
github.com/derailed/k9s/cmd.Execute()
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/cmd/root.go:54 +0x2d
main.main()
/Users/fernand/go_wk/derailed/src/github.com/derailed/k9s/main.go:26 +0x1a6