You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Anish Shrigondekar (Jira)" <ji...@apache.org> on 2025/09/11 21:59:00 UTC

[jira] [Assigned] (SPARK-53549) Fix the list state memory leak issue due to an unclosed Arrow allocator

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

Anish Shrigondekar reassigned SPARK-53549:
------------------------------------------

    Assignee: Huanli Wang

> Fix the list state memory leak issue due to an unclosed Arrow allocator
> -----------------------------------------------------------------------
>
>                 Key: SPARK-53549
>                 URL: https://issues.apache.org/jira/browse/SPARK-53549
>             Project: Spark
>          Issue Type: Bug
>          Components: Structured Streaming
>    Affects Versions: 4.1.0, 4.0.0, 4.0.1
>            Reporter: Huanli Wang
>            Assignee: Huanli Wang
>            Priority: Major
>              Labels: pull-request-available
>
> We create a [TransformWithStateInPySparkDeserializer|https://github.com/apache/spark/blob/7201e60bb3e898f65db5045ec293c650e14cfa95/sql/core/src/main/scala/org/apache/spark/sql/execution/python/streaming/TransformWithStateInPySparkStateServer.scala#L460-L464] every time when we process a list state request. Inside [TransformWithStateInPySparkDeserializer|https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/python/streaming/TransformWithStateInPySparkDeserializer.scala#L40], a child allocator is created from the *ArrowUtils.rootAllocator* when a new deserializer instance is created. However, we neither close this child allocator nor call rootAllocator.close, which leads to a memory leak in TWSStateServer.



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