kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajini Sivaram (Jira)" <j...@apache.org>
Subject [jira] [Resolved] (KAFKA-10243) ConcurrentModificationException while processing connection setup timeouts
Date Tue, 07 Jul 2020 15:50:00 GMT

     [ https://issues.apache.org/jira/browse/KAFKA-10243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rajini Sivaram resolved KAFKA-10243.
------------------------------------
      Reviewer: Rajini Sivaram
    Resolution: Fixed

> 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)

Mime
View raw message