[ 
https://issues.apache.org/jira/browse/KAFKA-2859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15012174#comment-15012174
 ] 

ASF GitHub Bot commented on KAFKA-2859:
---------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/kafka/pull/554


> Deadlock in WorkerSourceTask
> ----------------------------
>
>                 Key: KAFKA-2859
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2859
>             Project: Kafka
>          Issue Type: Bug
>          Components: copycat
>            Reporter: Ewen Cheslack-Postava
>            Assignee: Ewen Cheslack-Postava
>            Priority: Blocker
>             Fix For: 0.9.0.0
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to