You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Jungtaek Lim (Jira)" <ji...@apache.org> on 2026/08/26 07:51:00 UTC
[jira] [Resolved] (SPARK-58932) TransformWithStateInPySparkStateServer leaks the accepted socket
[ https://issues.apache.org/jira/browse/SPARK-58932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jungtaek Lim resolved SPARK-58932.
----------------------------------
Fix Version/s: 4.3.0
Resolution: Fixed
Issue resolved by pull request 58205
[https://github.com/apache/spark/pull/58205]
> TransformWithStateInPySparkStateServer leaks the accepted socket
> ----------------------------------------------------------------
>
> Key: SPARK-58932
> URL: https://issues.apache.org/jira/browse/SPARK-58932
> Project: Spark
> Issue Type: Bug
> Components: Structured Streaming
> Affects Versions: 4.0.0, 4.1.3
> Reporter: Jiwon Park
> Assignee: Jiwon Park
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.3.0
>
>
> TransformWithStateInPySparkStateServer.run() accepts a connection from the Python worker but never closes it. The task completion listener closes only the listening ServerSocketChannel.
> initStateServer() binds an ephemeral port per task, so every task leaks one socket. On a streaming query with a 10s trigger and 8 shuffle partitions this was measured at 45-51 CLOSE_WAIT sockets per minute, exhausting the ephemeral port range in about 10 hours. After that every new connection fails with BindException.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org