Skip to content

LCOW: intermittent failures with "returned a non-zero code: 4294967295" #36682

Closed as not planned

Description

@rn

Using LCOW I occasionally see error messages like this

The command '/bin/sh -c dd if=/dev/urandom of=file1 bs=8 count=1' returned a non-zero code: 4294967295: failed to shutdown container: container de3925f530ce9fa61618d52c626dcf49746d8f0226454c5612183b080121dc05 encountered an error during WaitTimeout: failure in a Windows system call: winapi error #4294967295 (0xffffffff)

This particular case is with a simple Dockerfile:

FROM alpine:3.7
RUN dd if=/dev/urandom of=file1 bs=8 count=1

but the error happens intermittently, ie it works when run again. I've seen this error with several different Dockerfile so it's likely independent of a specific file

I believe @jhowardmsft is aware of this issue so just filing it for the records.

Activity

  1. lowenna commented on Mar 23, 2018

    @lowenna
    Member

    Yes, am aware of this. It's a platform bug but we haven't figured it out yet.

  2. yvesdm commented on Apr 25, 2018

    @yvesdm

    Encountered this bug.
    Any idea when it would be fixed ?

  3. thaJeztah commented on Apr 25, 2018

    @thaJeztah
    Member

    Following the discussion above, it's a platform bug (ie, a bug in Windows), so this will have to be addressed in a Windows update, once the root cause has been found.

    Note that LCOW is still an experimental feature, and there are various limitations currently

  4. 4c74356b41 commented on Jun 24, 2018

    @4c74356b41

    so apparently this is still a thing. how are we supposed to use this thing?

  5. dan640 commented on Jul 9, 2018

    @dan640

    Any update or workaround?

    BTW I always this error message if I try to build or run LCOW.
    winapi error #4294967295

    More info:
    Get this error with CentOS.
    I do not get this error when I want to run Ubuntu but the run command just exits without any message.
    But I'm able to build Ubuntu and then run the image.

  6. necroTaxonomist commented on Aug 2, 2018

    @necroTaxonomist

    bump

    I've noticed the error always seems to happen on mkdir?

  7. necroTaxonomist commented on Aug 2, 2018

    @necroTaxonomist

    nevermind, it actually just happens on any RUN commands

  8. necroTaxonomist commented on Aug 2, 2018

    @necroTaxonomist

    Actually, even if I take out all of the commands from the dockerfile, it happens when running the image too

  9. necroTaxonomist commented on Aug 3, 2018

    @necroTaxonomist

    This happens on CentOS 6, but CentOS 7 seems to be fine. Maybe it's an issue with Enterprise Linux 6? RHEL6 was also having problems when RHEL7 was fine.

  10. lowenna commented on Aug 3, 2018

    @lowenna
    Member

    There hasn't been any further investigation in the platform while we're heads-down focusing on landing RS5 aka Windows Server 2019 (Or Windows 10 1809), of which server will be an LTB/LTSC release (ie one which has long-term support, whereas RS4/1803 is a short-term release). So far, I have NOT hit this on RS5 builds released to insiders, or internal RS5 daily builds. What I do know is that it's not relating to the image itself, or the command that's being run,

  11. added
    area/lcow
    on Oct 30, 2018
  12. el-gee commented on Jan 4, 2019

    @el-gee

    Bumped into this error recently with new builds of everything and even a fresh reset of docker. For context I was trying to make a simple nginx image that had a custom cert and config copied in to it. Things did eventually work (and resetting seemed to be key), but it was frustrating to blindly retry.

    Debug Info:

    $docker info                                                                                                                                                                  
      Containers: 1                                                                                                                                                                                                      
       Running: 0
       Paused: 0
       Stopped: 1
      Images: 6                                                                                                                                                                                                          
      Server Version: 18.09.0                                                                                                                                                                                            
      Storage Driver: windowsfilter (windows) lcow (linux)                                                                                                                                                               
       Windows:                                                                                                                                                                                                          
       LCOW:                                                                                                                                                                                                             
      Logging Driver: json-file                                                                                                                                                                                          
      Plugins:
       Volume: local                                                                                                                                                                                                     
       Network: ics l2bridge l2tunnel nat null overlay transparent                                                                                                                                                       
       Log: awslogs etwlogs fluentd gelf json-file local logentries splunk syslog                                                                                                                                        
      Swarm: inactive                                                                                                                                                                                                    
      Default Isolation: hyperv                                                                                                                                                                                          
      Kernel Version: 10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)                                                                                                                                              
      Operating System: Windows 10 Enterprise Version 1809 (OS Build 17763.134)                                                                                                                                          
      OSType: windows                                                                                                                                                                                                    
      Architecture: x86_64                                                                                                                                                                                               
      CPUs: 8                                                                                                                                                                                                            
      Total Memory: 63.9GiB                                                                                                                                                                                              
      Docker Root Dir: C:\ProgramData\Docker                                                                                                                                                                             
      Debug Mode (client): false
      Debug Mode (server): false                                                                                                                                                                                         
      Registry: https://index.docker.io/v1/                                                                                                                                                                              
      Labels:                                                                                                                                                                                                            
      Experimental: true                                                                                                                                                                                                                                                                                                                                                                                                 
      Live Restore Enabled: false                                                                                                                                                                                        
      Product License: Community Engine           ```
    
  13. jswanso commented on Apr 16, 2019

    @jswanso

    Is there any update on this issue? This has been open for over a year and I haven't seen a workaround or a fix for this. We get this same issue running a windows 2019 server.

    The issue seems to happen after the run command executes, but before the container is cleaned up. Possibly an issue with the Docker die event.

    Debug version:

    Client: Docker Engine - Enterprise
     Version:           18.09.4
     API version:       1.39
     Go version:        go1.10.8
     Git commit:        c3516c43ef
     Built:             03/27/2019 18:22:15
     OS/Arch:           windows/amd64
     Experimental:      false
    
    Server: Docker Engine - Enterprise
     Engine:
      Version:          18.09.4
      API version:      1.39 (minimum version 1.24)
      Go version:       go1.10.8
      Git commit:       c3516c43ef
      Built:            03/27/2019 18:20:29
      OS/Arch:          windows/amd64
      Experimental:     true
    

    Docker Info:

    Images: 10
    Server Version: 18.09.4
    Storage Driver: windowsfilter (windows) lcow (linux)
     Windows: 
     LCOW: 
    Logging Driver: json-file
    Plugins:
     Volume: local
     Network: ics l2bridge l2tunnel nat null overlay transparent
     Log: awslogs etwlogs fluentd gelf json-file local logentries splunk syslog
    Swarm: inactive
    Default Isolation: process
    Kernel Version: 10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)
    Operating System: Windows Server 2019 Datacenter Version 1809 (OS Build 17763.437)
    OSType: windows
    Architecture: x86_64
    CPUs: 2
    Total Memory: 4GiB
    Name: XXXXXXXX
    ID: BQ6M:AZHG:XUQ3:I2YD:5R3Y:365G:OEQS:GSA4:CP5P:LD3N:FB6W:4WGG
    Docker Root Dir: C:\ProgramData\docker
    Debug Mode (client): false
    Debug Mode (server): false
    Registry: https://index.docker.io/v1/
    Labels:
    Experimental: true
    Insecure Registries:
     127.0.0.0/8
    Live Restore Enabled: false
    
  14. 1 remaining item

  15. WiMills commented on Aug 26, 2019

    @WiMills

    Is there any update on this? Experiencing it on a RUN '/bin/sh -c mkdir ./folder' command. Running Windows Server 2019 as well.

  16. thaJeztah commented on Aug 26, 2019

    @thaJeztah
    Member
     RUN '/bin/sh -c mkdir ./folder'

    Did you mean to put the quotes after the -c ?

    RUN /bin/sh -c 'mkdir ./folder'

    Note that in the shell notation, the default shell would still be called (so it could become /bin/sh -c '/bin/sh -c mkdir ./folder'); if that's not your intent, you may want to use the "exec" notation (JSON);

    RUN ["/bin/sh", "-c", "mkdir ./folder"]
  17. WiMills commented on Aug 26, 2019

    @WiMills

    @thaJeztah Thanks for the quick reply. I found out I was running with a Docker EE-preview version, so I updated to the newest version, and it now works.

  18. terryxychan commented on Sep 20, 2019

    @terryxychan

    I have been running into the same problem while trying to build from a Dockerfile too.

    Docker version:

    Client:
     Version:      17.10.0-ee-preview-3
     API version:  1.33
     Go version:   go1.8.4
     Git commit:   1649af8
     Built:        Fri Oct  6 17:52:28 2017
     OS/Arch:      windows/amd64
    
    Server:
     Version:      17.10.0-ee-preview-3
     API version:  1.34 (minimum version 1.24)
     Go version:   go1.8.4
     Git commit:   b8571fd
     Built:        Fri Oct  6 18:01:48 2017
     OS/Arch:      windows/amd64
     Experimental: true
    

    Windows version:

    Edition:  Windows Server 2019 Standard
    Version: 1809
    OS build: 17763.379
    

    Are there any updates on this?

  19. thaJeztah commented on Sep 24, 2019

    @thaJeztah
    Member

    No updates as far as I know, but I would highly recommend installing a current version of Docker, not the 17.10 preview, because that version is really outdated (and unmaintained)

  20. stevozilik commented on Nov 29, 2019

    @stevozilik

    @thaJeztah Thanks for the quick reply. I found out I was running with a Docker EE-preview version, so I updated to the newest version, and it now works.

    Whats your docker version output?

  21. gituser2291 commented on Feb 13, 2020

    @gituser2291

    Any updates on this? It is very flaky/intermittent for me.. Getting the following error on Windows Docker Engine:19.03.5 Version: 2.2.0.3(42716) stable:

    returned a non-zero code: 4294967295

  22. CYWong-Nick commented on Feb 18, 2020

    @CYWong-Nick

    Same here, no matter I use
    RUN ["apt", "update"]
    OR
    RUN apt update

    I still get the same non-zero code: 4294967295

    Any update?

    Client:
     Version:      17.10.0-ee-preview-3
     API version:  1.33
     Go version:   go1.8.4
     Git commit:   1649af8
     Built:        Fri Oct  6 17:52:28 2017
     OS/Arch:      windows/amd64
    
    Server:
     Version:      17.10.0-ee-preview-3
     API version:  1.34 (minimum version 1.24)
     Go version:   go1.8.4
     Git commit:   b8571fd
     Built:        Fri Oct  6 18:01:48 2017
     OS/Arch:      windows/amd64
     Experimental: true
    
  23. AbsurdusAdeptus commented on Apr 30, 2020

    @AbsurdusAdeptus

    This seems consistant now across windows 10 installations. The simplest build with a RUN failes with the same error:

    FROM ubuntu
    RUN echo bob
    
    C:\test>docker build .
    Sending build context to Docker daemon  982.8MB
    Step 1/2 : FROM ubuntu
     ---> 7698f282e524
    Step 2/2 : RUN echo bob
     ---> Running in 487eaca0dc74
    bob
    The command '/bin/sh -c echo bob' returned a non-zero code: 4294967295: failed to shutdown container: container 487eaca0dc744b4536deea54f8b7ff1fbd8a172fe39f7810a883f6a23f1b992f 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 487eaca0dc744b4536deea54f8b7ff1fbd8a172fe39f7810a883f6a23f1b992f 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)
    
  24. RedKinda commented on Jul 23, 2020

    @RedKinda

    I am using Docker Desktop for windows and I also got this error when I tried to build FROM alpine while on windows containers. Make sure to Switch to Linux containers before building anything. I hope this helps

  25. MathiasMagnus commented on Nov 25, 2020

    @MathiasMagnus

    I hit the same issue with latest Docker Desktop (as of today) 2.5.0.1. I won't hold my breath, given how this issue is 2.5 years old. Too bad, as this feature would've been the cornerstone of a CI feature I am working on. Running Windows 10 Pro 20H2 (9042.630

    @mvonk how is switching to Linux containers a solution here? If I build the image in Linux containers mode, when switching back to Windows I can neither list, not run any of the Linux containers I built, even if I get the name right and specify --platform=linux.

    @thaJeztah Any updates on this? This would be a killer feature for making Windows 10 the best dev platform out there.

  26. thaJeztah commented on Nov 25, 2020

    @thaJeztah
    Member

    The experimental LCOW feature, at least in its current form, is marked deprecated (see docker/cli#2798 and issues linked from that). The current implementation was mostly done to explore options for running Linux containers on a Windows host, but from the start was planned to be removed at some point when either LCOW was implemented in containerd (some work on that has been done, but incomplete https://github.com/containerd/containerd/pulls?q=is%3Apr+lcow+), or alternatives, such as WSL2.

    No active development will be done on the current LCOW implementation (most bugs/limitations in the current implementation may need changes in Windows, and afaik, there's no active work on that from Microsoft's side)

    Focus is currently (at least for Docker Desktop) on WSL2, which provides "native" Linux containers on a native Linux runtime, therefore not having the limitations and bugs that the current LCOW implementation has.

    That said, WSL2 does not offer running Linux and Windows containers side-by-side one a single daemon. Approaches for that are still being explored (there's a roadmap item for that; docker/roadmap#79); I'd recommend upvoting that issue and/or adding a comment on the ticket with your use-case, which can help getting work on that effort prioritised.

  27. hassanalbudairi commented on Jan 25, 2021

    @hassanalbudairi

    Is there any update on this issue as I am currently facing the same problem with LCOW on Windows 10 Ver 1909 (OS build 18363.1316)

    Client: Docker Engine - Community
    Cloud integration: 1.0.7
    Version: 20.10.2
    API version: 1.41
    Go version: go1.13.15
    Git commit: 2291f61
    Built: Mon Dec 28 16:14:16 2020
    OS/Arch: windows/amd64
    Context: default
    Experimental: true
    Server: Docker Engine - Community
    Engine:
    Version: 20.10.2
    API version: 1.41 (minimum version 1.24)
    Go version: go1.13.15
    Git commit: 8891c58
    Built: Mon Dec 28 16:26:48 2020
    OS/Arch: windows/amd64
    Experimental: true

    and the deamon config
    { "registry-mirrors": [], "insecure-registries": [], "debug": true, "experimental": true }

    my dockerfile
    FROM ubuntu:latest ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && \ apt-get install -y python3 python3-dev python3-pil hugin-tools ADD generate.py /generate.py ENTRYPOINT ["python3", "/generate.py"]

    and I got the following error

    The command '/bin/sh -c apt-get update && apt-get install -y python3 python3-dev python3-pil hugin-tools' returned a non-zero code: 4294967295: failed to shutdown container: container c783e98680ab347d24f3c5df76cbd19b18e9c6a2652e649715d5f89d6ace5429 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 c783e98680ab347d24f3c5df76cbd19b18e9c6a2652e649715d5f89d6ace5429 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)

  28. thaJeztah commented on Jul 12, 2023

    @thaJeztah
    Member

    Closing this issue, because the experimental LCOW feature has been deprecated and removed in Docker 23.0 and up;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/builderarea/lcowplatform/windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions