Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-2150

FetcherThread backoff need to grab lock before wait on condition.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Saw the following error:
      kafka.api.ProducerBounceTest > testBrokerFailure STANDARD_OUT
      [2015-04-25 00:40:43,997] ERROR [ReplicaFetcherThread-0-0], Error due to (kafka.server.ReplicaFetcherThread:103)
      java.lang.IllegalMonitorStateException
      at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:127)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1239)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.fullyRelease(AbstractQueuedSynchronizer.java:1668)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2107)
      at kafka.server.AbstractFetcherThread.doWork(AbstractFetcherThread.scala:95)
      at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:60)
      [2015-04-25 00:40:47,064] ERROR [ReplicaFetcherThread-0-1], Error due to (kafka.server.ReplicaFetcherThread:103)
      java.lang.IllegalMonitorStateException
      at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:127)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1239)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer.fullyRelease(AbstractQueuedSynchronizer.java:1668)
      at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2107)
      at kafka.server.AbstractFetcherThread.doWork(AbstractFetcherThread.scala:95)
      at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:60)
      We should grab the lock before waiting on the condition.

        Attachments

        1. KAFKA-2150.patch
          1 kB
          Harsha
        2. KAFKA-2150_2015-04-25_13:35:36.patch
          3 kB
          Harsha
        3. KAFKA-2150_2015-04-25_13:18:35.patch
          1 kB
          Harsha
        4. KAFKA-2150_2015-04-25_13:14:05.patch
          3 kB
          Harsha

          Issue Links

            Activity

              People

              • Assignee:
                sriharsha Harsha
                Reporter:
                becket_qin Jiangjie Qin
                Reviewer:
                Guozhang Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: