Skip to content

Memory leak in terminal support #111562

Closed
Closed

Description

  • 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.

Activity

  1. added
    terminal
    on Dec 2, 2020
  2. added
    bug
    confirmed
    on Dec 17, 2020
  3. meganrogge commented on Dec 17, 2020

    @meganrogge
    Collaborator

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

  4. solomatov commented on Dec 17, 2020

    @solomatov
    ContributorAuthor

    Megan Rogge (@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.

  5. meganrogge commented on Jan 4, 2021

    @meganrogge
    Collaborator

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

  6. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Jan 6, 2021
  7. added
    author-verification-requested
    on Jan 27, 2021
  8. github-actions commented on Jan 27, 2021

    @github-actions
    Contributor

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

    Konstantin Solomatov (@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!

  9. locked and limited conversation to collaborators on Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

author-verification-requestedbugconfirmedinsiders-releasedterminalverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions