Skip to content

[Bug]: Memory leak with asar #28962

Closed
Closed

Description

@TimoshN

Preflight Checklist

Electron Version

7, 8, 9, 10, 11, 12, 13

What operating system are you using?

Windows

Operating System Version

Windows 10 20H2

What arch are you using?

ia32

Last Known Working Electron version

6.1.12

Expected Behavior

freed memory on close BrowserWindow.

Actual Behavior

main process memory usage constantly grow up and never freed.

Testcase Gist URL

No response

Additional Information

My app have one always active BrowserWindow and perioditically open new BrowserWindow. After some times window close automatically. Main process open alot of file descriptors to app.asar. About 300 for 1 hour of app usage ( creating new BrowserWindow every 30sec and close it after 2min). and use ~300mb.

Activity

  1. pushkin- commented on May 3, 2021

    @pushkin-

    Dupe of this?

  2. TimoshN commented on May 3, 2021

    @TimoshN
    Author

    I am not sure. With asar memory leak far more noticeble then without asar

  3. gpetrov commented on May 17, 2021

    @gpetrov

    Any progress on this?

    We see double memory usage just by running from ASAR. Not really related to browserWindows being open and closed.
    The double memory usage is for both and the main and the renderer processes.
    There must be something fundamentally wrong with asar and requiring modules from it. Probably the buffer memory never gets cleared.

    This is quite an issue for us and we are considering dumping the asar usage just because of it.

  4. dsanders11 commented on Jun 10, 2021

    @dsanders11
    Member

    This should be fixed in versions v12.0.11 and v13.1.2 by #29293. @TimoshN, can you try one of those versions and confirm the leak is fixed?

  5. MarshallOfSound commented on Jun 10, 2021

    @MarshallOfSound
    Member

    Edit on the above, it went out in v13.1.2

  6. dsanders11 commented on Jun 10, 2021

    @dsanders11
    Member

    @MarshallOfSound, I was going off of the release notes for v13.1.1, I guess those are off?

  7. TimoshN commented on Jun 10, 2021

    @TimoshN
    Author

    sadly, but no. 765 FD attached to main process after 4hours. Electron v13.1.1

  8. dsanders11 commented on Jun 11, 2021

    @dsanders11
    Member

    @TimoshN, apparently it didn't make it into v13.1.1, sorry about that. Could you try v13.1.2?

  9. TimoshN commented on Jun 11, 2021

    @TimoshN
    Author

    @dsanders11 Yes. v13.1.2 fix it. Works like a charm now!

  10. dsanders11 commented on Jun 11, 2021

    @dsanders11
    Member

    Thanks for confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions