Skip to content

ClosePseudoConsole API hanging #1810

@sbatten

Description

@sbatten

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.175]

Any other software? Visual Studio Code Insiders

Steps to reproduce

  1. Launch VS Code Insiders.
  2. Ensure using conpty with setting: terminal.integrated.windowsEnableConpty
  3. Open a terminal with Ctrl+`
  4. Close the terminal with the trash can icon
  5. Repeat 3 and 4 until the window hangs. It takes around 10 retries on my machine.

Expected behavior

No hanging.

Actual behavior

The window hangs. Using windbg, I see the following:

conpty_stack
conpty_locals
conpty_leftovers

Notice the many leftover conhosts in the task manager as well as the hang in ClosePseudoConsole.

Here is the link to the code in node-pty calling into the PseudoConsole API.
https://github.com/microsoft/node-pty/blob/04445ed76f90b4f56a190982ea2d4fcdd22a0ee7/src/win/conpty.cc#L429

/cc @daimms

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-ServerDown in the muck of API call servicing, interprocess communication, eventing, etc.Issue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsPriority-1A description (P1)Product-ConptyFor console issues specifically related to conptySeverity-CrashCrashes are real bad news.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions