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

Closing a conpty terminal can hang the window #76548

Closed
Tyriar opened this issue Jul 3, 2019 · 10 comments
Closed

Closing a conpty terminal can hang the window #76548

Tyriar opened this issue Jul 3, 2019 · 10 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues terminal Integrated terminal issues terminal-conpty Integrated terminal issues related to the ConPTY backend upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Jul 3, 2019

microsoft/terminal#1810

@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code) freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues terminal Integrated terminal issues windows VS Code on Windows issues terminal-conpty Integrated terminal issues related to the ConPTY backend labels Jul 3, 2019
@Tyriar Tyriar added this to the Backlog milestone Jul 3, 2019
@Tyriar Tyriar self-assigned this Jul 3, 2019
@Tyriar
Copy link
Member Author

Tyriar commented Jul 4, 2019

This is causing integration tests to fail under conpty #75689

@Tyriar
Copy link
Member Author

Tyriar commented Jul 27, 2019

Console team's issue: microsoft/terminal#1810

@Tyriar
Copy link
Member Author

Tyriar commented Aug 8, 2019

@alexr00 this is caused by inherit cursor position which was a fix for terminals that have already been written to before the process launches (just tasks). We have 2 options to workaround the crashes:

  • Only enable the flag for ter minals that have already been written to, we don't need to pass around as I just need to know if TerminalInstance.write was called. There's still a chance of a crash but it should rarely happen as the most common repro is creating a bunch of terminals and killing them immediately.
  • Disable the flag completely and move tasks to winpty again.

@alexr00
Copy link
Member

alexr00 commented Aug 8, 2019

Option 1. Conpty is the way of the future and I'd rather we keep finding new bugs there than seeing the same old winpty bugs.

@Tyriar Tyriar modified the milestones: Backlog, August 2019 Aug 8, 2019
Tyriar added a commit that referenced this issue Aug 8, 2019
@Tyriar
Copy link
Member Author

Tyriar commented Aug 8, 2019

I'm going to call this fixed in August with this workaround, while a hang likely can still occur it should be very tough to reproduce just with tasks. If people are hitting it they can avoid using the flag completely by configuring the task to not show the intro line and not reuse terminals.

@Tyriar Tyriar closed this as completed Aug 8, 2019
@Tyriar
Copy link
Member Author

Tyriar commented Aug 16, 2019

@usernamehw
Copy link
Contributor

usernamehw commented Sep 22, 2019

The upstream issue microsoft/terminal#1810 (comment) was fixed. Will the fix be included in 1.39 or does it depend on Windows update?

@Tyriar
Copy link
Member Author

Tyriar commented Sep 23, 2019

@usernamehw depends on a Windows update and the fix is too complicated to backport.

@Tyriar
Copy link
Member Author

Tyriar commented Oct 9, 2019

Fixed upstream, closing. You may see this until updating to Windows >1903, other windows crashes tracked in #71966

@Tyriar
Copy link
Member Author

Tyriar commented Mar 3, 2021

Not sure why I reopened this, see #71966

@Tyriar Tyriar closed this as completed Mar 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues terminal Integrated terminal issues terminal-conpty Integrated terminal issues related to the ConPTY backend upstream Issue identified as 'upstream' component related (exists outside of VS Code) windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

3 participants