Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5560

Java deadlock between LogicalConnection40 and ClientXAConnection40 (patch attached)

    XMLWordPrintableJSON

Details

    • Urgent
    • High Value Fix, Patch Available
    • Crash, Performance, Seen in production

    Description

      There is a Java deadlock between LogicalConnection40 and ClientXAConnection40. The order of calls that cause the deadlock are:

      Thread 1


      LogicalConnection.close
      ClientPooledConnection.recycleConnection

      Thread 2


      ClientPooledConnection.close
      LogicalConnection.nullPhysicalConnection

      Thread 1 acquires a lock on the LogicalConnection and attempts to acquire a lock on the ClientPooledConnection
      Thread 2 acquires a lock on the ClientPooledConnection and attempts to acquire a lock on the LogicalConnection

      In production this occurs when one thread is committing a transaction and another thread is trying to close the connection. This occurred because the Glassfish connection pool is setup to close all connections on any error on any connection and an error has been detected on another connection in the pool.

      Attachments

        1. DERBY-5560.patch
          4 kB
          Brett Bergquist

        Activity

          People

            kmarsden Katherine Marsden
            bbergquist Brett Bergquist
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: