jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Theess (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCRRMI-28) Leaking ServerEvent objects after RMI connection loss
Date Tue, 18 May 2010 10:09:46 GMT
Leaking ServerEvent objects after RMI connection loss

                 Key: JCRRMI-28
                 URL: https://issues.apache.org/jira/browse/JCRRMI-28
             Project: Jackrabbit JCR-RMI
          Issue Type: Bug
    Affects Versions: 1.6.0, 2.1.0
         Environment: Windows 7 Pro x64

32Bit Java VM
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
            Reporter: Jens Theess
         Attachments: RMI-Test.zip

When an RMI connection is crashes, or the client is terminated without calling "session.logout()",
the server leaks ServerEventCollection$ServerEvent objects.

Attached is a zip with two java programs that demonstrate the behaviour. Steps to reproduce:
* Open a cmd shell
* cd jcrserver
* mvn compile
* SET MAVEN_OPTS=-Djava.rmi.dgc.leaseValue=10000 && mvn exec:java -Dexec.mainClass=RMIServer

* Open another cmd shell
* cd jcrrmiclient
* mvn compile
* mvn exec:java -Dexec.mainClass=RMIClient

Watch the heap:
* Start VisualVM (you'll need the VisualVM-Sampler plugin)
* Go to the RMIServer process.
* Open the "Sampler" tab and sample "Memory".
* In the filter enter "ServerEvent".

You'll now see the number of ServerEvents (also _Stub and _Skel) steadily increasing.

* Quit the RMIClient using Ctrl-C.

The number of ServerEvents is still increasing, even after the RMI lease time expires.

If, instead of being killed, the client calls "session.logout()", the server stops producing
new ServerEvent instances.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message