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

[Bug] evalJS memory leak #2950

Open
1 task done
CKY- opened this issue Dec 30, 2024 · 0 comments
Open
1 task done

[Bug] evalJS memory leak #2950

CKY- opened this issue Dec 30, 2024 · 0 comments
Labels
Bug A defect in the app

Comments

@CKY-
Copy link
Collaborator

CKY- commented Dec 30, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

sandbox-eval memory losses, it's creating a unique session for each window, but that's getting left dangling in the ether after it's done. All of the session cleanup functions are async though, so that's a hassle to clean up as-is (clearCache(), clearStorageData(),closeAllConnections(), clearHostResolverCache(), clearAuthCache(), clearCodeCaches(), and/or clearData()). it's set to { cache: false }, so the clear*cache() methods likely won't actually do much, but the data... the data surely doth persist in memory.

Looking deeper, Electron is going to hold onto an ElectronBrowserContext unique_ptr in their static browser_context_map for every session that's created until the app's message loop is shutdown. That's umm... a lot of data per session, and there's no JS-exposed way to free it.
Might be better to limit us to only using maybe up to a dozen sandboxed sessions, and sanitizing each before/after we're done with it.

Expected Behavior

No response

Steps To Reproduce

No response

Version

5.63.2

What operating system are you using Firebot on?

Windows 11

Relevant log output

No response

Contact Details (Optional)

No response

@CKY- CKY- added the Bug A defect in the app label Dec 30, 2024
@github-project-automation github-project-automation bot moved this to Todo in Firebot Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A defect in the app
Projects
Status: Todo
Development

No branches or pull requests

1 participant