db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DERBY-6110) BrokeredConnection.isClosed() may open a new connection
Date Thu, 14 Mar 2013 08:36:12 GMT
Knut Anders Hatlen created DERBY-6110:
-----------------------------------------

             Summary: BrokeredConnection.isClosed() may open a new connection
                 Key: DERBY-6110
                 URL: https://issues.apache.org/jira/browse/DERBY-6110
             Project: Derby
          Issue Type: Bug
          Components: JDBC
    Affects Versions: 10.8.2.2
            Reporter: Knut Anders Hatlen


I noticed this odd-looking stack trace in the thread dump provided in DERBY-5632:

"DRDAConnThread_22" prio=3 tid=0x0000000101b81800 nid=0x31 waiting for monitor entry [0xfffffffd236fe000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at org.apache.derby.impl.store.access.RAMAccessManager.conglomCacheFind(Unknown Source)
	- waiting to lock <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.openConglomerate(Unknown Source)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getDescriptorViaIndexMinion(Unknown
Source)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getDescriptorViaIndex(Unknown Source)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.locateSchemaRow(Unknown Source)
	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getSchemaDescriptor(Unknown Source)
	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.initDefaultSchemaDescriptor(Unknown
Source)
	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.initialize(Unknown Source)
	at org.apache.derby.impl.db.BasicDatabase.setupConnection(Unknown Source)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.startTransaction(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.checkUserIsNotARole(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.checkUserCredentials(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source)
	at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
	at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
	at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source)
	at org.apache.derby.jdbc.EmbedPooledConnection.openRealConnection(Unknown Source)
	at org.apache.derby.jdbc.EmbedXAConnection.getRealConnection(Unknown Source)
	at org.apache.derby.iapi.jdbc.BrokeredConnection.getRealConnection(Unknown Source)
	at org.apache.derby.iapi.jdbc.BrokeredConnection.isClosed(Unknown Source)
	at org.apache.derby.impl.drda.PiggyBackedSessionData.getInstance(Unknown Source)
	at org.apache.derby.impl.drda.Database.getPiggyBackedSessionData(Unknown Source)
	at org.apache.derby.impl.drda.DRDAConnThread.writePBSD(Unknown Source)
	at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
	at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)

It looks as if BrokeredConnection.isClosed() fails to find a usable physical connection and
then tries to open a new one. Presumably, when this happens, isClosed() will return false.
It sounds more reasonable to return true in such circumstances.

--
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

Mime
View raw message