"Failed to create CoreCLR, HRESULT: 0x80070008" when using *latest*
See original GitHub issuePrerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
In my build script I have a step that spawns a docker container based on the powershell:latest image that fails with the error in the title.
Here is the command executed on the build server
docker run --rm -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -e COMMIT_SHA1=$CIRCLE_SHA1 --network project_default mcr.microsoft.com/powershell pwsh -command '
Install-Module -Name AWS.Tools.Installer -Force
Install-AWSToolsModule AWS.Tools.S3 -Force -CleanUp
Invoke-WebRequest -Uri http://entrypoint-api/docs/v1.0/schema.json -OutFile /tmp/schema.json
Write-S3Object -File /tmp/schema.json -BucketName "some_bucket" -Key "some_key/$env:COMMIT_SHA1.json" -AccessKey $env:AWS_ACCESS_KEY_ID -SecretKey $env:AWS_SECRET_ACCESS_KEY
'
The command has worked without any issue until few days ago. Then we started getting the error specified above: “Failed to create CoreCLR, HRESULT: 0x80070008”
Unable to find image 'mcr.microsoft.com/powershell:latest' locally
latest: Pulling from powershell
018f9d1d: Pulling fs layer
Digest: sha256:844fb73db69ed0bbe82d159d4ba50aea06ef4d42bda766c52f2928683f5c8d09
Status: Downloaded newer image for mcr.microsoft.com/powershell:latest
Failed to create CoreCLR, HRESULT: 0x80070008
Exited with code exit status 137
CircleCI received exit code 137
After some testing, I noticed that the issue is only happening when using latest which is pointing at ubuntu-22.04.
If I use 7.2.0-debian-10, 7.2-debian-10, 7.2-alpine-3.14, alpine-3.14, ubuntu-22.04 it works without any problem.
In issue #13166 it was suggested to set COMPlus_EnableDiagnostics to 0. This didn’t help.
Expected behavior
Being able to run a container with latest image of powershell.
Actual behavior
Container can't start
Error details
Unable to find image 'mcr.microsoft.com/powershell:latest' locally
latest: Pulling from powershell
018f9d1d: Pulling fs layer
Digest: sha256:844fb73db69ed0bbe82d159d4ba50aea06ef4d42bda766c52f2928683f5c8d09
Status: Downloaded newer image for mcr.microsoft.com/powershell:latest
Failed to create CoreCLR, HRESULT: 0x80070008
Exited with code exit status 137
CircleCI received exit code 137
Environment data
Don’t have it.
Visuals
No response
Issue Analytics
- State:
- Created a year ago
- Comments:17 (6 by maintainers)
Top Results From Across the Web
Calamari's "Failed to create CoreCLR, HRESULT
Calamari's "Failed to create CoreCLR, HRESULT: 0x80070008" error in custom execution container. In more than one of our Octopus Projects, we ...
Read more >How to fix exception "Failed to initialize CoreCLR, HRESULT
Hi! I have OS Linux 4.18.0-348.12.2.el8_5.x86_64 x86_64, rocky I published my project with target platform linux-x64, ...
Read more >Docker: Can't reach Ombi
I have been running Ombi in Docker for a couple of years with no issue. ... Failed to create CoreCLR, HRESULT: 0x80070008.
Read more >Failed to create CoreCLR, HRESULT: 0x80070057
I think you've found a bug in the .NET SDK. It doesn't appear to like the folder name for the project being ;)...
Read more >OMBI - 4.16.12 - got error while start the container - Docker
I just pull the latest image of ombi (amd64), and then use same configuration of my ... Failed to create CoreCLR, HRESULT: 0x80070008....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Kralizek Digging into the error
HRESULT: 0x80070008points to an issue with a syscall being blocked due toSECCOMPin an container environment. For example, https://github.com/dotnet/runtime/issues/1634 shows that this error happened when .NET calledsched_setaffinityto set thread’s CPU affinity mask in a Snap confined environment that didn’t have theprocess-controlinterface.You will want to read this article: https://www.linuxserver.io/blog/anatomy-of-an-issue, which points out a similar problem (also on the ubuntu-22.04 image) due to using old versions of Docker engine. Their resolution may be helpful to you: https://docs.linuxserver.io/faq#jammy.
@Kralizek @FelixSFD What version of powershell are you using? I’ll look into replicating this my side and resolving soon!