Skip to content

running new-pssession in a newly built PowerShell should not cause the shell to exit #3476

Description

Steps to reproduce

clone
start-psbootstrap
start-psbuild
start-psester
BOOM

Expected behavior

An error message or a new pssession

Actual behavior

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Management.Automation.Remoting.PrioritySendDataCollection.Clear() in /home/testuser/src/github/PowerShell/src/System.Management.Automation/engine/remoting/fanin/PriorityCollection.cs:line 158
   at System.Management.Automation.Remoting.Client.BaseClientTransportManager.CloseAsync() in /home/testuser/src/github/PowerShell/src/System.Management.Automation/engine/remoting/fanin/BaseTransportManager.cs:line 949
   at System.Management.Automation.Remoting.Client.WSManClientSessionTransportManager.CloseAsync() in /home/testuser/src/github/PowerShell/src/System.Management.Automation/engine/remoting/fanin/WSManTransportManager.cs:line 1219
   at System.Management.Automation.Remoting.Client.BaseClientTransportManager.Finalize() in /home/testuser/src/github/PowerShell/src/System.Management.Automation/engine/remoting/fanin/BaseTransportManager.cs:line 998

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
GitCommitId                    v6.0.0-alpha.17-67-g42f2e3ca820d7fd7f9dd57f2bbb90e5da2ab2de0
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1


PS /home/testuser/src/github/PowerShell> uname -a
Linux centospsct 3.10.0-514.2.2.el7.x86_64 #1 SMP Tue Dec 6 23:06:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Activity

  1. JamesWTruher commented on Apr 3, 2017

    @JamesWTruher
    CollaboratorAuthor

    note that this is only on CentOS, Ubuntu does not have this issue

  2. JamesWTruher commented on Apr 3, 2017

    @JamesWTruher
    CollaboratorAuthor

    ok - it boils down to a couple of missing symlinks - somewhere we should be sure that we create the following links in the location where powershell is dropped

    libcrypto.so.1.0.0 -> /lib64/libcrypto.so.10
    libssl.so.1.0.0 -> /lib64/libssl.so.10
    

    otherwise, anyone who is doing dev builds and running tests (or just creating a new pssession) will see the shell fall over.

  3. added
    WG-RemotingPSRP issues with any transport layer
    Issue-BugIssue has been identified as a bug in the product
    on Apr 4, 2017
  4. mklement0 commented on Apr 6, 2017

    @mklement0
    Contributor

    Also happens on macOS 10.12.4.

  5. lf- commented on Apr 10, 2017

    @lf-

    Reproduced with AUR package powershell.

  6. added this to the milestone on Apr 11, 2017
  7. SchmatzS commented on Apr 20, 2017

    @SchmatzS

    Trying on macOS 10.12.4 to connect to Exchange Online Remote Powershell via:
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic -AllowRedirection

    and getting the exact same error. How to fix that?

    Thanks in advance ;-)

  8. joeyaiello commented on Apr 20, 2017

    @joeyaiello
    Contributor

    James Truher (@JamesWTruher) If this test is in our standard Start-PSPester invocation, how do we catch it earlier on other platforms?

  9. modified the milestones: , on May 15, 2017
  10. modified the milestones: , on May 15, 2017
  11. JamesWTruher commented on May 23, 2017

    @JamesWTruher
    CollaboratorAuthor

    it looks like this is part of the build process. It appears that some symlinks aren't getting created. Investigating a fix now.

  12. mklement0 commented on May 24, 2017

    @mklement0
    Contributor

    Re macOS, without understanding the deeper issues: on macOS 10.12.5 with today's master branch, Start-PSPester no longer crashes (though 4 other tests fails).

  13. joeyaiello commented on May 30, 2017

    @joeyaiello
    Contributor

    Can James Truher (@JamesWTruher) confirm? Just want to make sure we're repro-ing success on a totally clean machine.

  14. JamesWTruher commented on Jul 21, 2017

    @JamesWTruher
    CollaboratorAuthor

    fixed with commit 4df979a, the symlinks are now created for RedHatFamily os's. on macOS 10.12.5 I don't see the catastrophic failure. Michael Klement (@mklement0) which 4 tests are failing?

    I'm going to close this now, please feel free to open another issue with more details for the other platforms. As for #4029, can we get a simpler repro? When I try those steps with a bogus credential I get a reasonable response (authentication failure)

  15. mklement0 commented on Jul 22, 2017

    @mklement0
    Contributor

    James Truher (@JamesWTruher): Getting builds and tests to succeed on macOS is a moving target, unfortunately, which gets in the way of contributing.

    For the latest symptoms on macOS, see #4324

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Issue-BugIssue has been identified as a bug in the productOS-LinuxResolution-FixedThe issue is fixed.WG-Maintainers-Buildspecific to affecting the buildWG-RemotingPSRP issues with any transport layer

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions