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 on Windows randomly crashes with 0xc0370106 when DockerFile has too many commands #902

Closed
ghost opened this issue Jul 6, 2017 · 9 comments

Comments

@ghost
Copy link

ghost commented Jul 6, 2017

Expected behavior

Docker for windows completes build without restarting it.

Actual behavior

We have a dockerfile on microsoft/iis:10.0.14393.206 that runs IIS/PHP.

If we add too many commands the build starts to crash with this error:

Container d6f3e9bd6f3e9bd6f3e9bd6f3e9b encountered an error during Start: failure in a Windows system call: The compute system exited unexpectedly. (0xc0370106)

If I run the same build command it will work after a few tries.

Information

  • Diagnostic ID from "Diagnose & Feedback" in the menu.

367F61C2-6EB9-4793-B7E9-43C6F41546A2/2017-07-06_15-18-01

  • a reproducible case if this is a bug, Dockerfiles FTW

escape=`

FROM microsoft/iis:10.0.14393.206
SHELL ["powershell"]

RUN mkdir -p PHP
ADD ["http://rsiubuntu/php-7.1.5-nts-Win32-VC14-x64.zip","c:/PHP/php.zip"]
ADD https://nanoserver.es/nanofiles/vcruntime140.dll C:\Windows\System32\vcruntime140.dll
ADD https://nanoserver.es/nanofiles/iisfcgi.dll C:\Windows\System32\inetsrv\iisfcgi.dll
ADD http://rsiubuntu/sxs.zip c:\php\sxs.zip
ADD http://rsiubuntu/2017-17-PT1.zip c:\php\src.zip
ADD http://rsiubuntu/hosts-localhost C:\Windows\System32\drivers\etc\hosts
ADD ["https://nanoserver.es/nanofiles/Applicationhost.txt","C:\Windows\System32\inetsrv\config\Applicationhost.config"]
ADD http://rsiubuntu/PHPManagerForIIS-1.2.0-x64.msi c:\php\PHPManagerForIIS-1.2.0-x64.msi

ENV PHP 'C:/php'

RUN Expand-Archive -Path 'c:/PHP/php.zip' -DestinationPath 'c:/php'

RUN Expand-Archive -Path 'c:/PHP/sxs.zip' -DestinationPath 'c:/php'

#RUN c:\php\InstallMSIs.ps1
#Download the Source for .net 3.5, this is from a windows 10 iso.
RUN Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters -Name MajorVersion -Value 8;

RUN Install-WindowsFeature -source 'C:/php/sxs' NET-Framework-Core;
RUN Install-WindowsFeature NET-Framework-45-ASPNET;
RUN Install-WindowsFeature Web-Asp-Net45;
RUN Install-WindowsFeature Web-Mgmt-Service;
RUN Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\WebManagement\Server -Name EnableRemoteManagement -Value 1;
RUN Install-WindowsFeature Web-Windows-Auth;
RUN Install-WindowsFeature NET-WCF-HTTP-Activation45;
#RUN powershell Install-WindowsFeature Web-Static-Content;
RUN Install-WindowsFeature Web-ASP;
RUN Install-WindowsFeature Web-CGI;
#RUN powershell Install-WindowsFeature Web-WMI;

RUN Start-Process C:\PHP\msodbcsql.msi -ArgumentList '/quiet IACCEPTMSODBCSQLLICENSETERMS=YES /LV MSODBCSQLmsi.log' -Wait
RUN Start-Process C:\PHP\sqlncli.msi -ArgumentList '/quiet IACCEPTSQLNCLILICENSETERMS=YES /qn /passive /L
V SQLNCLImsi.log' -Wait
RUN Start-Process C:\PHP\PHPManagerForIIS-1.2.0-x64.msi -ArgumentList '/passive /norestart /quiet ACCEPTEULA=YES /LV PHPMANAGERmsi.log' -Wait
RUN Start-Process C:\PHP\vc_redist.x64.exe -ArgumentList '/passive /norestart IACCEPTvcredistLICENSETERMS=YES /L
V VCREDIST.log' -Wait

RUN Expand-Archive -Path c:\src.zip -DestinationPath C:\emergencyreporting

RUN NET USER testing "Password01!" /ADD
RUN NET LOCALGROUP "Administrators" "testing" /add

#RUN mkdir -p Stuff
#RUN mkdir -p EmergencyReporting
#RUN mkdir -p 'c:/emergencyreporting/system'

#volume c:/emergencyreporting/system

#RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices' -Name 'G:' -Value '??\C:\EmergencyReporting\system' -Type String
#RUN mkdir -p 'G:/emergencyreporting/system'

#RUN icacls "C:\EmergencyReporting" /grant 'IIS_IUSRS:(OI)(CI)F' /T
#RUN icacls "C:\PHP" /grant 'Everyone:(OI)(CI)F' /T

#Entrypoint seems to make the container quit/crash.
RUN net start wmsvc
#RUN sc config wmsvc start=auto

RUN Remove-Website -Name 'Default Web Site'
RUN New-Website -Name 'System' -Port 80 -HostHeader 'secure.emergencyreporting.stage' -PhysicalPath 'C:\EmergencyReporting\system' -ApplicationPool '.NET v4.5'

#RUN powershell -NoProfile -Command;

RUN c:\windows\system32\inetsrv\appcmd clear config /section:system.webServer/fastCGI
#RUN c:\windows\system32\inetsrv\appcmd set config /section:system.webServer/handlers /-[name='PHP53_via_FastCGI']
RUN c:\windows\system32\inetsrv\appcmd set config /section:system.webServer/fastCGI /+\"[fullPath='c:\php\php-cgi.exe']\" RUN c:/windows/system32/inetsrv/appcmd
set config /section:system.webServer/handlers /+"[name='PHP_via_FastCGI',path='*.php',verb='GET,POST,HEAD',modules='FastCgiModule',scriptProcessor='c:/php/php-cgi.exe',resourceType='Unspecified']"
RUN c:\windows\system32\inetsrv\appcmd set config /section:system.webServer/handlers /accessPolicy:Read,Script RUN c:\windows\system32\inetsrv\appcmd
set config -section:system.webServer/fastCgi /"[fullPath='c:\php\php-cgi.exe'].instanceMaxRequests:10000"
RUN c:\windows\system32\inetsrv\appcmd `
set config -section:system.webServer/fastCgi /+"[fullPath='c:\php\php-cgi.exe'].environmentVariables.[name='PHP_FCGI_MAX_REQUESTS',value='10000']"

EXPOSE 8081
#This path only seems to work with forward slashes of double slashes.
RUN setx PATH /M 'C:/Windows/SysWOW64/WindowsPowerShell/v1.0;C:/php;C:/php/ext;C:/windows/system32'
#RUN -executionpolicy bypass c:\php\environmentDocker.ps1

ADD ["http://rsiubuntu/php.ini","c:/php"]

  • page URL if this is a docs issue or the name of a man page

  • host distribution and version (Windows version, build number, etc)

I am running docker version: 17.06.0-rc4-ce-win15 (12573) System: Windows 10 build 15063.413, 16GB RAM, i5-6440HQ CPU 2.60GHz

Steps to reproduce the behavior

  1. ... Keep adding commands to dockerfile until it crashes.
  2. ... If you want it to stop crashing combine your files into a zip and move your commands to a script.
@jasonbivins
Copy link

Hi @scranley Here is the error I see in the logs - but it's not very specific.
failure on a windows system call: the compute system exited unexpectedly.

Could it be possible that your dockerfiles add up to be more than 60gb and hit the drive space limit when built? Can you check to see how much disk space is free?

@ghost
Copy link
Author

ghost commented Jul 17, 2017

Hello @jasonbivins there was ~120GB free.

@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

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

@Rhynier
Copy link

Rhynier commented Jul 24, 2018

I am experiencing this issue on the latest version of Docker CE (as of today's date) running on Windows 10 Enterprise build 1709. I am trying to start a Windows container. What are the next steps to provide information to help troubleshoot this?

I uploaded a diagnostic. Id is 69337AD6-AB22-4075-A74B-15B7F0C86349/2018-07-24_10-05-20

@lamest
Copy link

lamest commented Oct 9, 2018

same here with Version 18.06.1-ce-win73 (19507)

how about open in again? and actually fix it.

@mkostersitz
Copy link

Seeing the same issue as of today. Linux containers work fine OTOH

@mat007
Copy link
Member

mat007 commented Oct 25, 2018

This does not look like an issue with the Docker for Windows application itself but with the upstream docker windows container implementation.
Could you please open an issue if there isn't already one on https://github.com/moby/moby instead as that is the more appropriate place.

@mkostersitz
Copy link

Turns out it is a regression in a current Windows insider build. Fix is in the works by Microsoft.

@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 Jun 2, 2021
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