Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.2.2
    • Fix Version/s: 1.3
    • Labels:
      None

      Description

      Patch attached, dead lock reported. the abandonedtrace does synchronized(this) when it really only needs to do synchronized(this.trace)

      Dead lock reported when using the evictor

      =============================
      "Timer-3":
      waiting to lock monitor 0x0000000053b40548 (object 0x00002aaabf3210f0, a
      org.apache.tomcat.dbcp.dbcp.PoolableConnection),
      which is held by "TP-Processor27"
      "TP-Processor27":
      waiting to lock monitor 0x0000000053b404d0 (object 0x00002aaab9fa8b08, a
      org.apache.tomcat.dbcp.pool.impl.GenericObjectPool),
      which is held by "Timer-3"

      Java stack information for the threads listed above:
      ===================================================
      "Timer-3":
      at
      org.apache.tomcat.dbcp.dbcp.AbandonedTrace.addTrace(AbandonedTrace.java:175)

      • waiting to lock <0x00002aaabf3210f0> (a
        org.apache.tomcat.dbcp.dbcp.PoolableConnection)
        at
        org.apache.tomcat.dbcp.dbcp.AbandonedTrace.init(AbandonedTrace.java:92)
        at
        org.apache.tomcat.dbcp.dbcp.AbandonedTrace.<init>(AbandonedTrace.java:82)
        at
        org.apache.tomcat.dbcp.dbcp.DelegatingStatement.<init>(DelegatingStatement.java:61)
        at
        org.apache.tomcat.dbcp.dbcp.DelegatingConnection.createStatement(DelegatingConnection.java:224)
        at
        org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:331)
        at
        org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312)
        at
        org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.evict(GenericObjectPool.java:1217)
      • locked <0x00002aaab9fa8b08> (a
        org.apache.tomcat.dbcp.pool.impl.GenericObjectPool)
        at
        org.apache.tomcat.dbcp.pool.impl.GenericObjectPool$Evictor.run(GenericObjectPool.java:1341)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
        "TP-Processor27":
        at
        org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool(GenericObjectPool.java:1136)
      • waiting to lock <0x00002aaab9fa8b08> (a
        org.apache.tomcat.dbcp.pool.impl.GenericObjectPool)
        at
        org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.returnObject(GenericObjectPool.java:1076)
        at
        org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:87)
      • locked <0x00002aaabf3210f0> (a
        org.apache.tomcat.dbcp.dbcp.PoolableConnection)
        ....

        Activity

        Filip Hanik created issue -
        Hide
        Filip Hanik added a comment -

        Patch to properly synchronize the abandoned trace object

        Show
        Filip Hanik added a comment - Patch to properly synchronize the abandoned trace object
        Filip Hanik made changes -
        Field Original Value New Value
        Attachment deadlock-abandoned-trace.patch [ 12384770 ]
        Hide
        Filip Hanik added a comment -

        Same patch as before, but no whitespace inclusions as the previous one

        Show
        Filip Hanik added a comment - Same patch as before, but no whitespace inclusions as the previous one
        Filip Hanik made changes -
        Attachment deadlock-abandoned-trace.patch [ 12384772 ]
        Filip Hanik made changes -
        Attachment deadlock-abandoned-trace.patch [ 12384770 ]
        Hide
        Phil Steitz added a comment -

        Pactch applied. Thanks!

        This patch also resolves the last deadlock reported in DBCP-44.

        Show
        Phil Steitz added a comment - Pactch applied. Thanks! This patch also resolves the last deadlock reported in DBCP-44 .
        Phil Steitz made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Phil Steitz made changes -
        Fix Version/s 1.3 [ 12311977 ]
        Hide
        Sebb added a comment -

        Note that the patch also adds synchronisation to the getTrace() method.

        Show
        Sebb added a comment - Note that the patch also adds synchronisation to the getTrace() method.
        Phil Steitz made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        9h 32m 1 Phil Steitz 27/Jun/08 03:51
        Resolved Resolved Closed Closed
        597d 23h 44m 1 Phil Steitz 15/Feb/10 02:35

          People

          • Assignee:
            Unassigned
            Reporter:
            Filip Hanik
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development