[
https://issues.apache.org/jira/browse/KAFKA-1804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14953062#comment-14953062
]
Ismael Juma commented on KAFKA-1804:
------------------------------------
Note that the code in trunk looks different and the following code was removed:
{code}
catch {
case e: CancelledKeyException => {
debug("Ignoring response for closed socket.")
close(key)
}
}
{code}
There were also some fixes as part of KAFKA-2614.
Furthermore, `Processor.run` and `Acceptor.run` also have try/catch blocks in
trunk. All of this code is in `SocketServer.scala`:
https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/network/SocketServer.scala
So, this looks fixed to me. Could one of the people that have pointed out the
issue in the code verify that my assessment is correct?
> Kafka network thread lacks top exception handler
> ------------------------------------------------
>
> Key: KAFKA-1804
> URL: https://issues.apache.org/jira/browse/KAFKA-1804
> Project: Kafka
> Issue Type: Bug
> Components: core
> Affects Versions: 0.8.2.0
> Reporter: Oleg Golovin
> Priority: Critical
>
> We have faced the problem that some kafka network threads may fail, so that
> jstack attached to Kafka process showed fewer threads than we had defined in
> our Kafka configuration. This leads to API requests processed by this thread
> getting stuck unresponed.
> There were no error messages in the log regarding thread failure.
> We have examined Kafka code to find out there is no top try-catch block in
> the network thread code, which could at least log possible errors.
> Could you add top-level try-catch block for the network thread, which should
> recover network thread in case of exception?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)