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

encountered an error during hcsshim::System::waitBackground: failure in in windows container mode. on fast ring and latest 1909 release. #813

Open
bplasmeijer opened this issue Apr 22, 2020 · 46 comments

Comments

@bplasmeijer
Copy link

bplasmeijer commented Apr 22, 2020

Description

encountered an error during hcsshim::System::waitBackground: failure in in windows container mode. on fast ring and latest 1909 release.

see also moby moby/moby#40844

Steps to reproduce the issue:

docker run -it mcr.microsoft.com/powershell:lts-alpine-3.10

image

Describe the results you received:

PS /> exit
time="2020-04-22T09:58:24+02:00" level=error msg="Error waiting for container: failed to shutdown container: container
69fc778d98e49bc2cd3f6e54612ff27bb7663cbe891b2a152d707f9620e4d08a encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container 69fc778d98e49bc2cd3f6e54612ff27bb7663cbe891b2a152d707f9620e4d08a encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)"
PS C:\Users\bartp>

image

Client: Docker Engine - Community
Version: 19.03.8
API version: 1.40
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:23:10 2020
OS/Arch: windows/amd64
Experimental: true

docker version

Server: Docker Engine - Community
Engine:
Version: 19.03.8
API version: 1.40 (minimum version 1.24)
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:37:20 2020
OS/Arch: windows/amd64
Experimental: true

docker info

Client:
Debug Mode: false
Plugins:
app: Docker Application (Docker Inc., v0.8.0)
buildx: Build with BuildKit (Docker Inc., v0.3.1-tp-docker)
mutagen: Synchronize files with Docker Desktop (Docker Inc., testing)

Server:
Containers: 6
Running: 1
Paused: 0
Stopped: 5
Images: 359
Server Version: 19.03.8
Storage Driver: windowsfilter (windows) lcow (linux)
Windows:
LCOW:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 19608 (19608.1000.amd64fre.rs_prerelease.200410-1438)
Operating System: Windows 10 Pro Version 2004 (OS Build 19608.1006)
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 31.88GiB
Name: PCI
ID: KUM5:H6SV:J3EE:5FI3:Q5PL:TA2W:ZRIS:CNBG:52AF:EL3B:F7DB:H6SG
Docker Root Dir: C:\ProgramData\Docker
Debug Mode: true
File Descriptors: -1
Goroutines: 35
System Time: 2020-04-22T10:03:27.9886332+02:00
EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine


PS /> exit
time="2020-04-22T10:13:36+02:00" level=error msg="Error waiting for container: failed to shutdown container: container 55b3e99dc6bfda03d6e0be4ec000f5c6c3ee29e8d973389b0d3f1dbaea6cdaf4 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container 55b3e99dc6bfda03d6e0be4ec000f5c6c3ee29e8d973389b0d3f1dbaea6cdaf4 encountered an error during hcsshim::System::waitBackground: failure
in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)"

docker version
Client: Docker Engine - Community
Version: 19.03.8
API version: 1.40
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:23:10 2020
OS/Arch: windows/amd64
Experimental: true

Server: Docker Engine - Community
Engine:
Version: 19.03.8
API version: 1.40 (minimum version 1.24)
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:37:20 2020
OS/Arch: windows/amd64
Experimental: true

docker info
Client:
Debug Mode: false
Plugins:
app: Docker Application (Docker Inc., v0.8.0)
buildx: Build with BuildKit (Docker Inc., v0.3.1-tp-docker)

Server:
Containers: 7
Running: 1
Paused: 0
Stopped: 6
Images: 377
Server Version: 19.03.8
Storage Driver: windowsfilter (windows) lcow (linux)
Windows:
LCOW:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 18363 (18362.1.amd64fre.19h1_release.190318-1202)
Operating System: Windows 10 Enterprise Version 1909 (OS Build 18363.752)
OSType: windows
Architecture: x86_64
CPUs: 12
Total Memory: 31.81GiB
Name: LT-BAP-T-NL
ID: AVXB:O6GT:DLC7:DZXN:OF46:3QIY:GANI:BMDV:R2TY:LN27:ZH44:YZ6X
Docker Root Dir: C:\ProgramData\Docker
Debug Mode: true
File Descriptors: -1
Goroutines: 49
System Time: 2020-04-22T10:13:53.2893047+02:00
EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

