k9s icon indicating copy to clipboard operation
k9s copied to clipboard

[0.50.4] segmentation fault on linux

Open steffakasid opened this issue 8 months ago • 8 comments




Describe the bug When upgrading to 0.50.4 via brew on my linux amazon workspace, running k9s fails with a segmentation fault.

To Reproduce Steps to reproduce the behavior:

  1. try to run k9s in terminal
  2. the process directly dies with [1] 1432049 segmentation fault k9s
  3. Checking dmesg gives [289019.402520] 1431667 (k9s): Uhuuh, elf segment at 0000000001f0a000 requested but the memory is mapped already

Expected behavior K9s should start normally without seg faulting.

Versions (please complete the following information):

  • OS: Red Hat Enterprise Linux 8.10
  • K9s: 0.50.4
  • K8s Client Version: v1.32.4
  • K8s Kustomize Version: v5.5.0 -K8s Server Version: v1.30.10-eks-bc803b4

Additional context Maybe https://stackoverflow.com/questions/51656713/cannot-load-custom-elf-executable-in-gdb is related?

steffakasid avatar Apr 23 '25 09:04 steffakasid

It looks like this is more a brew issue then an k9s issue as the binary file from releases works fine.

steffakasid avatar Apr 23 '25 10:04 steffakasid

Maybe related to: https://github.com/Homebrew/homebrew-core/issues/163826 there are several other issues open @homebrew-core with bottles having a segmentation fault.

It's not clear to me how the bottles are build...

steffakasid avatar Apr 23 '25 10:04 steffakasid

@steffakasid , Did you check the k9s.log for other information

R-Abinesh avatar Apr 27 '25 16:04 R-Abinesh

Hi @R-Abinesh,

it looks like k9s is not even starting. It does not log anything.

Regards /Steffen

steffakasid avatar Apr 28 '25 14:04 steffakasid

Hi, the tarballs of 0.50.4 on ubuntu 24.04 suffer this issue also, so possibly it might not be a homebrew issue.

Regards Daniele

ddefrancesco avatar Jun 13 '25 08:06 ddefrancesco

Hi seems to be gone in 0.50.6. Regards

Daniele

ddefrancesco avatar Jun 13 '25 09:06 ddefrancesco

I can not confirm. Just tested with my ubuntu 24.04 (WSL) and I'm seeing this issue with 0.50.6. I'll verify on my work machine next week.

steffakasid avatar Jun 18 '25 14:06 steffakasid

One addition here:

  • It works on my server with ubuntu 24.04
  • It works under OSX
  • It doesn't work with ubuntu 24.04 on WSL (no idea what the difference is to my server)

steffakasid avatar Jun 18 '25 19:06 steffakasid

Today I found the following on my work machine:

ldd /home/linuxbrew/.linuxbrew/bin/k9s
/home/linuxbrew/.linuxbrew/bin/k9s: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /home/linuxbrew/.linuxbrew/bin/k9s)
/home/linuxbrew/.linuxbrew/bin/k9s: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /home/linuxbrew/.linuxbrew/bin/k9s)
	linux-vdso.so.1 (0x00007ffd666d4000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fd7e0d50000)
	/home/linuxbrew/.linuxbrew/lib/ld.so => /lib64/ld-linux-x86-64.so.2 (0x00007fd7e1127000)

The bad thing is I'm on RHEL 8 so I'll not getting a newer glibc version...

Need to check this on my server...

steffakasid avatar Jul 01 '25 14:07 steffakasid

ok strange on my ubuntu server k9s is not dynamically linked. It's a static binary...

steffakasid avatar Jul 01 '25 14:07 steffakasid

Ok I got it: It looks like I try to install just brew install k9s anyway the installation instruction states to use brew install derailed/k9s/k9s not sure why there is a homebrew core formular for k9s which isn't working.

steffakasid avatar Jul 01 '25 15:07 steffakasid

btw. the core formula builds from source where as the derailed/k9s/k9s formula just uses the released binary (from goreleaser)

steffakasid avatar Jul 01 '25 15:07 steffakasid