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

Ismael Juma commented on KAFKA-5595:
------------------------------------

I haven't checked this in detail, but a possibility:

1. There is an inflight response for client c
2. There is a disconnection and reconnection from client c causing us to lose 
the channel state
3. Client c sends another request
4. Because we lost the channel state and we don't drain the response queue on 
disconnections, we may allow 2 inflight responses for the same connection
5. Under the right set of circumstances, this could lead to the 
IllegalStateException reported

Am I missing something?

> Illegal state in SocketServer; attempt to send with another send in progress
> ----------------------------------------------------------------------------
>
>                 Key: KAFKA-5595
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5595
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Jason Gustafson
>
> I have seen this a couple times, but I'm not sure the conditions associated 
> with it. 
> {code}
> java.lang.IllegalStateException: Attempt to begin a send operation with prior 
> send operation still in progress.
>       at 
> org.apache.kafka.common.network.KafkaChannel.setSend(KafkaChannel.java:138)
>       at org.apache.kafka.common.network.Selector.send(Selector.java:248)
>       at kafka.network.Processor.sendResponse(SocketServer.scala:488)
>       at kafka.network.Processor.processNewResponses(SocketServer.scala:466)
>       at kafka.network.Processor.run(SocketServer.scala:431)
>       at java.lang.Thread.run(Thread.java:748)
> {code}
> Prior to this event, I see a lot of this message in the logs (always for the 
> same connection id):
> {code}
> Attempting to send response via channel for which there is no open 
> connection, connection id 7
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to