Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2.10, 2.3.3, 2.4
    • Fix Version/s: 2.2.12, 2.4.1, 2.5
    • Component/s: jackrabbit-core
    • Labels:
      None
    • Environment:
      Java 6
      Jackrabbit 2.2.10
      Derby

      Description

      I found a deadlock situation using JR 2.2.10, the problem is with DBCP 1.2.2 and is fixed in DBCP 1.3, JR trunk also uses DBCP 1.2.2 and should also be updated

      The ticket in dbcp is #DBCP-270, related tickets are #DBCP-65 #DBCP-281 #DBCP-271

      Stack trace of where my call is stalled:

      main@1, prio=5, in group 'main', status: 'MONITOR'
      	 blocks Timer-1@2545
      	 waiting for Timer-1@2545 to release lock on {1}
      	  at org.apache.commons.pool.impl.GenericObjectPool.addObjectToPool(GenericObjectPool.java:1137)
      	  at org.apache.commons.pool.impl.GenericObjectPool.returnObject(GenericObjectPool.java:1076)
      	  at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:87)
      	  at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181)
      	  at org.apache.jackrabbit.core.util.db.DbUtility.close(DbUtility.java:75)
      	  at org.apache.jackrabbit.core.util.db.ResultSetWrapper.invoke(ResultSetWrapper.java:63)
      	  at $Proxy12.close(Unknown Source:-1)
      	  at org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.loadBundle(BundleDbPersistenceManager.java:1042)
      	  at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.getBundle(AbstractBundlePersistenceManager.java:669)
      	  at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.load(AbstractBundlePersistenceManager.java:415)
      	  at org.apache.jackrabbit.core.state.SharedItemStateManager.loadItemState(SharedItemStateManager.java:1830)
      	  at org.apache.jackrabbit.core.state.SharedItemStateManager.getNonVirtualItemState(SharedItemStateManager.java:1750)
      	  at org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(SharedItemStateManager.java:265)
      	  at org.apache.jackrabbit.core.state.LocalItemStateManager.getNodeState(LocalItemStateManager.java:109)
      	  at org.apache.jackrabbit.core.state.LocalItemStateManager.getItemState(LocalItemStateManager.java:174)
      	  at org.apache.jackrabbit.core.state.XAItemStateManager.getItemState(XAItemStateManager.java:260)
      	  at org.apache.jackrabbit.core.state.SessionItemStateManager.getItemState(SessionItemStateManager.java:161)
      	  at org.apache.jackrabbit.core.ItemManager.getItemData(ItemManager.java:382)
      	  at org.apache.jackrabbit.core.ItemManager.getNode(ItemManager.java:669)
      	  at org.apache.jackrabbit.core.ItemManager.getNode(ItemManager.java:647)
      	  at org.apache.jackrabbit.core.LazyItemIterator.prefetchNext(LazyItemIterator.java:120)
      	  at org.apache.jackrabbit.core.LazyItemIterator.next(LazyItemIterator.java:257)
      	  at info.magnolia.jcr.iterator.DelegatingNodeIterator.next(DelegatingNodeIterator.java:79)
      

      This is the offending thread:

      Timer-1@2545 daemon, prio=5, in group 'main', status: 'MONITOR'
      	 blocks main@1
      	 waiting for main@1 to release lock on {1}
      	  at org.apache.commons.dbcp.AbandonedTrace.addTrace(AbandonedTrace.java:176)
      	  at org.apache.commons.dbcp.AbandonedTrace.init(AbandonedTrace.java:92)
      	  at org.apache.commons.dbcp.AbandonedTrace.<init>(AbandonedTrace.java:82)
      	  at org.apache.commons.dbcp.DelegatingStatement.<init>(DelegatingStatement.java:61)
      	  at org.apache.commons.dbcp.DelegatingConnection.createStatement(DelegatingConnection.java:224)
      	  at org.apache.commons.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:331)
      	  at org.apache.commons.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312)
      	  at org.apache.commons.pool.impl.GenericObjectPool.evict(GenericObjectPool.java:1217)
      	  at org.apache.commons.pool.impl.GenericObjectPool$Evictor.run(GenericObjectPool.java:1341)
      	  at java.util.TimerThread.mainLoop(Timer.java:512)
      	  at java.util.TimerThread.run(Timer.java:462)
      

        Activity

        Tobias Mattsson created issue -
        Tobias Mattsson made changes -
        Field Original Value New Value
        Affects Version/s 2.2.10 [ 12318249 ]
        Affects Version/s 2.2.9 [ 12318070 ]
        Environment Java 6
        Jackrabbit 2.2.9
        Derby
        Java 6
        Jackrabbit 2.2.10
        Derby
        Tobias Mattsson made changes -
        Description I found a deadlock situation using JR 2.2.9, the problem is with DBCP 1.2.2 and is fixed in DBCP 1.3, JR trunk also uses DBCP 1.2.2 and should also be updated

        The ticket in dbcp is #DBCP-270, related tickets are #DBCP-65 #DBCP-281 #DBCP-271

        Stack trace of where my call is stalled:
        {code}
        main@1, prio=5, in group 'main', status: 'MONITOR'
        blocks Timer-1@2545
        waiting for Timer-1@2545 to release lock on {1}
        at org.apache.commons.pool.impl.GenericObjectPool.addObjectToPool(GenericObjectPool.java:1137)
        at org.apache.commons.pool.impl.GenericObjectPool.returnObject(GenericObjectPool.java:1076)
        at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:87)
        at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181)
        at org.apache.jackrabbit.core.util.db.DbUtility.close(DbUtility.java:75)
        at org.apache.jackrabbit.core.util.db.ResultSetWrapper.invoke(ResultSetWrapper.java:63)
        at $Proxy12.close(Unknown Source:-1)
        at org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.loadBundle(BundleDbPersistenceManager.java:1042)
        at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.getBundle(AbstractBundlePersistenceManager.java:669)
        at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.load(AbstractBundlePersistenceManager.java:415)
        at org.apache.jackrabbit.core.state.SharedItemStateManager.loadItemState(SharedItemStateManager.java:1830)
        at org.apache.jackrabbit.core.state.SharedItemStateManager.getNonVirtualItemState(SharedItemStateManager.java:1750)
        at org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(SharedItemStateManager.java:265)
        at org.apache.jackrabbit.core.state.LocalItemStateManager.getNodeState(LocalItemStateManager.java:109)
        at org.apache.jackrabbit.core.state.LocalItemStateManager.getItemState(LocalItemStateManager.java:174)
        at org.apache.jackrabbit.core.state.XAItemStateManager.getItemState(XAItemStateManager.java:260)
        at org.apache.jackrabbit.core.state.SessionItemStateManager.getItemState(SessionItemStateManager.java:161)
        at org.apache.jackrabbit.core.ItemManager.getItemData(ItemManager.java:382)
        at org.apache.jackrabbit.core.ItemManager.getNode(ItemManager.java:669)
        at org.apache.jackrabbit.core.ItemManager.getNode(ItemManager.java:647)
        at org.apache.jackrabbit.core.LazyItemIterator.prefetchNext(LazyItemIterator.java:120)
        at org.apache.jackrabbit.core.LazyItemIterator.next(LazyItemIterator.java:257)
        at info.magnolia.jcr.iterator.DelegatingNodeIterator.next(DelegatingNodeIterator.java:79)
        {code}

        This is the offending thread:
        {code}
        Timer-1@2545 daemon, prio=5, in group 'main', status: 'MONITOR'
        blocks main@1
        waiting for main@1 to release lock on {1}
        at org.apache.commons.dbcp.AbandonedTrace.addTrace(AbandonedTrace.java:176)
        at org.apache.commons.dbcp.AbandonedTrace.init(AbandonedTrace.java:92)
        at org.apache.commons.dbcp.AbandonedTrace.<init>(AbandonedTrace.java:82)
        at org.apache.commons.dbcp.DelegatingStatement.<init>(DelegatingStatement.java:61)
        at org.apache.commons.dbcp.DelegatingConnection.createStatement(DelegatingConnection.java:224)
        at org.apache.commons.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:331)
        at org.apache.commons.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312)
        at org.apache.commons.pool.impl.GenericObjectPool.evict(GenericObjectPool.java:1217)
        at org.apache.commons.pool.impl.GenericObjectPool$Evictor.run(GenericObjectPool.java:1341)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
        {code}
        I found a deadlock situation using JR 2.2.10, the problem is with DBCP 1.2.2 and is fixed in DBCP 1.3, JR trunk also uses DBCP 1.2.2 and should also be updated

        The ticket in dbcp is #DBCP-270, related tickets are #DBCP-65 #DBCP-281 #DBCP-271

        Stack trace of where my call is stalled:
        {code}
        main@1, prio=5, in group 'main', status: 'MONITOR'
        blocks Timer-1@2545
        waiting for Timer-1@2545 to release lock on {1}
        at org.apache.commons.pool.impl.GenericObjectPool.addObjectToPool(GenericObjectPool.java:1137)
        at org.apache.commons.pool.impl.GenericObjectPool.returnObject(GenericObjectPool.java:1076)
        at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:87)
        at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:181)
        at org.apache.jackrabbit.core.util.db.DbUtility.close(DbUtility.java:75)
        at org.apache.jackrabbit.core.util.db.ResultSetWrapper.invoke(ResultSetWrapper.java:63)
        at $Proxy12.close(Unknown Source:-1)
        at org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.loadBundle(BundleDbPersistenceManager.java:1042)
        at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.getBundle(AbstractBundlePersistenceManager.java:669)
        at org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.load(AbstractBundlePersistenceManager.java:415)
        at org.apache.jackrabbit.core.state.SharedItemStateManager.loadItemState(SharedItemStateManager.java:1830)
        at org.apache.jackrabbit.core.state.SharedItemStateManager.getNonVirtualItemState(SharedItemStateManager.java:1750)
        at org.apache.jackrabbit.core.state.SharedItemStateManager.getItemState(SharedItemStateManager.java:265)
        at org.apache.jackrabbit.core.state.LocalItemStateManager.getNodeState(LocalItemStateManager.java:109)
        at org.apache.jackrabbit.core.state.LocalItemStateManager.getItemState(LocalItemStateManager.java:174)
        at org.apache.jackrabbit.core.state.XAItemStateManager.getItemState(XAItemStateManager.java:260)
        at org.apache.jackrabbit.core.state.SessionItemStateManager.getItemState(SessionItemStateManager.java:161)
        at org.apache.jackrabbit.core.ItemManager.getItemData(ItemManager.java:382)
        at org.apache.jackrabbit.core.ItemManager.getNode(ItemManager.java:669)
        at org.apache.jackrabbit.core.ItemManager.getNode(ItemManager.java:647)
        at org.apache.jackrabbit.core.LazyItemIterator.prefetchNext(LazyItemIterator.java:120)
        at org.apache.jackrabbit.core.LazyItemIterator.next(LazyItemIterator.java:257)
        at info.magnolia.jcr.iterator.DelegatingNodeIterator.next(DelegatingNodeIterator.java:79)
        {code}

        This is the offending thread:
        {code}
        Timer-1@2545 daemon, prio=5, in group 'main', status: 'MONITOR'
        blocks main@1
        waiting for main@1 to release lock on {1}
        at org.apache.commons.dbcp.AbandonedTrace.addTrace(AbandonedTrace.java:176)
        at org.apache.commons.dbcp.AbandonedTrace.init(AbandonedTrace.java:92)
        at org.apache.commons.dbcp.AbandonedTrace.<init>(AbandonedTrace.java:82)
        at org.apache.commons.dbcp.DelegatingStatement.<init>(DelegatingStatement.java:61)
        at org.apache.commons.dbcp.DelegatingConnection.createStatement(DelegatingConnection.java:224)
        at org.apache.commons.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:331)
        at org.apache.commons.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312)
        at org.apache.commons.pool.impl.GenericObjectPool.evict(GenericObjectPool.java:1217)
        at org.apache.commons.pool.impl.GenericObjectPool$Evictor.run(GenericObjectPool.java:1341)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
        {code}
        Hide
        Tobias Mattsson added a comment -

        Added affects version 2.4 since it also uses DBCP 1.2.2.

        Show
        Tobias Mattsson added a comment - Added affects version 2.4 since it also uses DBCP 1.2.2.
        Tobias Mattsson made changes -
        Affects Version/s 2.4 [ 12318241 ]
        Alex Parvulescu committed 1296226 (1 file)
        Reviews: none

        JCR-3158 Deadlock in DBCP when accessing node

        Hide
        Alex Parvulescu added a comment -

        this looks serious enough.
        I've ran all the tests with DBCP 1.3 and everything passes.

        fixed in revision 1296226.

        Show
        Alex Parvulescu added a comment - this looks serious enough. I've ran all the tests with DBCP 1.3 and everything passes. fixed in revision 1296226.
        Alex Parvulescu made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.5 [ 12319280 ]
        Resolution Fixed [ 1 ]
        Hide
        Grégory Joseph added a comment -

        Any chance of a backport to the 2.4 branch ?

        Show
        Grégory Joseph added a comment - Any chance of a backport to the 2.4 branch ?
        Alex Parvulescu made changes -
        Fix Version/s 2.4.1 [ 12319842 ]
        Fix Version/s 2.6 [ 12319480 ]
        Fix Version/s 2.5 [ 12319280 ]
        Alex Parvulescu committed 1304328 (1 file)
        Reviews: none

        JCR-3158 Deadlock in DBCP when accessing node (ported to 2.4)

        Hide
        Alex Parvulescu added a comment -

        backported to 2.4 in revision 1304328.

        Show
        Alex Parvulescu added a comment - backported to 2.4 in revision 1304328.
        Jukka N committed 1306365 (1 file)
        Reviews: none

        2.4: Update mergeinfo (JCR-3158)

        Jukka N committed 1307473 (2 files)
        Reviews: none

        2.2: Merged revision 1304328 (JCR-3158)

        Hide
        Jukka Zitting added a comment -

        Merged to the 2.2 branch in revision 1307473.

        Show
        Jukka Zitting added a comment - Merged to the 2.2 branch in revision 1307473.
        Jukka Zitting made changes -
        Fix Version/s 2.2.12 [ 12319843 ]
        Alex Parvulescu made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Jukka Zitting made changes -
        Fix Version/s 2.5 [ 12319280 ]
        Fix Version/s 2.6 [ 12319480 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Tobias Mattsson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development