Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 97632 invoked from network); 30 Jul 2007 13:33:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jul 2007 13:33:24 -0000 Received: (qmail 51738 invoked by uid 500); 30 Jul 2007 13:33:16 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 51640 invoked by uid 500); 30 Jul 2007 13:33:16 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 51551 invoked by uid 99); 30 Jul 2007 13:33:16 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2007 06:33:16 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jul 2007 13:33:15 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C7C6C7141F4 for ; Mon, 30 Jul 2007 06:32:54 -0700 (PDT) Message-ID: <28370061.1185802374809.JavaMail.jira@brutus> Date: Mon, 30 Jul 2007 06:32:54 -0700 (PDT) From: "Donald Woods (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Updated: (GERONIMO-3326) ClassLoader memory leak caused by OpenJPA In-Reply-To: <14269021.1184644264783.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/GERONIMO-3326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Donald Woods updated GERONIMO-3326: ----------------------------------- Priority: Blocker (was: Critical) > ClassLoader memory leak caused by OpenJPA > ----------------------------------------- > > Key: GERONIMO-3326 > URL: https://issues.apache.org/jira/browse/GERONIMO-3326 > Project: Geronimo > Issue Type: Bug > Security Level: public(Regular issues) > Components: persistence > Affects Versions: 2.0-M7 > Reporter: Kevan Miller > Assignee: Kevan Miller > Priority: Blocker > Fix For: 2.0 > > Attachments: OpenJPAMemLeak-G.patch, OpenJPAMemLeak-OJPA.patch > > > As David Jencks mentioned in GERONIMO-3305, there's a ClassLoader memory leak in deploy/undeploy. > Geronimo is running out of PermGen space in some simple deploy/undeploy scenarios involving OpenJPA. The cause of the problem seems to be the _metas table in PCRegistry. _metas is a ConcurrentReferenceHashMap with WEAK reference keys and HARD reference values. The keys are the PersistenceCapable classes. While the values are the metadata for these classes which are maintained by the internal Meta class. > The cause of the ClassLoader memory leak is simple -- if any of the objects/classes held by the Meta class (e.g. fieldTypes) have also been loaded by the same ClassLoader used to load the PersistenceCapable class, the PersistenceCapable class (the weak key) will never be GCed. The value of the HashMap entry will always maintain a hard reference to the ClassLoader. Since the ClassLoader will never be GC'ed, the the the pcClass Class object will never be GC'able... > The problem can be easily recreated using current Geronimo trunk and the Geronimo Daytrader application. > FYI, here are the GC Roots for one of our ClassLoaders being leaked -- http://people.apache.org/~kevan/PCRegistryLeak.html > I've contacted the OpenJPA dev list. Hopefully, can get this resolved, quickly. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.