accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Vines (JIRA)" <>
Subject [jira] [Updated] (ACCUMULO-1379) PermGen leak
Date Wed, 11 Sep 2013 18:34:51 GMT


John Vines updated ACCUMULO-1379:

    Attachment: ACCUMULO-1379_v3.patch

Version 3 of the patch. Added the finalize() method that just explains why it tries nothing
and throws a warning if the ZKI wasn't closed.

I put the counting semaphore in the ZKI because the code that gets ZooKeepers and ThriftThreadPools
is static and singleton-ish, so there's really no place to put in a counting semaphore directly
in there without replumbing a lot of the client code. This is a larger issue of how we want
to utilize thrift/ZK with statics that is outside the scope of this ticket.

I did test this by creating two seperate ZKIs in a test, scan with them, close one, wait,
and then close the other and it did work. So I think this satisfies what we're gunning for,
albeit in a someone clunky way.
>  PermGen leak 
> --------------
>                 Key: ACCUMULO-1379
>                 URL:
>             Project: Accumulo
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 1.4.3, 1.5.0
>         Environment: Linux/JBoss
>            Reporter: Mike Giordano
>            Assignee: John Vines
>             Fix For: 1.6.0
>         Attachments: ACCUMULO-1379.patch, ACCUMULO-1379_v2.patch, ACCUMULO-1379_v3.patch
> Under version 1.3.7 we are using the following code to initialize a cloudbase connection
during initialization of our web app:
>                         ZooKeeperInstance instance = new ZooKeeperInstance(instanceName,
>                         connector = instance.getConnector(userId, password.getBytes());
> The problem is that under the hood, this call creates several threads that are not cleaned
up when the app is undeployed in JBoss. This is occurring without performing any scans or
interacting with cloudbase in any other way. After relatively few redeploys of the app, the
PermGen Space is OOM.
> I can't find any reference in the cloudbase API akin to a close() method for the Connector
object. This is a classloader leak effecting any webapp that is accessing cloudbase directly.
The result of this leak is not simply orphaned threads, but thousands of classes not gc'd
because the classloader itself can't be gc'd. This is what is filling up PermGen.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message