Skip to content

Conversation

@daxian-dbw
Copy link
Contributor

This pull request updates the PowerShell version from 7.6.0-preview.4 to 7.6.0-preview.5.

@daxian-dbw daxian-dbw requested a review from a team as a code owner October 9, 2025 23:24
@lbussell
Copy link
Member

@daxian-dbw there is a failing test on Alpine 3.22:

System.InvalidOperationException : Failed to execute docker run --name 10.0-pwsh-134045278031574963 --rm  mcr.microsoft.com/dotnet/nightly/sdk:10.0-alpine3.22-amd64 pwsh -c (Get-Childitem env:DOTNET_RUNNING_IN_CONTAINER).Value
Exit code: 139
Standard Error: Unhandled exception. System.TypeInitializationException: The type initializer for 'System.Management.Automation.Tracing.PSEtwLog' threw an exception.
 ---> System.TypeInitializationException: The type initializer for 'System.Management.Automation.Tracing.PSSysLogProvider' threw an exception.
 ---> System.DllNotFoundException: Unable to load shared library 'libpsl-native' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: 
Error relocating /usr/share/powershell/.store/powershell.linux.alpine/7.6.0-preview.5/powershell.linux.alpine/7.6.0-preview.5/tools/net10.0/any/runtimes/linux-musl-x64/native/libpsl-native.so: __syslog_chk: symbol not found
Error relocating /usr/share/powershell/.store/powershell.linux.alpine/7.6.0-preview.5/powershell.linux.alpine/7.6.0-preview.5/tools/net10.0/any/runtimes/linux-x64/native/libpsl-native.so: __syslog_chk: symbol not found
Error loading shared library /usr/share/dotnet/shared/Microsoft.NETCore.App/10.0.0-rc.2.25502.106/libpsl-native.so: No such file or directory
Error loading shared library /usr/share/powershell/.store/powershell.linux.alpine/7.6.0-preview.5/powershell.linux.alpine/7.6.0-preview.5/tools/net10.0/any/libpsl-native.so: No such file or directory
Error loading shared library libpsl-native.so: No such file or directory
Error loading shared library /usr/share/powershell/.store/powershell.linux.alpine/7.6.0-preview.5/powershell.linux.alpine/7.6.0-preview.5/tools/net10.0/any/runtimes/linux-musl-x64/native/liblibpsl-native.so: No such file or directory
Error loading shared library /usr/share/powershell/.store/powershell.linux.alpine/7.6.0-preview.5/powershell.linux.alpine/7.6.0-preview.5/tools/net10.0/any/runtimes/linux-x64/native/liblibpsl-native.so: No such file or directory
Error loading shared library /usr/share/dotnet/shared/Microsoft.NETCore.App/10.0.0-rc.2.25502.106/liblibpsl-native.so: No such file or directory
Error loading shared library /usr/share/powershell/.store/powershell.linux.alpine/7.6.0-preview.5/powershell.linux.alpine/7.6.0-preview.5/tools/net10.0/any/liblibpsl-native.so: No such file or directory
Error loading shared library liblibpsl-native.so: No such file or directory
Error loading shared library /usr/share/powershell/.store/powershell.linux.alpine/7.6.0-preview.5/powershell.linux.alpine/7.6.0-preview.5/tools/net10.0/any/runtimes/linux-musl-x64/native/libpsl-native: No such file or directory
Error loading shared library /usr/share/powershell/.store/powershell.linux.alpine/7.6.0-preview.5/powershell.linux.alpine/7.6.0-preview.5/tools/net10.0/any/runtimes/linux-x64/native/libpsl-native: No such file or directory
Error loading shared library /usr/share/dotnet/shared/Microsoft.NETCore.App/10.0.0-rc.2.25502.106/libpsl-native: No such file or directory
Error loading shared library /usr/share/powershell/.store/powershell.linux.alpine/7.6.0-preview.5/powershell.linux.alpine/7.6.0-preview.5/tools/net10.0/any/libpsl-native: No such file or directory
Error loading shared library libpsl-native: No such file or directory
Error loading shared library /usr/share/powershell/.store/powershell.linux.alpine/7.6.0-preview.5/powershell.linux.alpine/7.6.0-preview.5/tools/net10.0/any/runtimes/linux-musl-x64/native/liblibpsl-native: No such file or directory
Error loading shared library /usr/share/powershell/.store/powershell.linux.alpine/7.6.0-preview.5/powershell.linux.alpine/7.6.0-preview.5/tools/net10.0/any/runtimes/linux-x64/native/liblibpsl-native: No such file or directory
Error loading shared library /usr/share/dotnet/shared/Microsoft.NETCore.App/10.0.0-rc.2.25502.106/liblibpsl-native: No such file or directory
Error loading shared library /usr/share/powershell/.store/powershell.linux.alpine/7.6.0-preview.5/powershell.linux.alpine/7.6.0-preview.5/tools/net10.0/any/liblibpsl-native: No such file or directory
Error loading shared library liblibpsl-native: No such file or directory

   at System.Management.Automation.Tracing.NativeMethods.OpenLog(IntPtr ident, SysLogPriority facility)
   at System.Management.Automation.Tracing.NativeMethods.OpenLog(IntPtr ident, SysLogPriority facility)
   at System.Management.Automation.Tracing.SysLogProvider..ctor(String applicationId, PSLevel level, PSKeyword keywords, PSChannel channels)
   at System.Management.Automation.Tracing.PSSysLogProvider..cctor()
   --- End of inner exception stack trace ---
   at System.Management.Automation.Tracing.PSSysLogProvider..ctor()
   at System.Management.Automation.Tracing.PSEtwLog..cctor()
   --- End of inner exception stack trace ---
   at System.Management.Automation.Tracing.PSEtwLog.LogConsoleStartup()
   at Microsoft.PowerShell.UnmanagedPSEntry.Start(String[] args, Int32 argc)
   at Microsoft.PowerShell.ManagedPSEntry.Main(String[] args)
  Stack Trace:
     at Microsoft.DotNet.Docker.Tests.DockerHelper.Execute(String args, Boolean ignoreErrors, Boolean autoRetry, ITestOutputHelper outputHelper) in /repo/dotnet-docker/tests/Microsoft.DotNet.Docker.Tests/DockerHelper.cs:line 219
   at Microsoft.DotNet.Docker.Tests.DockerHelper.ExecuteWithLogging(String args, Boolean ignoreErrors, Boolean autoRetry) in /repo/dotnet-docker/tests/Microsoft.DotNet.Docker.Tests/DockerHelper.cs:line 234
   at Microsoft.DotNet.Docker.Tests.DockerHelper.Run(String image, String name, String command, String workdir, String optionalRunArgs, Boolean detach, String runAsUser, Boolean skipAutoCleanup, Boolean useMountedDockerSocket, Boolean silenceOutput, Boolean tty) in /repo/dotnet-docker/tests/Microsoft.DotNet.Docker.Tests/DockerHelper.cs:line 369
   at Microsoft.DotNet.Docker.Tests.SdkImageTests.PowerShellScenario_Execute(ProductImageData imageData, String optionalArgs) in /repo/dotnet-docker/tests/Microsoft.DotNet.Docker.Tests/SdkImageTests.cs:line 408
   at Microsoft.DotNet.Docker.Tests.SdkImageTests.VerifyPowerShellScenario_DefaultUser(ProductImageData imageData) in /repo/dotnet-docker/tests/Microsoft.DotNet.Docker.Tests/SdkImageTests.cs:line 144
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)

@daxian-dbw
Copy link
Contributor Author

@adityapatwardhan Can you please take a look at the failure?

@daxian-dbw
Copy link
Contributor Author

The root cause:

We re-did the powershell-native build as a part of moving to msazure. Earlier the build was being done on containers and we were building alpine on alpine container. When we moved to using hosted agents, all other build were correct expect for Alpine. Alpine needs to be built on Alpine and hence it did not work.
I build the libpsl-native.so locally and replaced it on the preview5 build and then it worked fine.

We have produced a new Microsoft.PowerShell.Native to address the issue, which will be used in our next PowerShell release.

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

Successfully merging this pull request may close these issues.

2 participants