GitHub user jiangxb1987 opened a pull request: https://github.com/apache/spark/pull/18096
[SPARK-18406][CORE][Backport-2.0] Race between end-of-task and completion iterator read lock release This is a backport PR to 2.0 and 2.1. ## What changes were proposed in this pull request? When a TaskContext is not propagated properly to all child threads for the task, just like the reported cases in this issue, we fail to get to TID from TaskContext and that causes unable to release the lock and assertion failures. To resolve this, we have to explicitly pass the TID value to the `unlock` method. ## How was this patch tested? Add new failing regression test case in `RDDSuite`. You can merge this pull request into a Git repository by running: $ git pull https://github.com/jiangxb1987/spark completion-iterator-2.0 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/18096.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #18096 ---- commit c85afb2c5e12abc7c0d7abde315f16ed54b48f7e Author: Xingbo Jiang <xingbo.ji...@databricks.com> Date: 2017-05-24T07:43:23Z [SPARK-18406][CORE] Race between end-of-task and completion iterator read lock release When a TaskContext is not propagated properly to all child threads for the task, just like the reported cases in this issue, we fail to get to TID from TaskContext and that causes unable to release the lock and assertion failures. To resolve this, we have to explicitly pass the TID value to the `unlock` method. Add new failing regression test case in `RDDSuite`. Author: Xingbo Jiang <xingbo.ji...@databricks.com> Closes #18076 from jiangxb1987/completion-iterator. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org