You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use GraalJS with 'load' enabled (use Context in Java, not Node mode), and use loadWithNewGlobal to run some script (cause it provides new global);
I found that there might be heap issue about this.
I checked heap histogram, and found there is a lot of [com.oracle.truffle.js.runtime.builtins.JSFunctionObject$Unbound]
stayed after full gc.
according to source code
[com.oracle.truffle.js.builtins.GlobalBuiltins.JSGlobalLoadWithNewGlobalNode:1441]
There is a new childRealm created via [com.oracle.truffle.js.runtime.JSRealm#createChildRealm], and not cleared from it's parent's [com.oracle.truffle.js.runtime.JSRealm#innerContextsToClose] when loadWithNewGlobal finished.
The only way to clear all the [com.oracle.truffle.js.runtime.JSRealm#innerContextsToClose]
is to close the whole Context, which I'd like not to do , it's rather expansive.
it is suspected to be a memory leak issue, look forward about a way round or fix.
issue found in GraalVM 21.3.2 JDK11
The text was updated successfully, but these errors were encountered:
It would be great if you could try with 22.1.0+. The code has since been changed (there's no innerContextsToClose list anymore), so this might've already been fixed.
It would be great if you could try with 22.1.0+. The code has since been changed (there's no innerContextsToClose list anymore), so this might've already been fixed.
it's confirmed, there's no memory leak on 22.1.0 Graal CE. will there be fix for 21.3?
And I noticed that there won't be 'children context' concept in 22.1.0, will this change make loadWithNewGlobal more quickly? it costs about 1ms in my case, at GraalVM CE 21.3.2.
Unfortunately, I don't think we are going to backport this change since it's fairly intrusive.
And I noticed that there won't be 'children context' concept in 22.1.0, will this change make loadWithNewGlobal more quickly? it costs about 1ms in my case, at GraalVM CE 21.3.2.
I don't expect any relevant speedup from this, but maybe...
I use GraalJS with 'load' enabled (use Context in Java, not Node mode), and use loadWithNewGlobal to run some script (cause it provides new global);
I found that there might be heap issue about this.
I checked heap histogram, and found there is a lot of [com.oracle.truffle.js.runtime.builtins.JSFunctionObject$Unbound]
stayed after full gc.
according to source code
[com.oracle.truffle.js.builtins.GlobalBuiltins.JSGlobalLoadWithNewGlobalNode:1441]
There is a new childRealm created via [com.oracle.truffle.js.runtime.JSRealm#createChildRealm], and not cleared from it's parent's [com.oracle.truffle.js.runtime.JSRealm#innerContextsToClose] when loadWithNewGlobal finished.
The only way to clear all the [com.oracle.truffle.js.runtime.JSRealm#innerContextsToClose]
is to close the whole Context, which I'd like not to do , it's rather expansive.
it is suspected to be a memory leak issue, look forward about a way round or fix.
issue found in GraalVM 21.3.2 JDK11
The text was updated successfully, but these errors were encountered: