Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 80052 invoked from network); 24 Sep 2007 16:02:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Sep 2007 16:02:40 -0000 Received: (qmail 40101 invoked by uid 500); 24 Sep 2007 16:02:29 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 39804 invoked by uid 500); 24 Sep 2007 16:02:28 -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 39793 invoked by uid 99); 24 Sep 2007 16:02:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2007 09:02:28 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.18.98.43] (HELO brmea-mail-2.sun.com) (192.18.98.43) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2007 16:02:26 +0000 Received: from dm-uk-02.uk.sun.com ([129.156.101.196]) by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l8OG25wG010981 for ; Mon, 24 Sep 2007 16:02:05 GMT Received: from barman.uk.sun.com (barman.UK.Sun.COM [129.156.132.12]) by dm-uk-02.uk.sun.com (8.13.7+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l8OG25xr010626 for ; Mon, 24 Sep 2007 17:02:05 +0100 (BST) Received: from vpn-129-150-121-224.uk.sun.com ([129.150.121.224]) by barman.uk.sun.com with esmtp (Exim 4.42) id 1IZqQB-0007Ye-Pu for derby-user@db.apache.org; Mon, 24 Sep 2007 17:04:32 +0100 Message-ID: <46F7DF7D.5060608@sun.com> Date: Mon, 24 Sep 2007 17:02:05 +0100 From: Alan Burlison User-Agent: Thunderbird 2.0.0.4 (X11/20070814) MIME-Version: 1.0 To: Derby Discussion Subject: Re: Derby causes PermGen leaks in Tomcat References: <46F7B03C.8040204@sun.com> In-Reply-To: <46F7B03C.8040204@sun.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org > Derby objects are still loaded, and jstack shows several instances of this: > > "derby.antiGC" daemon prio=1 tid=0x088e7000 nid=0xd in Object.wait() > [0xc64ce000..0xc64ceb60] > java.lang.Thread.State: WAITING (on object monitor) > at java.lang.Object.wait(Native Method) > - waiting on <0xcaff88f0> (a > org.apache.derby.impl.services.monitor.AntiGC) > at java.lang.Object.wait(Object.java:485) > at org.apache.derby.impl.services.monitor.AntiGC.run(Unknown > Source) > - locked <0xcaff88f0> (a > org.apache.derby.impl.services.monitor.AntiGC) > at java.lang.Thread.run(Thread.java:619) > > So it's clear that although the Derby server is stopped, it's still > zombified somewhere inside the Tomcat JVM. How do I cleanly and > completely remove Derby from a running JVM? I found this thread that looked relevant: http://www.nabble.com/RE%3A-AntiGC-Not-Shutting-Down-p1217286.html "Shutting down the databases before shutting down the server has solved all of my problems." I've modified my code to do the same, and I've even tried explicitly unloading the Derby JDBC driver, but I still get an instance of AntiGC hanging around, although all the other Derby threads do terminate. I'm using the embedded driver to access the database from other threads within the JVM that Derby is running in, and running the network server to provide external access to the DB. -- Alan Burlison --