You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Greg Harris (Jira)" <ji...@apache.org> on 2024/05/15 01:51:00 UTC
[jira] [Created] (KAFKA-16768) SocketServer leaks accepted SocketChannel instances due to race condition
Greg Harris created KAFKA-16768:
-----------------------------------
Summary: SocketServer leaks accepted SocketChannel instances due to race condition
Key: KAFKA-16768
URL: https://issues.apache.org/jira/browse/KAFKA-16768
Project: Kafka
Issue Type: Bug
Components: core
Affects Versions: 3.8.0
Reporter: Greg Harris
The SocketServer has threads for Acceptors and Processors. These threads communicate via Processor#accept/Processor#configureNewConnections and the `newConnections` queue.
During shutdown, the Acceptor and Processors are each stopped by setting shouldRun to false, and then shutdown proceeds asynchronously in all instances together. This leads to a race condition where an Acceptor accepts a SocketChannel and queues it to a Processor, but that Processor instance has already started shutting down and has already drained the newConnections queue.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)