PowerShell-Native icon indicating copy to clipboard operation
PowerShell-Native copied to clipboard

Enter-PSSession Crash on OSX 10.12 after exiting connected host

Open Iristyle opened this issue 7 years ago • 3 comments

Steps to reproduce

Connect to Linux OMI Server 1.5.0 over basic auth.

Enter-PSSession -ComputerName $ENV:BOLT_HOST -Authentication Basic -UseSSL -Credential "root"

PowerShell credential request
Enter your credentials.
Password for user root: ********

[p4jz0jwh18iy4u0.delivery.puppetlabs.net]: PS /root> exit

Expected behavior

exit should cleanly return to the local pwsh session

Actual behavior

dyld: lazy symbol binding failed: Symbol not found: __os_log_error_impl
  Referenced from: /usr/local/microsoft/powershell/6/libpsl-native.dylib (which was built for Mac OS X 10.13)
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: __os_log_error_impl
  Referenced from: /usr/local/microsoft/powershell/6/libpsl-native.dylib (which was built for Mac OS X 10.13)
  Expected in: /usr/lib/libSystem.B.dylib

[3]    59560 abort      pwsh

Environment data

Mac OSX 10.12

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.1.0
PSEdition                      Core
GitCommitId                    6.1.0
OS                             Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 21 20:07:39 PDT 2018; root:xnu-3789.73.14~1/RELEASE_X86_64
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Iristyle avatar Sep 28 '18 21:09 Iristyle

@Iristyle does this crash occur if you remote to a Windows box over WSMan?

SteveL-MSFT avatar Sep 28 '18 21:09 SteveL-MSFT

Haven't tried that yet @SteveL-MSFT (but note that I did put up a couple of minor PRs to OMI recently to address SPNEGO over HTTPS handling).

This problem did just start happening after upgrading from PowerShell 6.0.2 to 6.1.0. I upgraded to see if Negotiate was supported yet for Enter-PSSession.

In 6.0.2 when attempting to use Negotiate I got:

Enter-PSSession : Connecting to remote server p4jz0jwh18iy4u0.delivery.puppetlabs.net failed with the following error message : Authorization failed For more information, see the about_Remote_Troubleshooting Help topic.

Now, instead of that message I get the same crash as above. As you can see, I can still connect fine over basic, but it crashes on exit.

Although it does look like there are problems with remoting, this seems like a problem with the build and how it's handling errors?

Iristyle avatar Sep 28 '18 22:09 Iristyle

We're seeing the same issue running PowerShell on macOS 10.12.6. Getting the Symbol not found: __os_log_error_impl. A possible solution can be found here.

How to call os_log_error from High Sierra (10.13) http://www.itdaan.com/blog/2017/10/05/930fd5addfcab7a6c23d3cb86dd0fda5.html

marioroy avatar Dec 20 '18 13:12 marioroy