-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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 when transpiling modules during bootstrap #24380
Comments
To be more specific, the parser leak occurs when |
@nathanwhit confirmed that the parser leak originates in SWC: swc-project/swc#9126 |
SWC fixed the mentioned problem in https://github.com/swc-project/swc/blob/main/CHANGELOG.md#1612---2024-07-06 I think we need to update deno_ast to benefit from it, which seems to be quite involved. |
This commit fixes memory leak described in #24380. This is done by upgrading following crates: - deno_ast - deno_graph - eszip - dprint-plugin-typescript - deno_lint - deno_doc - deno_emit
Can this be closed now that #24490 was merged and released? |
I can confirm that this particular leak is gone in Deno 1.45! 🚀 (Still watching #24169, which will hopefully land soon.) |
We're using Deno in a FaaS setup and noticed that our server processes leak a lot of memory. Digging deeper, I found several leaks related to Deno/V8.
Here's a repro running a worker in a loop: https://github.com/mlafeldt/deno-memleak
Instruments screenshot from the repo:
The heaviest frame indicates a leak in
deno_ast
/swc_ecma_parser
, but I'm mostly speculating.As @bartlomieju told me, the leak in CFunctionInfo/CTypeInfo is being fixed by denoland/deno_core#714 / #24169.
There's at least one more (related?) leak in
deno_core::runtime::setup::create_isolate_ptr
, which is still present after applying the mentioned CFunctionInfo/CTypeInfo fix.Deno version: 1.44.4 (deno_runtime 0.166.0)
The text was updated successfully, but these errors were encountered: