Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSEUDOCONSOLE_INHERIT_CURSOR sends DSR CPR to terminal, if the process is closed before a response is received, conhost will max out a core #11213

Closed
Tyriar opened this issue Sep 13, 2021 · 2 comments · Fixed by #17574
Labels
Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-1 A description (P1) Product-Conpty For console issues specifically related to conpty
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Sep 13, 2021

Windows Terminal version (or Windows build number)

19042.1165

Other Software

VS Code/node-pty based on main

Steps to reproduce

  1. Use PSEUDOCONSOLE_INHERIT_CURSOR to when using conpty
  2. Don't respond to CSI 6 n in terminal
  3. Close the terminal program

Expected Behavior

Conpty should handle this more gracefully, perhaps a timeout should be used when the CPR response isn't received and continue on ignoring PSEUDOCONSOLE_INHERIT_CURSOR ?

Actual Behavior

The conhost process maxes out a CPU core


FWIW I worked around the issue by making sure a terminal is available to respond to the sequence on Windows (I'm in the process of building terminal buffer restoration/process revive after restarts).

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Sep 13, 2021
@zadjii-msft
Copy link
Member

Conpty should handle this more gracefully, perhaps a timeout should be used when the CPR response isn't received and continue on ignoring PSEUDOCONSOLE_INHERIT_CURSOR ?

Alternatively, since the end terminal's closed, then presumably the conpty is getting closed, yea? It should probably close gracefully even in this case.

@zadjii-msft zadjii-msft added Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Conpty For console issues specifically related to conpty labels Sep 13, 2021
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Sep 13, 2021
@zadjii-msft zadjii-msft added this to the Terminal v2.0 milestone Sep 13, 2021
@DHowett DHowett removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Sep 16, 2021
@zadjii-msft
Copy link
Member

@miniksa fyi, you're in this bit of the code recently. You may want to be aware of this

@zadjii-msft zadjii-msft modified the milestones: Terminal v2.0, 22H1 Jan 4, 2022
@zadjii-msft zadjii-msft modified the milestones: 22H1, Terminal v1.14 Feb 2, 2022
@zadjii-msft zadjii-msft modified the milestones: Terminal v1.14, 22H2 Mar 10, 2022
@zadjii-msft zadjii-msft modified the milestones: 22H2, Backlog Jul 5, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR This issue has a related PR label Jul 16, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-1 A description (P1) Product-Conpty For console issues specifically related to conpty
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants