Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 83059 invoked from network); 23 May 2007 16:55:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 May 2007 16:55:48 -0000 Received: (qmail 57592 invoked by uid 500); 23 May 2007 16:55:48 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 57545 invoked by uid 500); 23 May 2007 16:55:48 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 57493 invoked by uid 99); 23 May 2007 16:55:48 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2007 09:55:48 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [192.18.98.31] (HELO brmea-mail-1.sun.com) (192.18.98.31) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2007 09:55:41 -0700 Received: from fe-amer-09.sun.com ([192.18.108.183]) by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l4NGtKLZ028842 for ; Wed, 23 May 2007 16:55:20 GMT Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0JII00M0137H4C00@mail-amer.sun.com> (original mail from Robert.Harryman@Sun.COM) for derby-user@db.apache.org; Wed, 23 May 2007 10:55:20 -0600 (MDT) Received: from [129.150.48.5] by mail-amer.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0JII00M9S6WY2BXN@mail-amer.sun.com> for derby-user@db.apache.org; Wed, 23 May 2007 10:53:22 -0600 (MDT) Date: Wed, 23 May 2007 10:50:58 -0600 From: Robert Harryman Subject: Re: derby Static refs to log objects In-reply-to: <46546408.2010909@Sun.COM> Sender: Robert.Harryman@Sun.COM To: Derby Discussion Message-id: <465470F2.9060903@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <46530E4F.8090406@sun.com> <465412F9.5060808@Sun.COM> <46544BE6.7070600@sun.com> <46546408.2010909@Sun.COM> User-Agent: Thunderbird 1.5 (X11/20060113) X-Virus-Checked: Checked by ClamAV on apache.org John Embretsen wrote: > Robert Harryman wrote: > >>> Do you get similar results (references to java.util.logging.Logger) >>> if you run the following query in jhat's OQL tool? >>> >>> select referrers(f) from java.util.logging.Logger f >>> >>> (lists Java objects that hold reference to java.util.logging.Logger) >> I did not see any references in this result. >>> >>> or for example >>> >>> select >>> referees(heap.findClass("org.apache.derby.impl.services.monitor.BaseMonitor")) >>> >>> >>> (returns an array of Java objects to which the given Java object >>> directly refers to). >> [ class java.lang.Class , >> class java.lang.Object , >> com.sun.cacao.impl.ModuleClassLoader@0xf0049378 >> , >> java.security.ProtectionDomain@0xf0061fb0 >> , class >> org.apache.derby.iapi.services.monitor.PersistentService >> , class >> org.apache.derby.io.StorageFactory >> , >> java.util.HashMap@0xf0062128 >> , >> java.lang.String@0xf7b3e730 ] >> >> Is there a way from this result to tell what is keeping the derby >> objects alive? I can see jhat provides >> many useful methods to hunt with, I just don't have the skill yet to >> know what to hunt for. Since this >> is a container there appears to be a shared classloader in the in the >> ancestry, could it have something to >> do with a class being shared? > > I'm on very thin ice here, but yeah, I guess this could be related to > shared classloaders. Anyway, I was just curious to see if those > queries showed references to the logging API, which I would not have > been able to explain. Your OQL results look similar to the results I > get from running a short Derby test, which was somewhat comforting. > There may be some OQL query or some other jhat feature that may be > helpful, but unfortunately I don't have any specific suggestions at > the moment. Others are welcome to chime in! > > You mentioned that you would eventually run out of PermSpace memory if > you do not do anything about this. Did you actually test that, so that > you know it for a fact? I did not push it to the limit but used jConsole's memory tab to watch a series of deploy/undeploys; Permgen just kept ratcheting up. That plus the inspection of objects remaining seemed good reason to try and find out why. > > There was an issue [1] recently with OutOfMemoryErrors after repeated > calls to boot and shutdown a database, it may or may not be related. > It has been fixed in the trunk (and will be included in the next > feature release). If you do run out of memory, and nothing else helps, > you may want to try out some jars from a trunk build (see [2] for easy > access). It sure seems related. Is there a trail of that on this archive? Sorry, this is my first exposure to derby so I'm groping a bit. Thanks again.