Uploaded image for project: 'Commons Pool'
  1. Commons Pool
  2. POOL-147

Thread stuck in GenericObjectPool borrowObject()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.1
    • Fix Version/s: 1.5.2
    • Labels:
      None

      Description

      In my application I found a thread stuck at GenericObjectPool.borrowObject(GenericObjectPool.java:1099) even though resources were availbale (in my case connections for DBCP).
      After an analysis of the code I think I spotted what could have caused this behavior. GenericObjectPool.java:1099 line corresponds to an indefinite wait to a "latch" object. This wait should be awaken when new resources are made available to the pool. The problem is likely that borrowObject enters in wait without performing "latch.getPair()" check in a critical section.

        Attachments

        1. 01-borrowObject.patch
          2 kB
          Giambattista Bloisi

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              giamby Giambattista Bloisi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: