-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Labels
Milestone
Description
Environment
JRuby 9.1.13.0
Linux
Using as embedded JSR223 engine
We upgraded from 1.7.21 to 9.1.13.0 to try to address the issue in #4446. But after a simple load test we found that the map in FilenoUtil is accumulating during the test. So I wrote the following simple script to try to reproduce:
Sample Code Snippet
public class Test {
public static void main(String[] args) throws InterruptedException, ScriptException, ClassNotFoundException, IOException {
ScriptEngineManager scriptEngineManager = new ScriptEngineManager();
final ScriptEngine engine = scriptEngineManager.getEngineByName("jruby");
final ScriptContext scriptContext = new SimpleScriptContext();
scriptContext.setAttribute("org.jruby.embed.termination", true, ScriptContext.ENGINE_SCOPE);
engine.eval("print 'test\n'", scriptContext);
System.gc();
Thread.sleep(5000);
System.out.println(Ruby.getGlobalRuntime().getFilenoUtil().getNumberOfWrappers());
}
}
Unexpected Behavior
I got the following output:
test
3
Shouldn't the number be 0?
Is this an issue of the new code or my usage is incorrect for the new update?
Thanks.
Reactions are currently unavailable