You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "John Roesler (Jira)" <ji...@apache.org> on 2020/07/07 14:46:00 UTC

[jira] [Commented] (KAFKA-10243) ConcurrentModificationException while processing connection setup timeouts

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

John Roesler commented on KAFKA-10243:
--------------------------------------

Hey all, it seems like this is fixing a regression in 2.5.1/2.6.0 . Should it be a blocker and tagged for those releases?

> ConcurrentModificationException while processing connection setup timeouts
> --------------------------------------------------------------------------
>
>                 Key: KAFKA-10243
>                 URL: https://issues.apache.org/jira/browse/KAFKA-10243
>             Project: Kafka
>          Issue Type: Bug
>          Components: network
>            Reporter: Rajini Sivaram
>            Assignee: David Jacot
>            Priority: Major
>             Fix For: 2.7
>
>
> From [~guozhang] in [https://github.com/apache/kafka/pull/8683:]
> {quote}
> java.util.ConcurrentModificationException
> 	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1445)
> 	at java.util.HashMap$KeyIterator.next(HashMap.java:1469)
> 	at org.apache.kafka.clients.NetworkClient.handleTimedOutConnections(NetworkClient.java:822)
> 	at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:574)
> 	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:265)
> 	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:236)
> 	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:215)
> 	at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.joinGroupIfNeeded(AbstractCoordinator.java:419)
> 	at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureActiveGroup(AbstractCoordinator.java:359)
> {quote}
> While processing connection set up timeouts, we are iterating through the connecting nodes to process timeouts and we disconnect within the loop, removing the entry from the set in the loop that it iterating over the set:
> {code}
>     for (String nodeId : connectingNodes) {
>             if (connectionStates.isConnectionSetupTimeout(nodeId, now)) {
>                 this.selector.close(nodeId);
>                 log.debug(
>                     "Disconnecting from node {} due to socket connection setup timeout. " +
>                     "The timeout value is {} ms.",
>                     nodeId,
>                     connectionStates.connectionSetupTimeoutMs(nodeId));
>                 processDisconnection(responses, nodeId, now, ChannelState.LOCAL_CLOSE);
>             }
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)