Apache Sling ClassLoader Leak Detector

Clone this repo:
  1. d9ebd25 Updating badges for org-apache-sling-extensions-classloader-leak-detector by Radu Cotescu · 12 months ago master
  2. 657451e SLING-7245 - Validate pull requests using Jenkins by Robert Munteanu · 12 months ago
  3. ab30292 trivial: added license header to *.md files by Radu Cotescu · 1 year, 4 months ago
  4. f2852f8 SLING-7215 - [nice-to-have] Add a CONTRIBUTING file to every module by Radu Cotescu · 1 year, 4 months ago
  5. 7916438 SLING-7216 - [nice-to-have] Add a CODE_OF_CONDUCT file to every module by Radu Cotescu · 1 year, 4 months ago

Build Status Maven Central JavaDocs License

Apache Sling ClassLoader Leak Detector

This module is part of the Apache Sling project.

This bundle provides support for tracing classloader leaks which occur due to improper cleanup in bundles. Refer to SLING-3359 for background details.

The bundle registers a Felix Configuration Printer which dumps out a list of suspected classloaders which are not getting garbage collected. It can be accessed at http://localhost:8080/system/console/status-leakdetector

Possible classloader leak detected
Number of suspicious bundles - 1

* org.apache.sling.sample.leakdetector.bad-bundle (0.0.1.SNAPSHOT) - Classloader Count [2]
     - Bundle Id - 204
     - Leaked classloaders
         - Identity HashCode - 4a273519, Creation time 31.01.2014 15:22:58.407

JVM Arguments

By default on Oracle JDK the classloaders and related classes from Permgen are not garbage collected by default. This bundle relies on classloaders getting garbage collected for it work. So to enable that pass on following arguments

 -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled