PowerShell: "Failed to create CoreCLR, HRESULT: 0x80070008" when using *latest*
Prerequisites
- 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
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (6 by maintainers)
I’m not sure, but article I referenced to has the following that may be an explanation:
Does either of the resolutions suggested at https://docs.linuxserver.io/faq#jammy work for you?
@Kralizek Digging into the error
HRESULT: 0x80070008
points to an issue with a syscall being blocked due toSECCOMP
in an container environment. For example, https://github.com/dotnet/runtime/issues/1634 shows that this error happened when .NET calledsched_setaffinity
to set thread’s CPU affinity mask in a Snap confined environment that didn’t have theprocess-control
interface.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!
@TravisEz13 or @anamnavi was there any recent changes to the latest published docker containers that would have caused this issue?
The tag
ubuntu-22.04
doesn’t work for me either. (no surprise given thatlatest
points to the same version)