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

Deadlock in WorkerSourceTask

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 0.9.0.0, 0.10.0.0
    • KafkaConnect
    • None

    Description

      There is a potential deadlock due to synchronization used around both the producer.send() and in the produce callback in WorkerSourceTask. This can be triggered, for example, if:

      1. WorkerSourceTask work thread is running sendRecords and therefore owns the lock on itself, then invokes producer.send() and needs a metadata update (sending to a new topic), which causes it to wait on the Metadata class, which is notified by the Sender thread when it has updated metadata.
      2. Sender thread is processing a message completion, invokes the callback in WorkerSourceTask, which then tries to invoke recordSent, which needs to acquire the WorkerSourceTask lock. It will wait on this lock and never process the metadata update request, so the other thread will never proceed either.

      Attachments

        Activity

          People

            ewencp Ewen Cheslack-Postava
            ewencp Ewen Cheslack-Postava
            Gwen Shapira Gwen Shapira
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: