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

Immediate bash segfault ExitCode 139 with centos:6.10 containers #7284

Closed
jamshid opened this issue Jun 16, 2020 · 8 comments
Closed

Immediate bash segfault ExitCode 139 with centos:6.10 containers #7284

jamshid opened this issue Jun 16, 2020 · 8 comments

Comments

@jamshid
Copy link

jamshid commented Jun 16, 2020

  • [X ] I have tried with the latest version of my channel (Stable or Edge)
  • [X ] I have uploaded Diagnostics
  • Diagnostics ID: EC594FCC-A7C4-4FCC-BC78-DFF0D5B9496A/20200616233231

Expected behavior

Should be able to start a centos:6.10 bash shell. I can on Docker for Mac and Linux and I can start later centos 7 and 8 bash shells on Windows.

Actual behavior

A recent Docker for Desktop Windows release or maybe WSL2 has problems with centos:6 images. I can't even start a bash shell, the container exits immediately. I think this is why my real image based on centos:6.10 is failing startup.

Information

  • Windows Version: Win 10 Pro version 2004 OS Build 19041.329
  • Docker Desktop Version:
  • Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM:

Steps to reproduce the behavior

winpty docker run -ti --entrypoint bash centos:6.10 immediately exits and docker ps -a shows:

9b279eaec5ee        centos:6.6                            "bash"                   9 seconds ago        Exited (139) 7 seconds ago                                                     flamboyant_kirch

The exact same command with centos:7.7.1908 or centos:8 works fine. I think there's some incompatibility between centos:6 images and WSL2. This is an inspect of the container:

inspect.txt

It seems bash causes a segfault?! dash works.

Owner@DESKTOP-NK99VIE MINGW64 ~
$ winpty docker run -ti  centos:6.10 dash
# ls
bin  etc   lib    lost+found  mnt  proc  sbin     srv  tmp  var
dev  home  lib64  media       opt  root  selinux  sys  usr
# bash
Segmentation fault

Btw I see the message "You don't have any WSL 2 distro" under "Resources
WSL Integration" and I have "Enable WSL integration" checked. Did I miss a step? I just installed https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel but no difference.

I would think this is a problem with my environment but a colleague noticed it first.

Hopefully there is a workaround this breaks existing applications.

@jamshid jamshid changed the title centos:6.10 container exits immediately with ExitCode 139 Immediate bash segfault ExitCode 139 with centos:6.10 containers Jun 16, 2020
@jamshid
Copy link
Author

jamshid commented Jun 17, 2020

Sorry I don't really understand WSL but this is correct?

$ wsl -l -v
  NAME                   STATE           VERSION
* docker-desktop-data    Running         2
  docker-desktop         Running         2

@TristanPerry
Copy link

TristanPerry commented Jun 17, 2020

I'm seeing the same issue with Docker Desktop 2.3.0.3 (45519), Windows 10 Pro version 2004 (OS build 19041.329) and having switched to use Docker's support for WSL2 today (i.e. "Use the WSL 2 based engine" is ticked).

  NAME                   STATE           VERSION
* docker-desktop         Running         2
  Ubuntu-18.04           Stopped         2
  docker-desktop-data    Running         2

However this issue isn't just limited to centos6.n; I get the same with Debian-wheezy. So my hunch is Windows' WSL2 kernel is too new for these older Linux distros.

I also get exit code 139 and no container logs.

perry@WINDSSQ2X2 MINGW64 ~
$ docker container run -it centos:centos6.9 bash

perry@WINDSSQ2X2 MINGW64 ~
$ echo $?
139

perry@WINDSSQ2X2 MINGW64 ~
$ docker container run -it debian:wheezy-slim bash
Unable to find image 'debian:wheezy-slim' locally
wheezy-slim: Pulling from library/debian
a0c8dde657f9: Pull complete
Digest: sha256:63b98daae9483c365e9ef0446dfbe3c884032a79d3766555ff1e2d28257107bd
Status: Downloaded newer image for debian:wheezy-slim

perry@WINDSSQ2X2 MINGW64 ~
$ echo $?
139

perry@WINDSSQ2X2 MINGW64 ~
$ docker logs -f 14acc127be9c

perry@WINDSSQ2X2 MINGW64 ~
$ docker logs -f 4c9dc882f341

Whilst dash does also work for me wrt getting into a container, any Dockerfile I have based on centos6.n or Debian Wheezy fails whenever I try to RUN a command.


Btw I see the message "You don't have any WSL 2 distro" under "Resources WSL Integration" and I have "Enable WSL integration" checked. Did I miss a step?

I don't think you've done anything wrong here. This just means that you don't have any other WSL2 based containers running/installed.

If you do (for example I have Ubuntu 18.04 installed on WSL2) then you'll also have the ability to use Ubuntu for your Docker WSL2 engine.

But if not, it'll just use docker-desktop/docker-desktop-data instead. :)

@billybooth
Copy link

I'm getting the same thing (segfault, 139) from an Oracle Linux 6.10 container with Docker Desktop 2.3.0.3 (45519), Windows 10 Pro Version 2004 (OS Build 19041.329), and using the WSL 2 engine.

Symptoms are identical to those of @TristanPerry above, i.e., no logs, no output, almost immediate segfault. Same occurs whether I run interactive or detached, as well as whether I override the entrypoint or try to start a bash session via the command.

@billybooth
Copy link

billybooth commented Jun 20, 2020

Apparently this is a known WSL 2 (and really more like a vsyscall kernel incompatibility) issue with a workaround:

microsoft/WSL#4694 (comment)

(I'm shut down for the weekend and haven't tried the workaround, but it seems safe to assume this is a WSL issue and not a Docker issue.)

@TristanPerry
Copy link

Thanks @billybooth, that workaround has resolved my issues :)

@samworley
Copy link

Workaround fixed it for me as well, thanks @billybooth !

@stephen-turner
Copy link
Contributor

Thanks for the solution, @billybooth. I'm going to close this ticket now as it turned out to be a WSL issue.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Dec 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants