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

ConsumerFetcherThread can deadlock

    Details

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

      Description

      We have the following access pattern that can introduce a deadlock.

      AbstractFetcherThread.processPartitionsWithError() ->
      ConsumerFetcherThread.processPartitionsWithError() ->
      ConsumerFetcherManager.addPartitionsWithError() wait for lock ->
      LeaderFinderThread holding lock while calling AbstractFetcherManager.shutdownIdleFetcherThreads() ->
      AbstractFetcherManager calling fetcher.shutdown, which needs to wait until AbstractFetcherThread.processPartitionsWithError() completes.

        Attachments

        1. kafka-937.patch
          8 kB
          Jun Rao
        2. kafka-937_delta.patch
          1 kB
          Jun Rao
        3. kafka-937_ConsumerOffsetChecker.patch
          1 kB
          Jun Rao

          Activity

            People

            • Assignee:
              junrao Jun Rao
              Reporter:
              junrao Jun Rao
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: