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

Memory leak in terminal support #111562

Closed
solomatov opened this issue Dec 1, 2020 · 4 comments
Closed

Memory leak in terminal support #111562

solomatov opened this issue Dec 1, 2020 · 4 comments
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member insiders-released Patch has been released in VS Code Insiders terminal Integrated terminal issues verified Verification succeeded
Milestone

Comments

@solomatov
Copy link
Contributor

  • VSCode Version: 1.51.1
  • OS Version: Darwin x64 19.6.0

Steps to Reproduce:

  1. Open a terminal
  2. Type in the following: while true; do echo test; done
  3. Observe memory consumption: it will increase, and eventually the VS Code will die with a OOM

Does this issue occur when all extensions are disabled?: No

I investigated why it happened, and root caused it to a memory leak in xterm.js

It's possible to work around this issue by getting a buffer once, on xterm object creation, and using this object instead of a terminal.buffer. I checked, and it fixed the above problem. The memory consumption is stable, and vs code doesn't die.

@meganrogge meganrogge added the terminal Integrated terminal issues label Dec 2, 2020
@kieferrm kieferrm added this to the December/January 2021 milestone Dec 11, 2020
@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member labels Dec 17, 2020
@meganrogge
Copy link
Contributor

meganrogge commented Dec 17, 2020

I'm not seeing this happen in local VS code windows - only remote. Is that what you're seeing too @solomatov ?

@solomatov
Copy link
Contributor Author

solomatov commented Dec 17, 2020

@meganrogge I had it in both cases, but in case of the remote it was showing much faster, but your version, and configuration is likely different from mine.

@meganrogge
Copy link
Contributor

meganrogge commented Jan 4, 2021

fixing this upstream in Xterm.js and tweaked in this one

@github-actions
Copy link

This bug has been fixed in to the latest release of VS Code Insiders!

@solomatov, you can help us out by confirming things are working as expected in the latest Insiders release. If things look good, please leave a comment with the text /verified to let us know. If not, please ensure you're on version 1a9dd75 of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

Happy Coding!

@connor4312 connor4312 added the verified Verification succeeded label Jan 29, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Feb 20, 2021
lemanschik pushed a commit to code-oss-dev/code that referenced this issue Nov 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member insiders-released Patch has been released in VS Code Insiders terminal Integrated terminal issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@solomatov @connor4312 @kieferrm @meganrogge and others