UpCloudLtd / upcloud-cli

UpCloud command line client (upctl)
https://upcloudltd.github.io/upcloud-cli/
MIT License
29 stars 7 forks source link

Pre-built packages seg fault on start on linux kernel version >= 6 #189

Closed Davincible closed 1 year ago

Davincible commented 1 year ago

When I just tried to use the cli again I got a core dump, I'm not sure if its specific to my system, but if I use go install to install v1.5.1 it does work

strace upctl
execve("/usr/local/bin/upctl", ["upctl"], 0x7ffca96f3d70 /* 74 vars */) = 0
arch_prctl(ARCH_SET_FS, 0xdf0bd0)       = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x1} ---
+++ killed by SIGSEGV (core dumped) +++
[1]    1054086 segmentation fault (core dumped)  strace upctl

Used AUR to install on 6.0.2-2-MANJARO

kangasta commented 1 year ago

Hi, thanks for reporting this!

Did you try to run go install with latest version?

Is the 6.0.2 in 6.0.2-2-MANJARO the Linux kernel version? Seems that GitHub actions runner that we use for builds and tests uses kernel version 5.15.0-.... So that would be one difference between the environments.

Davincible commented 1 year ago

Did you try to run go install with latest version?

That's impossible because it's on v2, you need to append /v2 to the go.mod for it to work with the go install cmd.

Is the 6.0.2 in 6.0.2-2-MANJARO the Linux kernel version?

yes

So that would be one difference between the environments.

If I clone and build myself, it does work. Perhaps you can change the AUR version to build locally instead of installing a pre-build version. Since compiling is super fast that shouldn't be an issue

kangasta commented 1 year ago

The just released v2.3.0 now has v2 included in the go module name, so go install will now also work with upctl versions >= 2.3.0. That would likely be the easiest installation method until we look into how to make pre-built packages work also on >= 6 kernels.

thevilledev commented 1 year ago

Debian 12 ("Bookworm") runs on kernel version 6.1.0-9-amd64. Installed upctl version 2.7.1 from pre-built deb packages and confirmed it works as expected.

@Davincible Could you retry and confirm whether you're still experiencing this issue?

thevilledev commented 1 year ago

Works on another OS with series 6 Linux kernel as well. Closing this off but reach out if the problem still persists.