cc: @StefanScherer , @simonferquel

@pbering
Copy link

pbering commented Apr 22, 2020

I can reproduce on same versions. Seems to be a LCOW only issue. Works fine when engine is Linux (with WSL2 backend)

@robearlam
Copy link

I can reproduce as well, running

Windows: 19608.1006
Docker Desktop: 2.3.0.0 (44472)
Docker Engine: 19.03.8

@bplasmeijer
Copy link
Author

I can reproduce on same versions. Seems to be a LCOW only issue. Works fine when engine is Linux (with WSL2 backend)

Correct, no issue if the engine is set to Linux, we need the docker context @simonferquel

@jeanfrancoislarente
Copy link

Same for me on 1909
Docker Desktop : 2.2.0.5
Docker Engine: 19.03.8

@michaelbaranov
Copy link

I see have the same on the stable channel
Docker Desktop 2.2.0.5

@flcdrg
Copy link

flcdrg commented Apr 23, 2020

Windows 10.0.19041.208
Docker Desktop: 2.3.0.0 (44472)
Docker Engine: 19.03.8

@dwthien
Copy link

dwthien commented Apr 27, 2020

I see have the same on the version stable.
Docker version 19.03.8, build afacb8b

@AbsurdusAdeptus
Copy link

Same here across 3 different computers.

@AbsurdusAdeptus
Copy link

They broke it with version 2.2.0.4. Uninstalling Docker Desktop and installing version 2.2.0.3 resolved the issue. Noticed that they added a "Known issue" to the release notes for 2.2.0.4 saying:
"Some CLI commands fail if you are running Docker Desktop in the experimental Linux Containers on Windows (LCOW) mode. As alternatives, we recommend running either traditional Linux containers, or the experimental WSL backend."

Funny way of saying we broke the most fundamental thing of LCOW, please use a virtual machine instead.

@bplasmeijer
Copy link
Author

They broke it with version 2.2.0.4. Uninstalling Docker Desktop and installing version 2.2.0.3 resolved the issue. Noticed that they added a "Known issue" to the release notes for 2.2.0.4 saying:
"Some CLI commands fail if you are running Docker Desktop in the experimental Linux Containers on Windows (LCOW) mode. As alternatives, we recommend running either traditional Linux containers, or the experimental WSL backend."

Funny way of saying we broke the most fundamental thing of LCOW, please use a virtual machine instead.

LCOW is great but lingering at the moment. I did create a roadmap ticket because many people are using LCOW at the moment. docker/roadmap#79

@AbsurdusAdeptus
Copy link

Sad part is that this was working just 2 0.0.0.x versions ago. Completely breaking a feature as important as LCOW (even an experimental one) and putting a small aside in the release notes as "some cli commands fail" is pretty ridiculous.

@Ayush1026
Copy link

The command '/bin/sh -c apk add --update redis' returned a non-zero code: 4294967295: failed to shutdown container: container a0ec71fb66524cdd30fd9e3ff1501afa288ba6c51bea2255976faaad9889f6f0 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container a0ec71fb66524cdd30fd9e3ff1501afa288ba6c51bea2255976faaad9889f6f0 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)

i am having this error anyone can solve this ?

@AC740
Copy link

AC740 commented Aug 30, 2020

I have same error on windows. It happens always when dockerfile uses "RUN" command.

@philcar
Copy link

philcar commented Sep 25, 2020

The same happen with Windows containers, not only with LCOW. It work most of the time but sometime, a docker run fail with this message.

@sdancer75
Copy link

I met the same error with the official "Getting Started" docker tutorial. It happens in windows and linux containers too.

D:\temp\tmp2\app>docker build -t getting-started .
Sending build context to Docker daemon  65.67MB
Step 1/5 : FROM node:12-alpine
12-alpine: Pulling from library/node
cbdbe7a5bc2a: Pull complete                                                                                                                                     57d481011659: Pull complete                                                                                                                                     d6fabc993f17: Pull complete                                                                                                                                     834ca887ea10: Pull complete                                                                                                                                     Digest: sha256:663da4974c48ef1ac5abd10c432c6a154cb675a0e5ca2324d8f92a1edb8429e2
Status: Downloaded newer image for node:12-alpine
 ---> 1f52b7199ba6
Step 2/5 : WORKDIR /app
 ---> Running in 15c97e428b15
Removing intermediate container 15c97e428b15
 ---> 51e9ba18faad
Step 3/5 : COPY . .
 ---> 927acce29fc9
Step 4/5 : RUN yarn install --production
 ---> Running in 3866d3989bb3
yarn install v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 20.20s.
The command '/bin/sh -c yarn install --production' returned a non-zero code: 4294967295: failed to shutdown container: container 3866d3989bb31258f1e259e1face108ab8ac1fcaf64e715bb0f13c00a4b304ab encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container 3866d3989bb31258f1e259e1face108ab8ac1fcaf64e715bb0f13c00a4b304ab encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)

D:\temp\tmp2\app>docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
<none>              <none>              927acce29fc9        2 minutes ago       199MB
node                12-alpine           1f52b7199ba6        11 days ago         109MB

@AC740
Copy link

AC740 commented Sep 28, 2020

I don't think there is any solution for now. I just use a virtualbox now.

@philcar
Copy link

philcar commented Sep 28, 2020

It happen with WCOW and LCOW. For linux, of course there is alternative like WSL2 or Hyper-V. But with Windows, there is no alternative.

@metrotyranno
Copy link

Issue is present on server 2019 insider version 2004 build 20236.1000

Tested Docker 2.4.0.0 and Docker 2.4.1.0

Step 3/6 : RUN yum install -y epel-release
 ---> Running in b06e80476769
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
 * base: centos.mirror.fr.planethoster.net
 * extras: centos.mirror.fr.planethoster.net
 * updates: centos.mirror.fr.planethoster.net
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                Arch             Version         Repository        Size
================================================================================
Installing:
 epel-release           noarch           7-11            extras            15 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 15 k
Installed size: 24 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-11.noarch                                     1/1
  Verifying  : epel-release-7-11.noarch                                     1/1

Installed:
  epel-release.noarch 0:7-11

