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

v0.31.3 (Linux_amd64) gives runtime error on startup #2463

Closed
chrisv opened this issue Jan 10, 2024 · 5 comments
Closed

v0.31.3 (Linux_amd64) gives runtime error on startup #2463

chrisv opened this issue Jan 10, 2024 · 5 comments
Labels
AsDesigned Works as designed

Comments

@chrisv
Copy link
Sponsor

chrisv commented Jan 10, 2024

Downloaded the latest version 0.31.3 (Linux_x64 build) and immediately get a runtime error:

[cv@amaya t]$ wget https://github.com/derailed/k9s/releases/download/v0.31.3/k9s_Linux_amd64.tar.gz
--2024-01-10 23:09:41--  https://github.com/derailed/k9s/releases/download/v0.31.3/k9s_Linux_amd64.tar.gz
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/167596393/23d49b98-e586-4bb0-b1ea-31b6d6f95591?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240110T220942Z&X-Amz-Expires=300&X-Amz-Signature=f35f5a5149d4a0f4ab263e21a9d38c5ab51fcdb4f77d03a0db0a037d2caaf664&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=167596393&response-content-disposition=attachment%3B%20filename%3Dk9s_Linux_amd64.tar.gz&response-content-type=application%2Foctet-stream [following]
--2024-01-10 23:09:42--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/167596393/23d49b98-e586-4bb0-b1ea-31b6d6f95591?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240110T220942Z&X-Amz-Expires=300&X-Amz-Signature=f35f5a5149d4a0f4ab263e21a9d38c5ab51fcdb4f77d03a0db0a037d2caaf664&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=167596393&response-content-disposition=attachment%3B%20filename%3Dk9s_Linux_amd64.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 30514300 (29M) [application/octet-stream]
Saving to: ‘k9s_Linux_amd64.tar.gz’

k9s_Linux_amd64.tar.gz                                100%[======================================================================================================================>]  29.10M  5.07MB/s    in 6.2s

2024-01-10 23:09:49 (4.70 MB/s) - ‘k9s_Linux_amd64.tar.gz’ saved [30514300/30514300]

[cv@amaya t]$ which k9s
/usr/local/bin/k9s
[cv@amaya t]$ tar zxvf k9s_Linux_amd64.tar.gz
LICENSE
README.md
k9s
[cv@amaya t]$ sudo mv k9s /usr/local/bin/k9s
[sudo] password for cv:
[cv@amaya t]$ k9s
 **____  __.________
|    |/ _/   __   \______
|      < \____    /  ___/
|    |  \   /    /\___ \
|____|__ \ /____//____  >
        \/            \/

Boom!! runtime error: invalid memory address or nil pointer dereference.**
[cv@amaya t]$ uname -a
Linux amaya 6.6.9-100.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jan  1 20:31:07 UTC 2024 x86_64 GNU/Linux
[cv@amaya t]$ cat /etc/redhat-release
Fedora release 38 (Thirty Eight)
[cv@amaya t]$ file /usr/local/bin/k9s
/usr/local/bin/k9s: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=RKQZy6To2e_aj70aUzGe/OWOQn2fBY0HeQT1WihVm/GnCWtpIYbg98SSr4nHT2/Ak59zMr4rmDdE2IOCozE, stripped
[cv@amaya t]$

This is my config:

[cv@amaya t]$ neofetch
             .',;::::;,'.                cv@amaya
         .';:cccccccccccc:;,.            --------
      .;cccccccccccccccccccccc;.         OS: Fedora Linux 38 (Workstation Edition) x86_64
    .:cccccccccccccccccccccccccc:.       Host: 20MAS2DF00 ThinkPad P52
  .;ccccccccccccc;.:dddl:.;ccccccc;.     Kernel: 6.6.9-100.fc38.x86_64
 .:ccccccccccccc;OWMKOOXMWd;ccccccc:.    Uptime: 2 hours, 13 mins
.:ccccccccccccc;KMMc;cc;xMMc:ccccccc:.   Packages: 2495 (rpm), 33 (flatpak)
,cccccccccccccc;MMM.;cc;;WW::cccccccc,   Shell: bash 5.2.21
:cccccccccccccc;MMM.;cccccccccccccccc:   Resolution: 1920x1080, 2560x1440, 2560x1440
:ccccccc;oxOOOo;MMM0OOk.;cccccccccccc:   DE: GNOME 44.7
cccccc:0MMKxdd:;MMMkddc.;cccccccccccc;   WM: Mutter
ccccc:XM0';cccc;MMM.;cccccccccccccccc'   WM Theme: Adwaita
ccccc;MMo;ccccc;MMW.;ccccccccccccccc;    Theme: Adwaita [GTK2/3]
ccccc;0MNc.ccc.xMMd:ccccccccccccccc;     Icons: Adwaita [GTK2/3]
cccccc;dNMWXXXWM0::cccccccccccccc:,      Terminal: tmux
cccccccc;.:odl:.;cccccccccccccc:,.       CPU: Intel Xeon E-2176M (12) @ 4.400GHz
:cccccccccccccccccccccccccccc:'.         GPU: Intel Coffee Lake-S GT2 [UHD Graphics P630]
.:cccccccccccccccccccccc:;,..            GPU: NVIDIA Quadro P2000 Mobile
  '::cccccccccccccc::;,.                 Memory: 13934MiB / 128550MiB





[cv@amaya t]$ go version
go version go1.20.10 linux/amd64
[cv@amaya t]$ sudo dnf list --installed glibc
[sudo] password for cv:
Installed Packages
glibc.x86_64                                                                                          2.37-16.fc38                                                                                           @updates
[cv@amaya t]$

Can you please verify the build? Never had this issue before with any of the previous builds...

@chrisv
Copy link
Sponsor Author

chrisv commented Jan 10, 2024

More info below. I come from v0.30.x so I found in the release notes I needed to change fullScreenLogs to fullScreen. Which I did but now I get an unable to activate context error (see logs below). I can't figure out what's wrong with my config (based on the changes/releasenotes I find in all v0.31.x)... Am I missing something?

[cv@amaya t]$ k9s --logLevel debug --logFile k9s_0.31.3.log
 ____  __.________
|    |/ _/   __   \______
|      < \____    /  ___/
|    |  \   /    /\___ \
|____|__ \ /____//____  >
        \/            \/

Boom!! runtime error: invalid memory address or nil pointer dereference.
[cv@amaya t]$ cat k9s_0.31.3.log
11:37PM INF 🐶 K9s starting up...
11:37PM ERR Fail to load global/context configuration error="k9s config file \"/home/cv/.config/k9s/config.yaml\" load failed:\nAdditional property fullScreenLogs is not allowed"
11:37PM ERR Boom! runtime error: invalid memory address or nil pointer dereference
11:37PM ERR goroutine 1 [running]:
runtime/debug.Stack()
        runtime/debug/stack.go:24 +0x5e
github.com/derailed/k9s/cmd.run.func2()
        github.com/derailed/k9s/cmd/root.go:84 +0xa5
panic({0x2ff49a0?, 0x5e55640?})
        runtime/panic.go:914 +0x21f
github.com/derailed/k9s/internal/view.NewApp(0x0)
        github.com/derailed/k9s/internal/view/app.go:64 +0x3e
github.com/derailed/k9s/cmd.run(0xc00050d200?, {0x351dcab?, 0x4?, 0x351dbcb?})
        github.com/derailed/k9s/cmd/root.go:98 +0x385
github.com/spf13/cobra.(*Command).execute(0x5e867c0, {0xc0000500b0, 0x4, 0x4})
        github.com/spf13/cobra@v1.8.0/command.go:983 +0xabc
github.com/spf13/cobra.(*Command).ExecuteC(0x5e867c0)
        github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.8.0/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 +0x1b

[cv@amaya t]$ cat ~/.config/k9s/config.yaml
k9s:
  liveViewAutoRefresh: false
  screenDumpDir: /home/cv/.local/state/k9s/screen-dumps
  refreshRate: 2
  maxConnRetry: 5
  readOnly: false
  noExitOnCtrlC: false
  ui:
    enableMouse: false
    headless: false
    logoless: false
    crumbsless: false
    noIcons: false
  skipLatestRevCheck: false
  disablePodCounting: false
  shellPod:
    image: busybox:1.35.0
    namespace: default
    limits:
      cpu: 100m
      memory: 100Mi
  imageScans:
    enable: false
    exclusions:
      namespaces: []
      labels: {}
  logger:
    tail: 100
    buffer: 5000
    sinceSeconds: -1
    fullScreenLogs: false
    textWrap: false
    showTime: false
  thresholds:
    cpu:
      critical: 90
      warn: 70
    memory:
      critical: 90
      warn: 70
[cv@amaya t]$ cp ~/.config/k9s/config.yaml ~/.config/k9s/config.yaml-old
[cv@amaya t]$ v ~/.config/k9s/config.yaml
[cv@amaya t]$ diff ~/.config/k9s/config.yaml ~/.config/k9s/config.yaml-old
31c31
<     fullScreen: false
---
>     fullScreenLogs: false
[cv@amaya t]$ k9s
 ____  __.________
|    |/ _/   __   \______
|      < \____    /  ___/
|    |  \   /    /\___ \
|____|__ \ /____//____  >
        \/            \/

Boom!! runtime error: invalid memory address or nil pointer dereference.
[cv@amaya t]$ k9s --logLevel debug --logFile k9s_0.31.3-fullScreen.log
 ____  __.________
|    |/ _/   __   \______
|      < \____    /  ___/
|    |  \   /    /\___ \
|____|__ \ /____//____  >
        \/            \/

Boom!! runtime error: invalid memory address or nil pointer dereference.
[cv@amaya t]$ cat k9s_0.31.3-fullScreen.log
11:45PM INF 🐶 K9s starting up...
11:45PM ERR config refine failed error="unable to activate context \"\": getcontext - invalid context specified: \"\""
11:45PM ERR Fail to load global/context configuration error="unable to activate context \"\": getcontext - invalid context specified: \"\""
11:45PM ERR Boom! runtime error: invalid memory address or nil pointer dereference
11:45PM ERR goroutine 1 [running]:
runtime/debug.Stack()
        runtime/debug/stack.go:24 +0x5e
github.com/derailed/k9s/cmd.run.func2()
        github.com/derailed/k9s/cmd/root.go:84 +0xa5
panic({0x2ff49a0?, 0x5e55640?})
        runtime/panic.go:914 +0x21f
github.com/derailed/k9s/internal/view.NewApp(0x0)
        github.com/derailed/k9s/internal/view/app.go:64 +0x3e
github.com/derailed/k9s/cmd.run(0xc0010aa100?, {0x351dcab?, 0x4?, 0x351dbcb?})
        github.com/derailed/k9s/cmd/root.go:98 +0x385
github.com/spf13/cobra.(*Command).execute(0x5e867c0, {0xc0000500b0, 0x4, 0x4})
        github.com/spf13/cobra@v1.8.0/command.go:983 +0xabc
github.com/spf13/cobra.(*Command).ExecuteC(0x5e867c0)
        github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.8.0/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 +0x1b

@derailed derailed added the AsDesigned Works as designed label Jan 10, 2024
@derailed
Copy link
Owner

derailed commented Jan 10, 2024

@chrisv Sorry. Thank you for the great detail Chris! Indeed please take a peek at the Breaking Bad! section in https://github.com/derailed/k9s/releases/tag/v0.31.0 and/or https://youtu.be/X3444KfjguE
I've make a big mistake making k9s bomb if the configs are not up to par.
Will relax this a bit in the next drop...

@chrisv
Copy link
Sponsor Author

chrisv commented Jan 10, 2024

Thanks. Just updated my previous comment with extra log info because I'm a bit stuck even after updating the config... I'll take a look at the video when I've got some more time.

Meanwhile I'll go back and stick with v0.30.8 which works fine on my config/system...

@derailed derailed reopened this Jan 10, 2024
@derailed
Copy link
Owner

@chrisv Tx Chris! Looking like you don't have a current context specified in your kubeconfig?
Does v0.30.8 kick in contexts view upon launch?
If so please take v0.31.4 (coming soon...) for a spin.

@chrisv
Copy link
Sponsor Author

chrisv commented Feb 4, 2024

@derailed Installed and tested with 0.31.7, and can confirm it's fixed.
Also: indeed there wasn't a current context (I create/delete clusters very frequently for dev/qa), but that wasn't a problem with 0.30.8, as it indeed did opened in contexts view upon launch.

Many thanks for all the great work and for the fast response & fix. Very much appreciated.

thejoeejoee pushed a commit to thejoeejoee/k9s that referenced this issue Feb 23, 2024
* [Bug] Fix scale dialog ui

* [bug] Fix derailed#2463

* v0.31.4 release notes
placintaalexandru pushed a commit to placintaalexandru/k9s that referenced this issue Apr 3, 2024
* [Bug] Fix scale dialog ui

* [bug] Fix derailed#2463

* v0.31.4 release notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AsDesigned Works as designed
Projects
None yet
Development

No branches or pull requests

2 participants