-
Notifications
You must be signed in to change notification settings - Fork 860
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
Enable vsyscall=emulate in the kernel config to run older base images such as Centos 6 #4694
Comments
/dupe #1462. Better on WSL2 probably. |
Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
Sorry I didn't specify earlier. This is with WSL2 running the latest insider build. I have looked around and I do not see how to pass custom kernel boot options to the kernel that is used by WSL2. Is this possible? Will the default kernel support the boot option of I could? |
Ah, okay. Thanks for the clarification, and good question (looks):
I think (?) that last line means vsyscall is off by default. We don't have a way (I know of) to pass the equivalent of GRUB-time boot options. You could in extremis recompile the kernel, but that is.... extreme. Will de-dupe you since this is WSL 2, and "how do I get legacy vsyscall emulation" is a legit enough question. At worst this can be parlayed into feature request "pass boot options to WSL" or somesuch. |
Thanks for reopening. |
There is a workaround, not sure if suitable for your use case. I also hit that problem some time ago. You can actually partially recompile Centos 6 not to depend on this behavior and it was done in some projects: A quick workaround is that you can change You could also take the patch from the issue I linked. |
OS Name: Microsoft Windows 10 Pro
|
The actual patch to glibc in Centos 6 is in this PR: https://github.com/pypa/manylinux/pull/279/files |
@therealkenc, @squeaky-pl Could you try this? %userprofile%\.wslconfig [wsl2] |
@benhillis it works:
|
Right 18995 release notes:
I probably stared right at that but dedicated no neurons to storing the knowledge thereof. Thanks Ben! I guess for purposes "legacy vsyscall emulation" aka #1462 call this feature-fixedininsider for lack. |
Thanks. The .wslconfig change also allows my containers to work again. Feel free to close this since Centos:6 is probably not new enough to worry too much about. |
Glad to hear this is working for you. As we get closer to release we will be updating the WSL2 usage docs to have the various .wslconfig options. |
I had the same issue even if I configure wsl2
I tried to use the quay.io/pypa/manylinux2010_x86_64 image, it works but associated to dotnetcore self contained and rid rhel.6-x64 I had the same issue (no logs and a container in Exited 139 state). The same binary works with Docker Desktop with the VM. |
@cboudereau be sure to execute this option should also show in
If it does not it was not picked from |
@cboudereau Also you are actually calling docker from |
@squeaky-pl thank you for your answer. I tried in powershell and cmd. I checked it by using the shutdown command and restarting windows but I have the same problem. How can I call docker from wsl2 (it launches default distro). I configured docker to use wsl2 and it works fine with other images (ie: centos7) |
I personally don't use Windows Docker installer, I dont know if Windows Docker on WSL2 respects .wslconfig either (but my common sense tells me that it should), I run Docker inside WSL2 distro fully. Nevertheless what I would start debugging your case by booting a WSL2 Distro like Ubuntu and check that your You should see:
You should see What you could also try is querying
I can see vsyscall=emulate myself even within Docker. If it's not there the issue is that options are not picked up. |
@squeaky-pl thank you very much! I found now why the .wslconfig was not loading thanks to the cat /proc/cmdline command line. In fact I was facing about an Encoding and whitespace isssue. Be sure that the .wslconfig is a UTF8 without BOM and copy/paste exactly what @benhillis supplied. Yesterday I was too tired to see this problem, so sorry the quality of my comment and many thanks @squeaky-pl and @benhillis. |
not working on win10 2004 |
I have WSL2 and docker wsl integration turned off. Running Ubuntu 20.04 and installed docker inside it. |
It would be even more helpful if MS didn't gratuitously break Linux ABI by using non-default kernel config (especially when another option exists), requiring users to add workarounds into their |
This works for me :) |
To make the answer more friendly: |
Thank you a lot for the workaround. I had the same issue with a old linux docker image using Docker Desktop (for Windows). Using cmd, these are the step that worked for me :
|
I add vsyscall=emulate to all my servers command lines by default. I need to know if this makes them slower than they should be. I don't have any centos 6, just from centos 7 and up, containers. Plain LXC containers. |
AFAIK they will be slower, yes. If this is an issue for your workload on Docker Desktop depends on your use case. |
I'm just unable to install any package through apt-get. |
How should I go about replicating this fix on a M1 Pro Mac? I'm running into the exit status 139 after container creation, but am struggling to find a fix. |
They were changes made on vsyscall linking in the Linux Kernel, starting with version 4.11, that caused issues with containers running Centos 6.x
Describe better here:
https://unix.stackexchange.com/questions/478387/running-a-centos-docker-image-on-arch-linux-exits-with-code-139
➜ ~ docker run -it centos:6 bash
Unable to find image 'centos:6' locally
6: Pulling from library/centos
ff50d722b382: Pull complete
Digest: sha256:dec8f471302de43f4cfcf82f56d99a5227b5ea1aa6d02fa56344986e1f4610e7
Status: Downloaded newer image for centos:6
➜ ~ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c4861c529a05 centos:6 "bash" 49 seconds ago Exited (139) 49 seconds ago relaxed_brahmagupta
The text was updated successfully, but these errors were encountered: