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

PowerShell 7.4-debian-11 image triggers an internal CLR error when executing a PowerShell command when run via Docker Desktop on Apple Silicon #799

Open
5 tasks done
michielvoo opened this issue Mar 29, 2024 · 4 comments

Comments

@michielvoo
Copy link

michielvoo commented Mar 29, 2024

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest image.
  • Search the existing issues.
  • Verified that this is not a Known Issue
  • Verified this is not an issues in the underlying windows container that should be reported to Windows Feedback Hub

Steps to reproduce

  • Use a Mac with Apple Silicon
  • Use macOS Sonoma 14.2.1 (23C71)
  • Use Docker Desktop 4.28.0 (139021)
  • Run the following commands in a terminal (% is the zsh prompt, PS /> is the prompt inside the container):
% docker run -it --name "ps74" --platform "linux/amd64" --rm "mcr.microsoft.com/powershell:7.4-debian-11"
PS /> Write-Warning Test

Expected behavior

WARNING: Test

Actual behavior

An error has occurred that was not properly handled. Additional information is shown below. The PowerShell process will exit.

Error details

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at Regex1_Scan(RegexRunner, ReadOnlySpan`1)
Fatal error. Internal CLR error. (0x80131506)
   at DynamicClass.Regex1_Scan(System.Text.RegularExpressions.RegexRunner, System.ReadOnlySpan`1<Char>)

Environment data

{
        "schemaVersion": 2,
        "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
        "config": {
                "mediaType": "application/vnd.docker.container.image.v1+json",
                "size": 3699,
                "digest": "sha256:b04037c30904d6cf7f4691d77f7c908e203abb2cea5c70abad51799c8ca07c11"
        },
        "layers": [
                {
                        "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
                        "size": 31422489,
                        "digest": "sha256:c0edef2937fa3b888b0cc3f9f5a4db00a1be6f297be5f057a77d738f91e675a0"
                },
                {
                        "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
                        "size": 72981391,
                        "digest": "sha256:47d8a5670baa302610b81b696367412a0ea2c33e27a73b0be67b4c511c45900d"
                },
                {
                        "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
                        "size": 23842684,
                        "digest": "sha256:742248d80c879b816bfbc9481c14e1b078ed5dacea8f26453d3245d313f8bfde"
                },
                {
                        "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
                        "size": 20896,
                        "digest": "sha256:ce8b82fb86b67eddc909e803fb07a192dbdce2ecf0098dc105be732e12d18628"
                }
        ]
}

Visuals

Screenshot 2024-03-29 at 23 25 22
@michielvoo michielvoo changed the title PowerShell 7.4 images for linux/amd64 trigger an internal CLR error when executing a PowerShell command PowerShell 7.4-debian-11 image triggers an internal CLR error when executing a PowerShell command when run via Docker Desktop on Apple Silicon Mar 29, 2024
@michielvoo
Copy link
Author

michielvoo commented Mar 29, 2024

Same command works fine when running the image tagged 7.2-debian-11:

% docker run -it --name "ps72" --platform "linux/amd64" --rm "mcr.microsoft.com/powershell:7.2-debian-11"
PS /> Write-Warning Test
WARNING: Test

@michielvoo
Copy link
Author

michielvoo commented Mar 29, 2024

The same error occurs when running the images tagged 7.4-debian-12 and 7.4-alpine-3.17.

And note that after the error the docker process does not respond to SIGINT (Ctrl+C), SIGTSTP (Ctrl+Z), or SIGQUIT (Ctrl+). I had to open another terminal and docker stop ps74 to recover.

@gshpychka
Copy link

Same here. This does not happen on 7.2-alpine-3.14, but happens on 7.3 and 7.4

@dpoole73
Copy link

dpoole73 commented Aug 7, 2024

any updates here? i see the same thing

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

3 participants