Complete!
The command '/bin/sh -c yum install -y epel-release' returned a non-zero code: 4294967295: failed to shutdown container: container b06e8047676935a1dc2944e5152a909f75526ae69f708e48e1403d72fbce2cc7 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container b06e8047676935a1dc2944e5152a909f75526ae69f708e48e1403d72fbce2cc7 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)```

@sdancer75
Copy link

I uninstalled and re-installed the latest version of the docker. It seems it is working now under WSL2.

@michaelbaranov
Copy link

michaelbaranov commented Oct 29, 2020

Does not work for me on the latest Docker 2.4.0.0 and 2004 with WSL2

@alandillon
Copy link

alandillon commented Nov 30, 2020

This happens for me when I include more than one volume definition in the compose.

@hamjo
Copy link

hamjo commented Dec 21, 2020

I am still seeing this with

  • Docker Desktop 3.0.0 (50684)
  • Docker Engine 20.10.0
  • Windows 2009

@jeanfrancoislarente
Copy link

jeanfrancoislarente commented Feb 16, 2021

Still an issue on

  • Docker Desktop: 3.1.0(51484)
  • Docker Engine: 20.10.2
  • Windows 20H2 (19042.746)

Simple example:

docker image build --platform linux --tag image:test .

Dockerfile

FROM mcr.microsoft.com/mssql/server:2019-CU8-ubuntu-16.04

USER root

RUN apt-get -y update

Result:

Step 4/4 : RUN apt-get -y update
 ---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (windows/amd64) and no specific platform was requested
 ---> Running in e07ea279a061
Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:3 https://packages.microsoft.com/ubuntu/16.04/prod xenial InRelease [4003 B]
Get:4 https://packages.microsoft.com/ubuntu/16.04/prod xenial/main amd64 Packages [205 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [1928 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [15.9 kB]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [983 kB]
Get:13 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [8820 B]
Get:14 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [2434 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [16.4 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [1540 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [26.2 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [10.9 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [12.6 kB]
Fetched 19.3 MB in 3s (6103 kB/s)
Reading package lists...
The command '/bin/sh -c apt-get -y update' returned a non-zero code: 4294967295: failed to shutdown container: container e07ea279a061592cbbd7ae4ae9f40b10d96e8109770fff87d81db08323cea773 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container e07ea279a061592cbbd7ae4ae9f40b10d96e8109770fff87d81db08323cea773 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)

@FrankZhcz
Copy link

Downloaded from public: http://maven.aliyun.com/nexus/content/groups/public/org/apache/commons/commons-compress/1.20/commons-compress-1.20.jar (632 kB at 108 kB/s)
[INFO] Replacing main artifact with repackaged archive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:23 min
[INFO] Finished at: 2021-02-21T03:51:36Z
[INFO] ------------------------------------------------------------------------
Service 'backend' failed to build : The command '/bin/sh -c mvn package' returned a non-zero code: 4294967295: failed to shutdown container: container 4f31232c41ca0eb8c06e838224f56449569d4591e133b49fb84566d5619e5fd6 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container 4f31232c41ca0eb8c06e838224f56449569d4591e133b49fb84566d5619e5fd6 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)

Me too, is there any solution to resolve this.

@lordscarlet
Copy link

I just blindly accepted an update to Docker Desktop -- apparently I shouldn't have done that. Seeing the same issue.

encountered an error during hcsshim::System::Start: failure in a Windows system call: The virtual machine or container exited unexpectedly. (0xc0370106)

@lordscarlet
Copy link

I just blindly accepted an update to Docker Desktop -- apparently I shouldn't have done that. Seeing the same issue.

encountered an error during hcsshim::System::Start: failure in a Windows system call: The virtual machine or container exited unexpectedly. (0xc0370106)

I re-pulled the image I was using and now things are good

@sherinein
Copy link

The command '/bin/sh -c npm install' returned a non-zero code: 4294967295: failed to shutdown container:
container cd8b3a2e7097ac237b8fb0586b0d4432962d5cc3d856c78ebd5380dff0b90414 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container cd8b3a2e7097ac237b8fb0586b0d4432962d5cc3d856c78ebd5380dff0b90414 encountered an error during hcsshim::System::waitBackgground: failure in a Windows system call: The virtual machine or container with the specified identifieri is not running. (0xc0370110)

@sherinein
Copy link

The command '/bin/sh -c npm install' returned a non-zero code: 4294967295: failed to shutdown container:
container cd8b3a2e7097ac237b8fb0586b0d4432962d5cc3d856c78ebd5380dff0b90414 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container cd8b3a2e7097ac237b8fb0586b0d4432962d5cc3d856c78ebd5380dff0b90414 encountered an error during hcsshim::System::waitBackgground: failure in a Windows system call: The virtual machine or container with the specified identifieri is not running. (0xc0370110)

how to resolve this issue?

@dmongit
Copy link

dmongit commented Aug 23, 2021

I have noticed that I will always get this error if my docker-compose file has a path with spaces in it. Why? Who knows. I want a volume pointing to where my MDF files live in SQL Server Management Studio. Single quotes don't work either for Windows Containers.

@Kagamia
Copy link

Kagamia commented Aug 28, 2021

Also happens on dockerEE which version greater than 19.03.5

so it could be fixed by force downgrading the dockerEE version on Server 2019

Install-Package -Name docker -ProviderName DockerMsftProvider -Force -RequiredVersion 19.03.5

@danriggs
Copy link

danriggs commented Sep 2, 2021

Also happens on dockerEE which version greater than 19.03.5

so it could be fixed by force downgrading the dockerEE version on Server 2019

Install-Package -Name docker -ProviderName DockerMsftProvider -Force -RequiredVersion 19.03.5

Thanks @Kagamia - I had the same issue with Docker EE on Server 2019 and this works. How did you find that version? I tested downgrading to the versions returned using -AllVersions but only saw these:

Find-Package -Name Docker -ProviderName DockerMsftProvider -AllVersions

Name                           Version          Source           Summary
----                           -------          ------           -------
Docker                         17.06.2-ee-25    DockerDefault    Contains Docker EE for use with Windows Server.
Docker                         18.03.1-ee-12    DockerDefault    Contains Docker EE for use with Windows Server.
Docker                         18.09.14         DockerDefault    Contains Docker EE for use with Windows Server.
Docker                         19.03.17         DockerDefault    Contains Docker EE for use with Windows Server.
Docker                         20.10.6          DockerDefault    Contains Docker EE for use with Windows Server.

@Kagamia
Copy link

Kagamia commented Sep 2, 2021

@danriggs I'm moving my personal server these days, my old server happen to installed 19.03.5 and it still works for WSL image build, so I tried every minor version on new server ONE-BY-ONE and finally got the last working version.

@ghelyar
Copy link

ghelyar commented Jan 21, 2022

I've just confirmed that this can still fail on 19.03.5 when building a windows container that has a RUN command in it.

It's always been really flaky though on all versions - you think you've found a fix then a few builds later it happens again.

@pjmlp
Copy link

pjmlp commented Mar 8, 2022

Also happening here,

Client:
Cloud integration: v1.0.22
Version: 20.10.12
API version: 1.41
Go version: go1.16.12
Git commit: e91ed57
Built: Mon Dec 13 11:44:07 2021
OS/Arch: windows/amd64
Context: default
Experimental: true

Server: Docker Desktop 4.5.1 (74721)
Engine:
Version: 20.10.12
API version: 1.41 (minimum version 1.24)
Go version: go1.16.12
Git commit: 459d0df
Built: Mon Dec 13 11:42:13 2021
OS/Arch: windows/amd64
Experimental: false

Quite a pain to use Windows containers.

@datduyng
Copy link

Issue is present on server 2019 insider version 2004 build 20236.1000

Tested Docker 2.4.0.0 and Docker 2.4.1.0

Step 3/6 : RUN yum install -y epel-release
 ---> Running in b06e80476769
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
 * base: centos.mirror.fr.planethoster.net
 * extras: centos.mirror.fr.planethoster.net
 * updates: centos.mirror.fr.planethoster.net
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                Arch             Version         Repository        Size
================================================================================
Installing:
 epel-release           noarch           7-11            extras            15 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 15 k
Installed size: 24 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-11.noarch                                     1/1
  Verifying  : epel-release-7-11.noarch                                     1/1

Installed:
  epel-release.noarch 0:7-11

Complete!
The command '/bin/sh -c yum install -y epel-release' returned a non-zero code: 4294967295: failed to shutdown container: container b06e8047676935a1dc2944e5152a909f75526ae69f708e48e1403d72fbce2cc7 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110): subsequent terminate failed container b06e8047676935a1dc2944e5152a909f75526ae69f708e48e1403d72fbce2cc7 encountered an error during hcsshim::System::waitBackground: failure in a Windows system call: The virtual machine or container with the specified identifier is not running. (0xc0370110)```

