Anonymous classes are piling up and filling up PErmGen, eventually causing a
crash
----------------------------------------------------------------------------------
Key: JRUBY-4981
URL: http://jira.codehaus.org/browse/JRUBY-4981
Project: JRuby
Issue Type: Bug
Components: Java Integration
Affects Versions: JRuby 1.5.1, JRuby 1.5
Reporter: Jay McGaffigan
Priority: Blocker
Attachments: loader.rb
In building and testing a SInatra app we ran into an issue where we were
running out of PermGem space. We were able to isolate it down to the attached
test case.
Please not that the test case has 2 different ways to call sort on a
JavaUtil::ArrayList
The first call surfaces teh PermGen problem.
y = x.sort { |a,b| a <=> b }
The second call to sort (which is commented out in the attached file) does NOT
have the Permgen problem:
y = x.to_a.sort { |a,b| a <=> b }
Run with the following switches in order to see that anonymous classes pile up.
jruby -J-XX:+TraceClassLoading -J-XX:+TraceClassUnloading loader.rb
I've not looked into the jruby source code (was going to do that next) but it
seems like jruby is hanging onto these anonymous classes. If they are being
cached is there a way to expire the cache?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email