Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
10.8.2.2
-
None
-
None
-
Embedded
Description
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.
Attachments
Attachments
Issue Links
- duplicates
-
DERBY-4279 Statement cache deadlock
- Closed