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] [Commented] (DERBY-5703) Threads are stuck in ActiveLock.waitForGrant
Date Mon, 07 May 2012 14:48:50 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13269668#comment-13269668
] 

Knut Anders Hatlen commented on DERBY-5703:
-------------------------------------------

This problem might have the same cause as DERBY-4279. That bug report suggest that setting
derby.language.statementCacheSize to 0 could be used as a workaround (but it might hurt performance).
                
> Threads are stuck in ActiveLock.waitForGrant
> --------------------------------------------
>
>                 Key: DERBY-5703
>                 URL: https://issues.apache.org/jira/browse/DERBY-5703
>             Project: Derby
>          Issue Type: Bug
>          Components: Services
>    Affects Versions: 10.8.2.2
>         Environment: Embedded
>            Reporter: Valery Labuzhsky
>         Attachments: threadDumb.txt
>
>
> It seems that every thread waits until someone awake it, but there is nobody to do it.
> It happens after some time of work of application. Application can work one hour or one
day before it happens, and I cannot write simple test to reproduce this behavior. But it 100%
reproducible.
> I set derby.locks.waitTimeout to infinity. ( derby.locks.waitTimeout=-1 ) If this option
is not set in infinity then application simple crash with acquire lock timeout error.
> I don't think it is a deadlock. Because when deadlock happends there is special deadlock
exception which don't appear in my case.
> Here is the thread dumb:
> INFO   | jvm 1    |   205970 | "SEND_THREAD_POOL[9]" prio=6 tid=0x0362c800 nid=0xd68
in Object.wait() [0x0453e000]
> INFO   | jvm 1    |   205970 |    java.lang.Thread.State: WAITING (on object monitor)
> INFO   | jvm 1    |   205970 | 	at java.lang.Object.wait(Native Method)
> INFO   | jvm 1    |   205970 | 	at java.lang.Object.wait(Object.java:485)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.services.locks.ActiveLock.waitForGrant(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	- locked <0x20a08208> (a org.apache.derby.impl.services.locks.ActiveLock)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.services.locks.ConcurrentLockSet.lockObject(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.services.locks.AbstractPool.lockObject(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.services.locks.ConcurrentPool.lockObject(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.store.raw.xact.RowLocking2.lockContainer(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.store.raw.data.BaseContainerHandle.useContainer(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.store.raw.xact.Xact.openContainer(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.store.access.conglomerate.OpenConglomerate.init(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.store.access.heap.Heap.open(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.store.access.RAMTransaction.openConglomerate(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.store.access.RAMTransaction.openCompiledConglomerate(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.store.access.btree.index.B2IForwardScan.init(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.store.access.btree.index.B2I.openScan(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.store.access.RAMTransaction.openScan(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.store.access.RAMTransaction.openCompiledScan(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.sql.execute.TableScanResultSet.openScanController(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.sql.execute.TableScanResultSet.openCore(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet.openCore(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.sql.execute.JoinResultSet.openCore(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.sql.execute.JoinResultSet.openCore(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.sql.execute.JoinResultSet.openCore(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.sql.execute.JoinResultSet.openCore(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	- locked <0x20a08c68> (a org.apache.derby.impl.jdbc.EmbedConnection40)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown
Source)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.loader.Loader.doQuery(Loader.java:802)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.loader.Loader.loadEntity(Loader.java:2037)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3268)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1090)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.impl.SessionImpl.get(SessionImpl.java:1005)
> INFO   | jvm 1    |   205970 | 	at org.hibernate.impl.SessionImpl.get(SessionImpl.java:998)
> Full thread in attach.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message