This is still a problem in mcr.microsoft.com/windows/servercore/insider:10.0.20348.1

@ismaelffj
Copy link

Was this ever solved?

@Edgaras91
Copy link

For windows server 2022 docker ee version 19.03.5 did work for me for 1 day, then it stopped, giving a slightly different error:
hcsshim::Process::CloseStdin: failure in a Windows system call: The process has already exited. (0x8037011f)

Does anyone have a fix?

@arndttob
Copy link

arndttob commented Aug 5, 2022

A reboot of the device was a functional workaround for me.

@Edgaras91
Copy link

For me, a workaround in our CI (Team City) was to ignore the error, and immediately retry again, which skipped all the cached steps, and jumped straight to the problematic step that was giving the error. The 2nd time it worked successfully. Been monitoring this for about 10 builds with consistently successful results.

@ghelyar
Copy link

ghelyar commented Aug 11, 2022

Yes, this has been going on for years and there has never been any fix for this, it's just really flaky, so people keep announcing they have found a work around because it works once, then they try again and it fails again.

In our CI build we have it retrying 5 times, and sometimes it still fails, and every time it fails, it hangs for 10 minutes before failing. Combine that with the enormous size of some Windows container images and you end up with a CI build that can take over an hour and still fail sometimes, just to run docker build, which should take seconds.

