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

Containers fail to start due to segfault from vsyscall attempt #1827

Open
apt-itude opened this issue Mar 16, 2022 · 2 comments
Open

Containers fail to start due to segfault from vsyscall attempt #1827

apt-itude opened this issue Mar 16, 2022 · 2 comments
Labels
kind/bug Something isn't working

Comments

@apt-itude
Copy link

Actual Behavior

Trying to simply run bash in an old CentOS 6 container image results in a segfault.

Steps to Reproduce

docker run --rm <any-centos-6-image> bash --version

Result

No output, exit code 139 (segfault)

Expected Behavior

I would have expected commands like bash to work

Additional Information

The dmesg output shows:

[   53.148631] bash[3416] vsyscall attempted with vsyscall=none ip:ffffffffff600400 cs:33 sp:7ffd2eb58d98 ax:ffffffffff600400 si:7ffd2eb59f3b di:0
[   53.148633] bash[3416]: segfault at ffffffffff600400 ip ffffffffff600400 sp 00007ffd2eb58d98 error 15

This bug filed against Alpine explains that this is because the:

binaries are built with ancient glibc that uses vsyscalls

and the fix is to:

add vsyscall=emulate boot option

I know CentOS 6 is an ancient OS, so I wouldn't expect first-class support. However, I would love to be able to at least configure boot options like that at the VM level. In absence of some official configuration mechanism, if there is a workaround I could use to hack this configuration into Lima, that would be greatly appreciated.

Rancher Desktop Version

1.1.1

Rancher Desktop K8s Version

N/A

Which container runtime are you using?

moby (docker cli)

What operating system are you using?

macOS

Operating System / Build Version

macOS Big Sur 11.6.1

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

No response

Windows User Only

No response

@apt-itude apt-itude added the kind/bug Something isn't working label Mar 16, 2022
@funkallero
Copy link

funkallero commented Mar 25, 2022

Hello, I have this exactly the same issue, while having a bit desperate need to run such legacy container image. So, I was about to open the same issue, then just found this post just before doing so. Interestingly, on Windows 10 (probably on 11), WSL2 offers a workaround, I verified myself that I can run CentOS 6 based container image with Rancher Desktop on that platform with that tweak.

So on macOS, may it be to offer a way to launch the underlying VM (QEMU/lima-vm: qemu-system-x86_64 in my case as well), with -kernel and -append option? (strings command gave me an idea that, to use-append, you also need -kernel option to be used ...). Unfortunately, what I see with ps command output for this , it just doesn't look like giving us a chance to do some simple tricks to add this kernel option, vsyscall=emulate.

This is an article I found for Docker; besides the main theme on running it on M1 (ARM) based Mac, it happens to disclose that the VM (looks like lima-vm for ARM) is run with -kernel and -append vsyscall=emulate indeed? So, I wish if there's a chance to configure the internal VM for Rancher Desktop in the same way.

I'd also really appreciate if the Rancher Desktop team can think about offering any ways to enable this feature ... !!

@funkallero
Copy link

Found #2215 where a work-around is explained but for development version of rancher-desktop ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants