[
https://issues.apache.org/jira/browse/SPARK-53807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kousuke Saruta resolved SPARK-53807.
------------------------------------
Fix Version/s: 4.2.0
Assignee: Kousuke Saruta
Resolution: Fixed
Issue resolved by https://github.com/apache/spark/pull/52524
> Fix a race condition issue between `unlock` and `releaseAllLocksForTask` in
> `BlockInfoManager for write locks
> -------------------------------------------------------------------------------------------------------------
>
> Key: SPARK-53807
> URL: https://issues.apache.org/jira/browse/SPARK-53807
> Project: Spark
> Issue Type: Sub-task
> Components: Block Manager, Spark Core
> Affects Versions: 4.1.0
> Reporter: Kousuke Saruta
> Assignee: Kousuke Saruta
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.2.0
>
>
> When `unlock` and `releaseAllLocksForTask` try to release the same lock for a
> task, assertion error can happen.
> This issue can be reproduced by adding following test into
> `BlockInfoManagerSuite`.
> {code}
> val blockId = TestBlockId("block")
> assert(blockInfoManager.lockNewBlockForWriting(blockId, newBlockInfo()))
> blockInfoManager.unlock(blockId)
> // Without the fix the block below almost always fails.
> (0 to 10).foreach { task =>
> withTaskId(task) {
> blockInfoManager.registerTask(task)
> assert(blockInfoManager.lockForWriting(blockId).isDefined)
> val future = Future(blockInfoManager.unlock(blockId, Option(task)))
> blockInfoManager.releaseAllLocksForTask(task)
> ThreadUtils.awaitReady(future, 100.millis)
> }
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]