Windows containers are just awful in general. Avoid them like the plague if you can. Even if you get one to work it takes much longer to spin up a windows host to run one on, clouds tend to have less availability of Windows nodes so you hit capacity issues earlier, features are often missing from cloud hosting options when running Windows containers, and Windows containers are not secure. If you have anything tied to Windows-specific tech, just run that in a container, secure it away as well as you can from the outside world, and run Linux containers for everything else.

@Edgaras91
Copy link

What about the proposed experimental WSL2.
At the moment, I have Windows Server 2022 with latest updates, that supports WSL2 and I have it installed.
Is there something I need to do in docker EE to explicitly tell it to use WSL2? That could be a potential solution for Windows Server 2022 users?

@ghelyar
Copy link

ghelyar commented Aug 11, 2022

For us it happens when building a Windows container so the version of WSL does not make any difference, as it happens in Windows container mode.

I run docker desktop for Windows in WSL2 mode and when I build Windows containers this can still happen on any RUN command in the dockerfile.

Happens to us on desktop development environments and server build environments.

@pjmlp
Copy link

pjmlp commented Aug 11, 2022

I really would like that we wouldn't need to use Windows containers, or at very least, why don't we get a proper PowerShell based tool that actually works, without all these Docker issues

@RKUNTZMANN
Copy link

Hey,
Same issue for me, but going to a linux container fails for jenkins. It will create volumes as below

-v D:/Jenkins/jenkins_agent1/workspace/multipip_test_master/:D:/Jenkins/jenkins_agent1/workspace/multipip_test_master/

which is windows pathing, and cannot be adapted to linux as far as I know (I cannot edit to add // instead of /)

Am I just not going to be able to use jenkins+docker at all?

@Irene-123
Copy link

Irene-123 commented Sep 18, 2022

I'm facing this issue while building an image using the python package of docker.
System:
Windows 11
Docker version: Docker version 20.10.17, build 100c701

Here is my code, it gives me an error from line number 4

image="alpine/git:latest"
repo_dir="repos/CryptoTerminal"
client = docker.from_env()
client.images.build(path=repo_dir) # Build gives error
client.containers.create(image)
Traceback (most recent call last):
  File "C:\Users\kirti\docker_project\run_docker.py", line 23, in <module>
    client.images.build(path=repo_dir)
  File "C:\Users\kirti\docker_project\venv\lib\site-packages\docker\models\images.py", line 306, in build
    raise BuildError(chunk['error'], result_stream)
docker.errors.BuildError: The command '/bin/sh -c pip3 install -r requirements.txt' returned a non-zero code: 1

@scottt732
Copy link

Just a heads up. I was trying to address some possible HNS issues fixed in/around the KB5018485 timeframe and ended up experimenting with the registry keys here. I wasn't expecting these keys to make an impact on our image pull/rm times, but we noticed a significant improvement on 2019 LTSC with them in place (4x faster docker image pull, 6.4x faster docker image rm). Need to do a little more testing to see whether 0xc0370110 and 0xc0370105 still occur, but I figured I'd pass it along.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests