commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Giriraj Vengurleker" <gvengurle...@serus.com>
Subject DBCP deadlock issue
Date Fri, 16 Mar 2007 19:55:20 GMT
We see a deadlock in the dbcp code when we use it in Tomcat. 

 

We are using commons-pool-1.3.jar and commons-dbcp-1.2.1.jar with Tomcat
5.0.28 and JDK 1.5 update 10. 

 

Anyone see this before?

 

Thanks

 

 

Found one Java-level deadlock:

=============================

"TP-Processor5":

  waiting to lock monitor 0x0000000001d4ca08 (object 0x0000000094a820c8, a
org.apache.commons.pool.impl.StackKeyedObjectPool),

  which is held by "Finalizer"

"Finalizer":

  waiting to lock monitor 0x0000000001d4d208 (object 0x0000000094a82030, a
org.apache.commons.dbcp.PoolingConnection),

  which is held by "TP-Processor5"

 

Java stack information for the threads listed above:

===================================================

"TP-Processor5":

        at
org.apache.commons.pool.impl.StackKeyedObjectPool.borrowObject(StackKeyedObj
ectPool.java:123)

        - waiting to lock <0x0000000094a820c8> (a
org.apache.commons.pool.impl.StackKeyedObjectPool)

        at
org.apache.commons.dbcp.PoolingConnection.prepareStatement(PoolingConnection
.java:103)

        - locked <0x0000000094a82030> (a
org.apache.commons.dbcp.PoolingConnection)

        at
org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConn
ection.java:199)

        at
org.apache.commons.dbcp.PoolingDriver$PoolGuardConnectionWrapper.prepareStat
ement(PoolingDriver.java:343)

        at
com.serus.db.connections.SerusConnection.prepareStatement(SerusConnection.ja
va:182)

        at
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.prepareStatement(St
atementsForClassImpl.java:233)

        at
org.apache.ojb.broker.accesslayer.StatementsForClassImpl.getPreparedStmt(Sta
tementsForClassImpl.java:151)

        at
org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement(Stat
ementManager.java:606)

        at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(JdbcAccessImpl
.java:271)

        at
org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(RsQueryObject.j
ava:72)

        at
org.apache.ojb.broker.accesslayer.RsIterator.<init>(RsIterator.java:189)

        at
org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(RsIterator
FactoryImpl.java:58)

        at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Pers
istenceBrokerImpl.java:2205)

        at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(Persis
tenceBrokerImpl.java:1736)

        at
org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorByQuery(Persiste
nceBrokerImpl.java:1723)

        at
org.apache.ojb.broker.accesslayer.BasePrefetcher.prefetchRelationship(BasePr
efetcher.java:110)

        at
org.apache.ojb.broker.core.QueryReferenceBroker.performRetrievalTasks(QueryR
eferenceBroker.java:385)

        at
org.apache.ojb.broker.accesslayer.BasePrefetcher.prefetchRelationship(BasePr
efetcher.java:119)

        at
org.apache.ojb.broker.core.QueryReferenceBroker.performRetrievalTasks(QueryR
eferenceBroker.java:385)

        at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryRe
ferenceBroker.java:180)

        at
org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(QueryRe
ferenceBroker.java:267)

        at
org.apache.ojb.broker.core.QueryReferenceBroker.doRetrieveCollection(QueryRe
ferenceBroker.java:768)

        at
org.apache.ojb.broker.core.QueryReferenceBroker.retrieveCollection(QueryRefe
renceBroker.java:726)

        at
org.apache.ojb.broker.core.QueryReferenceBroker.doRetrieveCollections(QueryR
eferenceBroker.java:984)

        at
org.apache.ojb.broker.core.QueryReferenceBroker.retrieveCollections(QueryRef
erenceBroker.java:951)

        at
org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.materializeFullObject(Ob
jectCacheTwoLevelImpl.java:413)

        at
org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.lookup(ObjectCacheTwoLev
elImpl.java:380)

        at
org.apache.ojb.broker.cache.CacheDistributor.lookup(CacheDistributor.java:11
4)

        at
org.apache.ojb.broker.cache.MaterializationCache.lookup(MaterializationCache
.java:146)

        at
org.apache.ojb.broker.core.QueryReferenceBroker.retrieveReference(QueryRefer
enceBroker.java:418)

        at
org.apache.ojb.broker.core.QueryReferenceBroker.retrieveReferences(QueryRefe
renceBroker.java:542)

        at
org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.materializeFullObject(Ob
jectCacheTwoLevelImpl.java:412)

        at
org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.lookup(ObjectCacheTwoLev
elImpl.java:380)

        at
org.apache.ojb.broker.cache.CacheDistributor.lookup(CacheDistributor.java:11
4)

        at
org.apache.ojb.broker.cache.MaterializationCache.lookup(MaterializationCache
.java:146)

        at
org.apache.ojb.broker.core.QueryReferenceBroker.retrieveReference(QueryRefer
enceBroker.java:418)

        at
org.apache.ojb.broker.core.QueryReferenceBroker.retrieveReferences(QueryRefe
renceBroker.java:542)

        at
org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.materializeFullObject(Ob
jectCacheTwoLevelImpl.java:412)

        at
org.apache.ojb.broker.cache.ObjectCacheTwoLevelImpl.lookup(ObjectCacheTwoLev
elImpl.java:380)

        at
org.apache.ojb.broker.cache.CacheDistributor.lookup(CacheDistributor.java:11
4)

        at
org.apache.ojb.broker.cache.MaterializationCache.lookup(MaterializationCache
.java:146)

        at
org.apache.ojb.broker.accesslayer.PlainPrefetcher.buildPrefetchQueries(Plain
Prefetcher.java:120)

        at
org.apache.ojb.broker.accesslayer.BasePrefetcher.prefetchRelationship(BasePr
efetcher.java:106)

        at
org.apache.ojb.broker.core.QueryReferenceBroker$PBPrefetchingListener.prefet
ch(QueryReferenceBroker.java:1138)

        at
org.apache.ojb.broker.core.QueryReferenceBroker$PBMaterializationListener.be
foreMaterialization(QueryReferenceBroker.java:1072)

        at
org.apache.ojb.broker.core.proxy.AbstractIndirectionHandler.beforeMaterializ
ation(AbstractIndirectionHandler.java:152)

        at
org.apache.ojb.broker.core.proxy.AbstractIndirectionHandler.getRealSubject(A
bstractIndirectionHandler.java:377)

        at
org.apache.ojb.broker.core.proxy.AbstractIndirectionHandler.invoke(AbstractI
ndirectionHandler.java:352)

        at
com.serus.dto.wip.AllocationDTO$$EnhancerByCGLIB$$a92013a0.getSalesOrder(<ge
nerated>)

        at
com.serus.action.modWipManagement.LotCompositeViewForm.formatAllocations(Lot
CompositeViewForm.java:747)

        at
com.serus.action.modWipManagement.LotCompositeViewAction.perform(LotComposit
eViewAction.java:122)

        at com.serus.controller.MainServlet.doGet(MainServlet.java:411)

...        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

        at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)

        at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)

        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)

        at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)

        at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)

        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)

        at java.lang.Thread.run(Thread.java:595)

"Finalizer":

        at
org.apache.commons.dbcp.AbandonedTrace.removeTrace(AbandonedTrace.java:221)

        - waiting to lock <0x0000000094a82030> (a
org.apache.commons.dbcp.PoolingConnection)

        at
org.apache.commons.dbcp.PoolablePreparedStatement.passivate(PoolablePrepared
Statement.java:100)

        at
org.apache.commons.dbcp.PoolingConnection.passivateObject(PoolingConnection.
java:239)

        at
org.apache.commons.pool.impl.StackKeyedObjectPool.returnObject(StackKeyedObj
ectPool.java:158)

        - locked <0x0000000094a820c8> (a
org.apache.commons.pool.impl.StackKeyedObjectPool)

        at
org.apache.commons.dbcp.PoolablePreparedStatement.close(PoolablePreparedStat
ement.java:78)

        at
org.apache.commons.dbcp.DelegatingStatement.close(DelegatingStatement.java:1
65)

        at
org.apache.ojb.broker.accesslayer.StatementManager.closeResources(StatementM
anager.java:96)

        at
org.apache.ojb.broker.accesslayer.ResultSetAndStatement.close(ResultSetAndSt
atement.java:64)

        at
org.apache.ojb.broker.accesslayer.RsIterator.release(RsIterator.java:870)

        at
org.apache.ojb.broker.accesslayer.RsIterator.releaseDbResources(RsIterator.j
ava:840)

        at
org.apache.ojb.broker.accesslayer.RsIterator.finalize(RsIterator.java:939)

        at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)

        at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)

        at java.lang.ref.Finalizer.access$100(Finalizer.java:14)

        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)

 

Found 1 deadlock.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message