Chetan Mehrotra created SLING-3360: -------------------------------------- Summary: Bundle to detect classloader leaks Key: SLING-3360 URL: https://issues.apache.org/jira/browse/SLING-3360 Project: Sling Issue Type: New Feature Components: Extensions Reporter: Chetan Mehrotra Assignee: Chetan Mehrotra
At times it can happen that bundle might leak classloader due to improper cleanup. This was recently discussed on DL [1]. To enable detection of such bundles we can have a bundle which 1. Have a custom bundle listener. This would maintain some structure around bundle 2. Use Java Phantom reference [1] to register a callback for GC of classloader associated with the bundle. Upon gc callback we remove the information Then have a web console plugin which can look into the current data structure maintained by the listener. It would then check the state against actual active bundle and flag the suspects. And if left over a period of time can easly mark out stale bundles which are leaking. Should not incur any performance cost [1] http://sling.markmail.org/thread/2wg7ijus6ib7ij5t -- This message was sent by Atlassian JIRA (v6.1.5#6160)