Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Labels:
      None
    • Environment:

      Linux,JDK1.6.23,Tomcat6

      Description

      I use the pool2 as a tcp connection pool,when I start tomcat,one thread occur an infinite loop In the advance() method,but it sometimes happens, not always,the java statck information is as follows:

      Thread 2194: (state = IN_JAVA)

      • org.apache.commons.pool2.impl.LinkedBlockingDeque$AbstractItr.advance() @bci=42, line=1163 (Compiled frame; information may be imprecise)
      • org.apache.commons.pool2.impl.LinkedBlockingDeque$AbstractItr.next() @bci=29, line=1184 (Interpreted frame)
      • org.apache.commons.pool2.impl.GenericKeyedObjectPool.clearOldest() @bci=85, line=741 (Interpreted frame)
      • org.apache.commons.pool2.impl.GenericKeyedObjectPool.create(java.lang.Object) @bci=56, line=991 (Interpreted frame)
      • org.apache.commons.pool2.impl.GenericKeyedObjectPool.borrowObject(java.lang.Object, long) @bci=59, line=356 (Interpreted frame)
      • org.apache.commons.pool2.impl.GenericKeyedObjectPool.borrowObject(java.lang.Object) @bci=6, line=277 (Interpreted frame)

      Thread 2195: (state = BLOCKED)

      • sun.misc.Unsafe.park(boolean, long) @bci=0 (Interpreted frame)
      • java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Interpreted frame)
      • java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() @bci=1, line=811 (Interpreted frame)
      • java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(java.util.concurrent.locks.AbstractQueuedSynchronizer$Node, int) @bci=48, line=842 (Interpreted frame)
      • java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=112, line=2033 (Interpreted frame)
      • org.apache.commons.pool2.impl.LinkedBlockingDeque.pollFirst(long, java.util.concurrent.TimeUnit) @bci=50, line=569 (Interpreted frame)
      • org.apache.commons.pool2.impl.GenericKeyedObjectPool.borrowObject(java.lang.Object, long) @bci=105, line=363 (Interpreted frame)
      • org.apache.commons.pool2.impl.GenericKeyedObjectPool.borrowObject(java.lang.Object) @bci=6, line=277 (Interpreted frame)

        Activity

        Hide
        markt Mark Thomas added a comment -

        Clean up report attributes.

        Show
        markt Mark Thomas added a comment - Clean up report attributes.
        Hide
        markt Mark Thomas added a comment -

        I've inspected the code and while I can see a state where an infinite loop could occur, I can't (yet) see a code path that would put the Deque in that state.

        How frequently does this occur?

        Are you able to create a test case for this?

        Does the frequency with which this occurs change if you run on a newer JVM?

        Show
        markt Mark Thomas added a comment - I've inspected the code and while I can see a state where an infinite loop could occur, I can't (yet) see a code path that would put the Deque in that state. How frequently does this occur? Are you able to create a test case for this? Does the frequency with which this occurs change if you run on a newer JVM?
        Hide
        markt Mark Thomas added a comment -

        Found it! Working on a patch now.

        Show
        markt Mark Thomas added a comment - Found it! Working on a patch now.

          People

          • Assignee:
            Unassigned
            Reporter:
            pjlqm lqm
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development