From derby-dev-return-98064-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Mon Sep 24 21:52:08 2012 Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EC729D37C for ; Mon, 24 Sep 2012 21:52:07 +0000 (UTC) Received: (qmail 93487 invoked by uid 500); 24 Sep 2012 21:52:07 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 93464 invoked by uid 500); 24 Sep 2012 21:52:07 -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: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 93456 invoked by uid 99); 24 Sep 2012 21:52:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2012 21:52:07 +0000 Date: Tue, 25 Sep 2012 08:52:07 +1100 (NCT) From: "Brett Bergquist (JIRA)" To: derby-dev@db.apache.org Message-ID: <866857319.118966.1348523527657.JavaMail.jiratomcat@arcas> In-Reply-To: <2102120867.24187.1330370927543.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (DERBY-5632) Logical deadlock happened when freezing/unfreezing the database MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-5632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462172#comment-13462172 ] Brett Bergquist commented on DERBY-5632: ---------------------------------------- I think this should be looked at and improved upon. Even following Mike's comment of trying to perform the freeze/backup/unfreeze using the same connection, I have this fail and lock out of the database occur and not be able to unfreeze. So at a minimum the documentation should be updated indicating that this might happen. > Logical deadlock happened when freezing/unfreezing the database > --------------------------------------------------------------- > > Key: DERBY-5632 > URL: https://issues.apache.org/jira/browse/DERBY-5632 > Project: Derby > Issue Type: Bug > Components: Network Server > Affects Versions: 10.8.2.2 > Environment: Oracle M3000/Solaris 10 > Reporter: Brett Bergquist > Attachments: stack.txt > > > Tried to make a quick database backup by freezing the database, performing a ZFS snapshot, and then unfreezing the database. The database was frozen but then a connection to the database could not be established to unfreeze the database. > Looking at the stack trace of the network server, , I see 3 threads that are trying to process a connection request. Each of these is waiting on: > at org.apache.derby.impl.store.access.RAMAccessManager.conglomCacheFind(Unknown Source) > - waiting to lock <0xfffffffd3a7fcc68> (a org.apache.derby.impl.services.cache.ConcurrentCache) > That object is owned by: > - locked <0xfffffffd3a7fcc68> (a org.apache.derby.impl.services.cache.ConcurrentCache) > at org.apache.derby.impl.store.access.RAMTransaction.findExistingConglomerate(Unknown Source) > at org.apache.derby.impl.store.access.RAMTransaction.openGroupFetchScan(Unknown Source) > at org.apache.derby.impl.services.daemon.IndexStatisticsDaemonImpl.updateIndexStatsMinion(Unknown Source) > at org.apache.derby.impl.services.daemon.IndexStatisticsDaemonImpl.runExplicitly(Unknown Source) > at org.apache.derby.impl.sql.execute.AlterTableConstantAction.updateStatistics(Unknown Source) > which itself is waiting for the object: > at java.lang.Object.wait(Native Method) > - waiting on <0xfffffffd3ac1d608> (a org.apache.derby.impl.store.raw.log.LogToFile) > at java.lang.Object.wait(Object.java:485) > at org.apache.derby.impl.store.raw.log.LogToFile.flush(Unknown Source) > - locked <0xfffffffd3ac1d608> (a org.apache.derby.impl.store.raw.log.LogToFile) > at org.apache.derby.impl.store.raw.log.LogToFile.flush(Unknown Source) > at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.flush(Unknown Source) > So basically what I think is happening is that the database is frozen, the statistics are being updated on another thread which has the "org.apache.derby.impl.services.cache.ConcurrentCache" locked and then waits for the LogToFile lock and the connecting threads are waiting to lock "org.apache.derby.impl.services.cache.ConcurrentCache" to connect and these are where the database is going to be unfrozen. Not a deadlock as far as the JVM is concerned but it will never leave this state either. -- 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: http://www.atlassian.com/software/jira