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

Memory Leak issue in ScriptingContainer using SingleThreaded LocalContext scope #5077

Closed
adpande opened this issue Mar 3, 2018 · 5 comments

Comments

@adpande
Copy link

adpande commented Mar 3, 2018

Environment

Provide at least:

Other relevant info you may wish to add:

  • Ruby is embeded in Java 8.
  • None

Expected Behavior

  • Ruby should clean up the memory once the script execution is done.

Actual Behavior

Ruby is creating too many runtimes and failing with OOM error.

Code we use to create scripting container:

ScriptingContainer container = new ScriptingContainer(LocalContextScope.SINGLETHREAD,LocalVariableBehavior.TRANSIENT,false);

We are also using a pool of scripting containers and use it.

Probably the issue #4367 again resurfaced.

Here are the MAT analysis of the problem:

ruby-leak1
ruby-leak2
ruby-leak3

@adpande
Copy link
Author

adpande commented Mar 16, 2018

This is a native memory leak. This may be similar to #1791

@headius
Copy link
Member

headius commented Mar 19, 2018

Strange...the MAT report shows paths to root via SoftReference, so I would have expected these things to go away.

@adpande Does the problem exist on JRuby 9.1.16? If so, can you provide a heap dump we can use to investigate?

@adpande
Copy link
Author

adpande commented May 28, 2018

Hello @headius, Sorry for the delay. I will test and try to generate heap dump with v9.1.1.16. Thanks!

@headius
Copy link
Member

headius commented Jun 12, 2018

@adpande Any luck?

@headius
Copy link
Member

headius commented Jul 18, 2020

No respond, closing. If you still have an issue, please open a new bug, since a lot has changed in two years.

@headius headius closed this as completed Jul 18, 2020
@headius headius added this to the Invalid or Duplicate milestone Jul 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants