Skip to content

SSH interactive remoting Ctrl+Break causes hang in running script #2323

Closed

Description

Ctrl+Break should send a "Break All" message to the remote session and stop the running script in the remote script debugger. But instead the client hangs.

One issue is that the client never sends the Break All signal to the remote session because the server capabilities returned by the session is null, and Break All is implemented only for server sessions running PowerShell V5.0 or greater.

The hang issue seems to be related to SSH. Since its process is also attached to the console it also receives the Ctrl+Break event. The event doesn't terminate SSH client process like Ctrl+C does but it does something so that PSRP data messages no longer arrive at the PowerShell client even though the server PowerShell session continues to send PSRP data and command complete messages.

Need to find out why the remote session does not send server capabilities to client.
Need to find out how Ctrl+Break affects SSH client process.

Steps to reproduce

PS> Enter-PSSession -HostName <hostName> -UserName <userName>
[<hostName>]: PS> 1..100 | foreach { sleep 1; "Output $_" }
Output 1
Output 2
# while script is running type Ctrl+Break

Expected behavior

Running script should break into the remote debugger.

Actual behavior

Client hangs and never receives anymore PSRP messages from server session.

Environment data

Name                           Value
----                           -----
SerializationVersion           1.1.0.1
GitCommitId                    v6.0.0-alpha.10-8-gdd2394b1e6088f6c82054f5cae5520e532010fd4-dirty
PSRemotingProtocolVersion      2.3
WSManStackVersion              3.0
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
CLRVersion
BuildVersion                   3.0.0.0
PSVersion                      6.0.0-alpha
PSEdition                      Core

Activity

  1. added
    WG-Remoting
    on Sep 20, 2016
  2. added this to the milestone on Oct 6, 2016
  3. PaulHigin commented on Dec 7, 2016

    @PaulHigin
    ContributorAuthor

    Un-assigning since I am not currently working on this.

  4. modified the milestones: , on Dec 19, 2016
  5. modified the milestones: , 6.0.0-beta1 on Mar 15, 2017
  6. modified the milestones: , on May 15, 2017
  7. joeyaiello commented on May 25, 2017

    @joeyaiello
    Contributor

    This still causes craziness. We should reassess the priority of this when we triage each project.

  8. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  9. added
    Resolution-No Activity
    on Nov 16, 2023
  10. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  11. microsoft-github-policy-service commented on Nov 23, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-No ActivityWG-Remoting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions