Skip to content
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

Crashed while do filtering #2036

Closed
maxsxu opened this issue Mar 29, 2023 · 4 comments · Fixed by #2320
Closed

Crashed while do filtering #2036

maxsxu opened this issue Mar 29, 2023 · 4 comments · Fixed by #2320
Labels
bug Something isn't working InProgress Marks an issue has being worked on

Comments

@maxsxu
Copy link

maxsxu commented Mar 29, 2023




Describe the bug

K9s crashed while do filtering.

To Reproduce
Steps to reproduce the behavior:

  1. Go to resources page
  2. Press /
  3. Input anything
  4. k9s crashed and exited.

Expected behavior

Able to filter resources based on input.

Screenshots

image

Versions (please complete the following information):

  • OS: macOS
  • K9s: v0.27.3
  • K8s: v1.23.14

Additional context

Logs

^[[90m10:42AM^[[0m ^[[1m^[[31mERR^[[0m^[[0m Boom! runtime error: slice bounds out of range [5:4]
^[[90m10:42AM^[[0m ^[[1m^[[31mERR^[[0m^[[0m goroutine 1 [running]:
runtime/debug.Stack()
        runtime/debug/stack.go:24 +0x65
github.com/derailed/k9s/cmd.run.func2()
        github.com/derailed/k9s/cmd/root.go:72 +0xb1
panic({0x2ef1b00, 0xc0017f5140})
        runtime/panic.go:884 +0x212
github.com/derailed/tview.(*Application).Run.func1()
        github.com/derailed/[email protected]/application.go:243 +0x4d
panic({0x2ef1b00, 0xc0017f5140})
        runtime/panic.go:884 +0x212
github.com/derailed/k9s/internal/ui.rxFilter({0xc00192e60c?, 0x2?}, 0x0, 0xc000795860)
        github.com/derailed/k9s/internal/ui/table_helper.go:173 +0x725
github.com/derailed/k9s/internal/ui.(*Table).filtered(0xc00087efc0, 0x34d0a48?)
        github.com/derailed/k9s/internal/ui/table.go:392 +0x10e
github.com/derailed/k9s/internal/ui.(*Table).Filter(0xc00087efc0, {0xc00082d7a0?, 0x0?})
        github.com/derailed/k9s/internal/ui/table.go:147 +0x53
github.com/derailed/k9s/internal/view.(*Table).BufferCompleted.func1()
        github.com/derailed/k9s/internal/view/table.go:154 +0x28
github.com/derailed/tview.(*Application).QueueUpdateDraw.func1()
        github.com/derailed/[email protected]/application.go:731 +0x26
github.com/derailed/tview.(*Application).Run(0xc00087e000)
        github.com/derailed/[email protected]/application.go:376 +0x930
github.com/derailed/k9s/internal/view.(*App).Run(0xc00037d080)
        github.com/derailed/k9s/internal/view/app.go:478 +0x9c
github.com/derailed/k9s/cmd.run(0x4813fc0?, {0x307cdae?, 0x2?, 0x2?})
        github.com/derailed/k9s/cmd/root.go:86 +0x32b
github.com/spf13/cobra.(*Command).execute(0x4813fc0, {0xc0000501c0, 0x2, 0x2})
        github.com/spf13/[email protected]/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0x4813fc0)
        github.com/spf13/[email protected]/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/[email protected]/command.go:968
github.com/derailed/k9s/cmd.Execute()
        github.com/derailed/k9s/cmd/root.go:50 +0x25
main.main()
        github.com/derailed/k9s/main.go:29 +0x17

@slimus
Copy link
Collaborator

slimus commented Apr 5, 2023

@maxsxu hello. Sorry, what is resources page?

@maxsxu
Copy link
Author

maxsxu commented Apr 13, 2023

@maxsxu hello. Sorry, what is resources page?

The place we wiew any resources ike pods/CRDs, etc.

@slimus
Copy link
Collaborator

slimus commented May 9, 2023

@maxsxu Thanks! I've tested it on my linux env and I can't reproduce it. I'll try to find MacOs configuration and try it again. If you have any details - please let me know.

@YvanDaSilva
Copy link

YvanDaSilva commented May 24, 2023

Having the same issue on Linux:

system: `"x86_64-linux"`
host os: `Linux 6.3.3, NixOS, 23.05 (Stoat), 23.05pre487203.7084250df3d`

k9s version:
Version:    0.27.4
Commit:     v0.27.4
Date:       1970-01-01T00:00:00Z

Boom!! runtime error: slice bounds out of range [5:4].

Logs are full of
WRN No Duration detected on age field
No special config, nothing out of the default lets say.

Seems to happen on CRD's, I can reproduce all the time on Workflows resource from argo workflows. I wonder if it's because some resources have no Status.

If I get the opportunity I'll try to debug and see what slice index is out of bond.

Debug stack trace:

10:28PM DBG No DAO registry entry for "argoproj.io/v1alpha1/workflows". Using generics!
10:28PM WRN No Duration detected on age field
...
10:28PM WRN No Duration detected on age field
10:28PM ERR Boom! runtime error: slice bounds out of range [5:4]
10:28PM ERR goroutine 1 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:24 +0x65
github.com/derailed/k9s/cmd.run.func2()
	github.com/derailed/k9s/cmd/root.go:72 +0xb1
panic({0x33cfd60, 0xc00285f590})
	runtime/panic.go:884 +0x213
github.com/derailed/tview.(*Application).Run.func1()
	github.com/derailed/[email protected]/application.go:243 +0x4d
panic({0x33cfd60, 0xc00285f590})
	runtime/panic.go:884 +0x213
github.com/derailed/k9s/internal/ui.rxFilter({0xc0098218cc?, 0x2?}, 0x0, 0xc000da9020)
	github.com/derailed/k9s/internal/ui/table_helper.go:173 +0x75a
github.com/derailed/k9s/internal/ui.(*Table).filtered(0xc000cc62a0, 0x39d3ea0?)
	github.com/derailed/k9s/internal/ui/table.go:392 +0x10e
github.com/derailed/k9s/internal/ui.(*Table).Filter(0xc000cc62a0, {0xc000425de0?, 0x0?})
	github.com/derailed/k9s/internal/ui/table.go:147 +0x53
github.com/derailed/k9s/internal/view.(*Table).BufferCompleted.func1()
	github.com/derailed/k9s/internal/view/table.go:154 +0x28
github.com/derailed/tview.(*Application).QueueUpdateDraw.func1()
	github.com/derailed/[email protected]/application.go:731 +0x26
github.com/derailed/tview.(*Application).Run(0xc0001d20e0)
	github.com/derailed/[email protected]/application.go:376 +0x8e2
github.com/derailed/k9s/internal/view.(*App).Run(0xc00098b4a0)
	github.com/derailed/k9s/internal/view/app.go:476 +0x9c
github.com/derailed/k9s/cmd.run(0x4d63420?, {0x356386b?, 0x2?, 0x2?})
	github.com/derailed/k9s/cmd/root.go:86 +0x2c5
github.com/spf13/cobra.(*Command).execute(0x4d63420, {0xc000052190, 0x2, 0x2})
	github.com/spf13/[email protected]/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0x4d63420)
	github.com/spf13/[email protected]/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:968
github.com/derailed/k9s/cmd.Execute()
	github.com/derailed/k9s/cmd/root.go:50 +0x25
main.main()
	github.com/derailed/k9s/main.go:29 +0x17

@derailed derailed added bug Something isn't working InProgress Marks an issue has being worked on labels Nov 23, 2023
derailed added a commit that referenced this issue Dec 7, 2023
derailed added a commit that referenced this issue Dec 7, 2023
* Feat: Move shell pod cluster config to general config

> BREAKING CHANGE! K9s configuration breaking change! Shellpod specification will
no longer reside with a cluster configuration. It is now part of the
global K9s configuration object.

Shellpod configuration should be part of k9s config. Clusters admins
will most likely use the same image and config to run shells on their
nodes. Each cluster in turn will have the option to either
enable/disable shelling into nodes. This not only DRYs up the k9s config
but also allows user to consolidate their shell pod configuration in one
central place.

* Fix #2290 - Add freebsd assets

* Maintenance cleaning up

* Fix #2166 - Add taint tracking column to node view

* Fix #2009: Update screendump file names to contain resource info

* Maintenance: Cleanup errror messages

* Fix #1513: Change log default to tail vs last 5min

* Fix #2166: Add taint indicator on node view

* Fix #2165: Track init co restarts

* Fix #2308: Fix rbac auth checks

* Fix #2036: Fix npe on filtering CRDs

* Fix #2219: Turn on TTY option on shellpod

* Fix #2167: Update color escape sequence on copy

* Fix #2297: Enable multi select on nodes

* Cleanup headers

* Fix #2162: Allow edit when describing/viewing

* Feat: Add helm release history support

* Fix #2039: Command Arrow up/down + enter support

* Small refactor

* Add img vulenerability scans support

* Change skin loading and support

- Move skin specification to k9s cluster config section
- Load skins for skins dir

* Release v0.29.0 docs
thejoeejoee pushed a commit to thejoeejoee/k9s that referenced this issue Feb 23, 2024
* Feat: Move shell pod cluster config to general config

> BREAKING CHANGE! K9s configuration breaking change! Shellpod specification will
no longer reside with a cluster configuration. It is now part of the
global K9s configuration object.

Shellpod configuration should be part of k9s config. Clusters admins
will most likely use the same image and config to run shells on their
nodes. Each cluster in turn will have the option to either
enable/disable shelling into nodes. This not only DRYs up the k9s config
but also allows user to consolidate their shell pod configuration in one
central place.

* Fix derailed#2290 - Add freebsd assets

* Maintenance cleaning up

* Fix derailed#2166 - Add taint tracking column to node view

* Fix derailed#2009: Update screendump file names to contain resource info

* Maintenance: Cleanup errror messages

* Fix derailed#1513: Change log default to tail vs last 5min

* Fix derailed#2166: Add taint indicator on node view

* Fix derailed#2165: Track init co restarts

* Fix derailed#2308: Fix rbac auth checks

* Fix derailed#2036: Fix npe on filtering CRDs

* Fix derailed#2219: Turn on TTY option on shellpod

* Fix derailed#2167: Update color escape sequence on copy

* Fix derailed#2297: Enable multi select on nodes

* Cleanup headers

* Fix derailed#2162: Allow edit when describing/viewing

* Feat: Add helm release history support

* Fix derailed#2039: Command Arrow up/down + enter support

* Small refactor

* Add img vulenerability scans support

* Change skin loading and support

- Move skin specification to k9s cluster config section
- Load skins for skins dir

* Release v0.29.0 docs
placintaalexandru pushed a commit to placintaalexandru/k9s that referenced this issue Apr 3, 2024
* Feat: Move shell pod cluster config to general config

> BREAKING CHANGE! K9s configuration breaking change! Shellpod specification will
no longer reside with a cluster configuration. It is now part of the
global K9s configuration object.

Shellpod configuration should be part of k9s config. Clusters admins
will most likely use the same image and config to run shells on their
nodes. Each cluster in turn will have the option to either
enable/disable shelling into nodes. This not only DRYs up the k9s config
but also allows user to consolidate their shell pod configuration in one
central place.

* Fix derailed#2290 - Add freebsd assets

* Maintenance cleaning up

* Fix derailed#2166 - Add taint tracking column to node view

* Fix derailed#2009: Update screendump file names to contain resource info

* Maintenance: Cleanup errror messages

* Fix derailed#1513: Change log default to tail vs last 5min

* Fix derailed#2166: Add taint indicator on node view

* Fix derailed#2165: Track init co restarts

* Fix derailed#2308: Fix rbac auth checks

* Fix derailed#2036: Fix npe on filtering CRDs

* Fix derailed#2219: Turn on TTY option on shellpod

* Fix derailed#2167: Update color escape sequence on copy

* Fix derailed#2297: Enable multi select on nodes

* Cleanup headers

* Fix derailed#2162: Allow edit when describing/viewing

* Feat: Add helm release history support

* Fix derailed#2039: Command Arrow up/down + enter support

* Small refactor

* Add img vulenerability scans support

* Change skin loading and support

- Move skin specification to k9s cluster config section
- Load skins for skins dir

* Release v0.29.0 docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working InProgress Marks an issue has being worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants