docker is exited immediately when runs with error code 139
Asked Answered
I

5

25

I have a web api project with running fine when i ran through visual studio, able to build the image also. but when i run using the command

docker run -d -t -p 8000:83 8fbf296e2173

shows no error and the container will be listed in docker ps -a with the status

Exited (139) 1 second ago

Please help to solve this

Incommunicative answered 4/4, 2019 at 5:38 Comment(0)
R
20

Started using WSL 2 and encountered the same issue. The workaround posted here has resolved things for me: https://github.com/microsoft/WSL/issues/4694#issuecomment-

Add the following to .wslconfig in %userprofile%\.wslconfig

[wsl2]
kernelCommandLine = vsyscall=emulate
Runyan answered 2/9, 2020 at 14:51 Comment(1)
thanks @sam-worley, your anwser gave me the right way. Summary: create a file named .wslconfig in the user directory C://users/[your user name]/.wslconfig with content "[wsl2] kernelCommandLine = vsyscall=emulate" and restart pc: dev.to/damith/…Loidaloin
S
13

It's impossible to say what the root cause is without knowing more about the image that is running. But, the Exited (139) basically means the PID 1 of the container was sent SIGKILL. It could be anything, segfault, out of memory, stack overflow, etc.

Spank answered 4/4, 2019 at 5:51 Comment(2)
thanks wmorrell, is any way to log this somewhere the errorIncommunicative
Run docker inspect [container ID] using the container ID found in the docker ps output. That will dump a big JSON object containing info about that container, potentially including more information on what caused the termination. Also, docker logs [container ID].Spank
L
12

For anyone's future reference; Docker exit code 139 (128 + 11) means that a container received a SIGSEGV. This may be a result of invalid memory reference.

Ref: https://mcmap.net/q/538765/-what-is-the-authoritative-list-of-docker-run-exit-codes

Lunatic answered 29/10, 2021 at 3:49 Comment(0)
W
0

I faced the same issue while trying to connect to port 1433 from my host to docker (error code 139). I was able to resolve it by using Administrator: Windows Powershell.

Wilmerwilmette answered 20/5, 2020 at 14:53 Comment(0)
W
0

I had this issue when my container could not start my C# app, it was missing a configuration file. I ran docker logs [container name] and it outputted the C# compile error.

Wortman answered 10/4, 2024 at 11:16 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.