Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 4166 invoked from network); 6 Oct 2005 07:25:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Oct 2005 07:25:14 -0000 Received: (qmail 27512 invoked by uid 500); 6 Oct 2005 07:25:13 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 27477 invoked by uid 500); 6 Oct 2005 07:25:12 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 27466 invoked by uid 99); 6 Oct 2005 07:25:12 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2005 00:25:10 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id CC0F3220 for ; Thu, 6 Oct 2005 09:24:49 +0200 (CEST) Message-ID: <1649490007.1128583489833.JavaMail.jira@ajax.apache.org> Date: Thu, 6 Oct 2005 09:24:49 +0200 (CEST) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Reopened: (DERBY-23) just booting jdbc driver and shutting down seem to leak memory In-Reply-To: <1124230864.1096485692128.JavaMail.apache@nagoya> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-23?page=all ] Knut Anders Hatlen reopened DERBY-23: ------------------------------------- As I have mentioned on derby-dev earlier, there is a problem with the current fix. After the fix was committed, store/encryptDatabase.sql sometimes failed because one or more rawStoreDaemon threads printed a NullPointerException to System.err. For an example, see: http://www.multinet.no/~solberg/public/Apache/TinderBox_Derby/testlog/SunOS-5.10_i86pc-i386/290646-encryptionCFB_diff.txt The reason for this is that the fix nulls out the reference from the ContextService to the list of ContextManagers when the ContextService is stopped. Some threads with references to the ContextService might still be alive when the ContextService is stopped, and they get NullPointerExceptions when accessing the stopped ContextService. I have only been able to reproduce this behaviour with the store/encryptDatabase.sql test on multi-cpu machines running with a heavy background load. It seems like the threads that get NullPointerExceptions are orphan threads (like the ones described in DERBY-594) that have not yet been able to start because of the heavy background load. The problem might go away when DERBY-594 is resolved, but I think it needs further investigation. > just booting jdbc driver and shutting down seem to leak memory > -------------------------------------------------------------- > > Key: DERBY-23 > URL: http://issues.apache.org/jira/browse/DERBY-23 > Project: Derby > Type: Bug > Components: Services > Versions: 10.0.2.0 > Reporter: Tulika Agrawal > Assignee: Knut Anders Hatlen > Priority: Minor > Fix For: 10.2.0.0 > Attachments: DERBY-23-with_comments.diff, DERBY-23.diff, DERBY-23.stat > > Reporting for Daniel John Debrunner. > Doing simple boot and shutdown of the driver in a loop > seem to grow the heap forever: > new org.apache.derby.jdbc.EmbeddedDriver(); //boot the driver > DriverManager.getConnection("jdbc:derby:;shutdown=true"); > //shutdown the cloudscape instance completely > after booting and shutting down 1516 times, memory used is > ~~41931056 bytes. > Sample GC Output: > 1931.93: [Full GC 43484K->43243K(65088K), 0.1779751 secs] > 1933.13: [Full GC 43511K->43270K(65088K), 0.1914383 secs] > 1934.47: [Full GC 43538K->43297K(65088K), 0.1808878 secs] > 1935.68: [Full GC 43564K->43324K(65088K), 0.4461623 secs] > 1937.43: [Full GC 43591K->43350K(65088K), 0.1842980 secs] > 1938.63: [Full GC 43617K->43377K(65088K), 0.1873431 secs] > 1939.85: [Full GC 43644K->43404K(65088K), 0.1948505 secs] > 1941.07: [Full GC 43671K->43430K(65088K), 0.1790895 secs] -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira