Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 956A420049E for ; Thu, 10 Aug 2017 16:19:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 93C8216B5E7; Thu, 10 Aug 2017 14:19:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B2ABA16B5E3 for ; Thu, 10 Aug 2017 16:19:04 +0200 (CEST) Received: (qmail 89887 invoked by uid 500); 10 Aug 2017 14:19:03 -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 89753 invoked by uid 99); 10 Aug 2017 14:19:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Aug 2017 14:19:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id AC1DFC023E for ; Thu, 10 Aug 2017 14:19:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id uiYoUlO_Lg8o for ; Thu, 10 Aug 2017 14:19:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E57475FB98 for ; Thu, 10 Aug 2017 14:19:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 71CC2E0045 for ; Thu, 10 Aug 2017 14:19:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2BA4721E14 for ; Thu, 10 Aug 2017 14:19:00 +0000 (UTC) Date: Thu, 10 Aug 2017 14:19:00 +0000 (UTC) From: "Brett Bergquist (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (DERBY-6955) All database threads stuck and not making any progress MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 10 Aug 2017 14:19:05 -0000 Brett Bergquist created DERBY-6955: -------------------------------------- Summary: All database threads stuck and not making any progress Key: DERBY-6955 URL: https://issues.apache.org/jira/browse/DERBY-6955 Project: Derby Issue Type: Bug Components: Store Affects Versions: 10.10.2.0 Environment: Solaris 10 Very large database (about 750G) with about 100 tx/second insertion rate Network Server Reporter: Brett Bergquist Attachments: stacktrace1, stacktrace2 A system in production got into a very strange state with none of the database engine threads making any progress. Initially a connection could be made to the network server, but any query would hang. The network server also hung on shutdown. The lack of progresss was observed by generating 6 stack traces, 10 seconds apart. Each of these stack traces show the threads exactly as in the previous stack trace. I will attach 2 of the stack traces which are 10 seconds apart. About half of the threads were in a call chain the looks like: {code:java} "DRDAConnThread_161" #187 prio=5 os_prio=64 tid=0x0000000101f1c800 nid=0xd6 waiting on condition [0xfffffffcad0fe000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0xfffffffefa4524c8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitUninterruptibly(AbstractQueuedSynchronizer.java:1976) at org.apache.derby.impl.services.cache.CacheEntry.waitUntilIdentityIsSet(Unknown Source) at org.apache.derby.impl.services.cache.ConcurrentCache.getEntry(Unknown Source) at org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown Source) at org.apache.derby.impl.store.access.RAMAccessManager.conglomCacheFind(Unknown Source) at org.apache.derby.impl.store.access.RAMTransaction.findConglomerate(Unknown Source) at org.apache.derby.impl.store.access.RAMTransaction.findExistingConglomerate(Unknown Source) at org.apache.derby.impl.store.access.RAMTransaction.openStoreCost(Unknown Source) at org.apache.derby.impl.sql.compile.CompilerContextImpl.getStoreCostController(Unknown Source) at org.apache.derby.impl.sql.compile.FromBaseTable.getStoreCostController(Unknown Source) at org.apache.derby.impl.sql.compile.FromBaseTable.estimateCost(Unknown Source) at org.apache.derby.impl.sql.compile.OptimizerImpl.estimateTotalCost(Unknown Source) at org.apache.derby.impl.sql.compile.OptimizerImpl.costBasedCostOptimizable(Unknown Source) at org.apache.derby.impl.sql.compile.OptimizerImpl.costOptimizable(Unknown Source) at org.apache.derby.impl.sql.compile.FromBaseTable.optimizeIt(Unknown Source) at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(Unknown Source) at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(Unknown Source) at org.apache.derby.impl.sql.compile.SelectNode.optimize(Unknown Source) at org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(Unknown Source) at org.apache.derby.impl.sql.compile.CursorNode.optimizeStatement(Unknown Source) at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source) at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source) at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.(Unknown Source) at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source) - locked <0xffffffff12e07950> (a org.apache.derby.impl.jdbc.EmbedConnection40) at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source) at org.apache.derby.impl.drda.DRDAStatement.prepare(Unknown Source) at org.apache.derby.impl.drda.DRDAStatement.explicitPrepare(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.parsePRPSQLSTT(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source) {code} and the majority of the others look like: {code java} "DRDAConnThread_118" #144 prio=5 os_prio=64 tid=0x0000000101072800 nid=0xab in Object.wait() [0xfffffffd342fe000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:502) at org.apache.derby.impl.store.raw.log.LogToFile.flush(Unknown Source) - locked <0xfffffffd605393c0> (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.log.FileLogger.flush(Unknown Source) at org.apache.derby.impl.store.raw.xact.Xact.prepareCommit(Unknown Source) at org.apache.derby.impl.store.raw.xact.Xact.xa_commit(Unknown Source) at org.apache.derby.impl.store.access.RAMTransaction.xa_commit(Unknown Source) at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.doCommit(Unknown Source) at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.xaCommit(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.xa_commit(Unknown Source) - locked <0xfffffffef72c71d8> (a org.apache.derby.impl.jdbc.EmbedConnection40) at org.apache.derby.jdbc.XATransactionState.xa_commit(Unknown Source) - eliminated <0xfffffffefa7b2958> (a org.apache.derby.jdbc.XATransactionState) at org.apache.derby.jdbc.EmbedXAResource.commit(Unknown Source) - locked <0xfffffffefa7b2958> (a org.apache.derby.jdbc.XATransactionState) - locked <0xffffffff5343b4c0> (a org.apache.derby.jdbc.EmbedXAResource) at org.apache.derby.impl.drda.DRDAXAProtocol.commitXATransaction(Unknown Source) at org.apache.derby.impl.drda.DRDAXAProtocol.commitTransaction(Unknown Source) at org.apache.derby.impl.drda.DRDAXAProtocol.parseSYNCCTL(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source) {code} An interesting thing with the second one is the lock on - locked <0xfffffffd605393c0> (a org.apache.derby.impl.store.raw.log.LogToFile) Multiple threads claim to have locked this object which I find concerning as one would assume that only one thread could have a lock at a time. See the attached stack trace and you will see that there are many threads that seem to have locked this object and are in the same state. -- This message was sent by Atlassian JIRA (v6.4.14#64029)