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

Docker container exits with code 139 #570

Closed
vkannemacher opened this issue Jun 12, 2019 · 12 comments
Closed

Docker container exits with code 139 #570

vkannemacher opened this issue Jun 12, 2019 · 12 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@vkannemacher
Copy link

Hello,
I am facing an issue when i want to run a mysql container: I tried with the example command i found on the Docker hub:

docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:5.6.24

docker ps -a

Shows that the container exited with code 139
mysql:5.6.24 "/entrypoint.sh mysq…" 13 seconds ago Exited (139) 12 seconds ago some-mysql

And i can't have a single line of logs: the return of the docker logs command is empty...

@wglambert
Copy link

What do the docker logs show for the container?

I'm not able to reproduce the issue

$ docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:5.6.24
d671a4fce32d58e1f6e74ed96bf6ea46404c3822213820f26a3189174c95265b

$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
d671a4fce32d        mysql:5.6.24        "/entrypoint.sh mysq…"   38 seconds ago      Up 33 seconds       3306/tcp            some-mysql

Maybe your local copy is corrupted, you could try docker image rm mysql:5.6.24 and re-pulling it

@wglambert wglambert added the question Usability question, not directly related to an error with the image label Jun 12, 2019
@vkannemacher
Copy link
Author

Hi,
That is the problem: docker logs shows absolutely nothing...

docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:5.6.24
Unable to find image 'mysql:5.6.24' locally
5.6.24: Pulling from library/mysql
6e69f355f70e: Pull complete 
a3ed95caeb02: Pull complete 
2207cf04cde9: Pull complete 
0a2e8166cde7: Pull complete 
fce818e7de4b: Pull complete 
f4db7f77aeec: Pull complete 
bf8516093f28: Pull complete 
d34cadab8b95: Pull complete 
b7ed17133bd7: Pull complete 
Digest: sha256:6587cd1219e83d7f491be8be0e57201d3bfe864d525b31ecff53c338f690199f
Status: Downloaded newer image for mysql:5.6.24
2569c1a8cbd284557493e84ab5f5d19bace70a4094a72c87b63f56a68e82a0b9
docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                       PORTS               NAMES
2569c1a8cbd2        mysql:5.6.24        "/entrypoint.sh mysq…"   5 seconds ago       Exited (139) 4 seconds ago                       some-mysql
~ docker logs 2569c1a8cbd2 
~ 

@wglambert
Copy link

Are you running on x86/amd64 architecture? That's the only one this image supports

@kwisatz
Copy link

kwisatz commented Jul 8, 2019

I had the exact same behavior (error 139, no log output) for a mysql:5.5 image.
The only notable thing I did in between a working and a crashing container was to upgrade from Debian 9 to Debian 10. The mysql image was the only (so far) that stopped working.
rmiing the image, destroying the mysql container and then and pulling the image again solved my issue.

@vkannemacher
Copy link
Author

Hi,
Destroying and pulling the image did nothing for me... I'm still stuck with the issue

@wglambert
Copy link

Are you using Docker for Windows/Mac or Linux Containers on Windows?

An Exited (139) is a segmentation fault so if it's not a corrupted download then there's some other environmental affect that's causing it, maybe even Apparmor or SELinux

@vkannemacher
Copy link
Author

I am currently using Docker for Debian

@wglambert
Copy link

Yeah there isn't much more I can think of other than something odd in your environment affecting this.
And without a way to reproduce the issue I'd say you could try asking over at the Docker Community Forums, Docker Community Slack, or Stack Overflow

@enthusiasmus
Copy link

I also have this problem: exited with code 139 without any further logs. I try to upgrade to mysql 5.7.X, maybe this will resolve the error.

@tianon
Copy link
Member

tianon commented Sep 6, 2019

As mentioned above, this is likely environmental. One change between Debian 9 and 10 is the addition of AppArmor, so perhaps there's a new AppArmor policy causing trouble?

Closing since we cannot reproduce -- for further help/discussion, I'd suggest the Docker Community Forums, the Docker Community Slack, or Stack Overflow.

@HouaniFarah
Copy link

For me it was solved by updating the docker on my machine

@SylwesterZarebski
Copy link

SylwesterZarebski commented Jun 16, 2020

It is very likely, that old glibc references are conflicting with new Debian 10 kernel, see workaround here:
docker/for-linux#58 (comment)

And kernel change is here:
https://anonscm.debian.org/cgit/kernel/linux.git/commit/?id=2aced7818ac46ca050ee68255ca20eeb14432a95

yveszoundi added a commit to rimerosolutions/entrusted that referenced this issue Jul 7, 2022
- Switch from Alpine to Debian for container images to deal with bad exit code 139 (upon successful conversions)
- The resulting container image is bigger than Alpine, but at least it works and doesn't require software hacks
- See also docker-library/mysql#570, https://stackoverflow.com/questions/65234217/centos8-podman-exiting-all-containers-139, https://groups.google.com/a/lbl.gov/g/singularity/c/PWv0HeuZKN8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

7 participants