[
http://jira.jboss.com/jira/browse/JBAS-3971?page=all ]
Brian Stansberry updated JBAS-3971:
-----------------------------------
Attachment: simplewar-020207.html
Attached is a JBoss Profiler report generated by
org.jboss.test.classloader.leak.test.ClassloaderLeakUnitTestCase against the current
Branch_4_2 code base.
If the test is showing classloaders being leaked, this kind of report can be generated by
adding the JBoss Profiler JVMTI library (jbossAgent.dll or jbossAgent.so) to the AS bin
directory and modifying the JBoss startup script to pass -agentlib:jbossAgent to java. If
any of the tests show a classloader leak, a report like the attached will be logged to the
server log at INFO level. The report traces references to the leaked classloader.
The attached report shows the webapp classloader leaked due to
http://issues.apache.org/bugzilla/show_bug.cgi?id=41034. This is fixed in the Tomcat 6
code base, but not in the 2.0.0.snapshot version of the jbossweb jars currently integrated
in Branch_4_2.
Add basic classloader leakage tests
-----------------------------------
Key: JBAS-3971
URL:
http://jira.jboss.com/jira/browse/JBAS-3971
Project: JBoss Application Server
Issue Type: Task
Security Level: Public(Everyone can see)
Components: ClassLoading
Reporter: Brian Stansberry
Assigned To: Brian Stansberry
Fix For: JBossAS-4.2.0.CR1
Attachments: simplewar-020207.html
Add basic tests for classloader leaks following deployment, use and undeployment of
various packages (wars, ejb jars and ears with and without scoped classloaders).
As part of deploy setup, test drivfer will deploy a sar with a service that deployments
can use to register their classloader. Service will maintain a WeakReference to the
classloader.
Test will deploy various packages and invoke operations on them (web requests and remote
ejb invocations). Deployments will register their classloader, and during invocations
will log using commons-logging (thus testing for leaks via commons-logging). Test driver
will then undeploy the package check with the service to see if the classloader was
released.
If JBoss Profiler is on the path and -agentlib:jbossAgent is passed to java, if the
classloader is not released the service will generate and log a report tracing references
to the classloader. This can be used to isolate the cause of the leak.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira