JPPF Issue Tracker
Please log in to bookmark issues
CLOSED  Bug report JPPF-162  -  OOME: PermGen space in a node after many reconnections
Posted Jun 26, 2013 - updated Dec 27, 2014
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Bug report
  • Status
  • Assigned to
  • Progress
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
  • Owned by
    Not owned by anyone
  • Category
  • Resolution
  • Priority
  • Reproducability
  • Severity
  • Targetted for
    icon_milestones.png JPPF 3.3.x
Issue description
As said in the title ...
Steps to reproduce this issue
  • start a driver with "jppf.recovery.enabled = true"
  • start a node with the "jppf.recovery.enabled = true" and "jppf.jvm.options = -server -XX:MaxPermSize=16m"
  • run the following code:
public class RecoveryLeakRunner {
  public static void main(final String...args) {
    try {
      for (int i=1; i<=50; i++) {
        if (i > 1) Thread.sleep(5000L);
        System.out.println("iteration " + i);
        JMXDriverConnectionWrapper jmx = new JMXDriverConnectionWrapper("", 11191, false);
        while (!jmx.isConnected()) Thread.sleep(10L);
        jmx.restartShutdown(10L, 10L);
        try {
        } catch (Exception ignore) {
        System.out.println("iteration " + i + " done");
    } catch(Exception e) {
  • after some time, you can notice (in VisualVM) that the number of classes loaded by the node has increased drmatically, and the node ends up with "java.lang.OutOfMemoryError: PermGen space"

Comment posted by
Jun 29, 07:42
I have identified several problems:
  • a reference is kept from the shutdown hook defined in ResourceCache via the thread's context class loader. This should be fixed by setting the context class laoder to null before adding the shutdown hook.
  • there is a leak of the CPUTimeCollector and PeriodicTask threads, also with a reference to the JPPFClassLoader via the context class loader. These threads need to be stopped upon disconnection of the node, since they xon't be used anymore.
Comment posted by
Jun 29, 12:33
Fixed. Changes committed to SVN:

The issue was updated with the following change(s):
  • This issue has been closed
  • The status has been updated, from New to Closed.
  • This issue's progression has been updated to 100 percent completed.
  • The resolution has been updated, from Not determined to RESOLVED.
  • Information about the user working on this issue has been changed, from lolo4j to Not being worked on.