You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Patrick Wendell (JIRA)" <ji...@apache.org> on 2014/04/25 05:20:15 UTC

[jira] [Resolved] (SPARK-1615) Very subtle race condition in SparkListenerSuite

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

Patrick Wendell resolved SPARK-1615.
------------------------------------

    Resolution: Fixed

> Very subtle race condition in SparkListenerSuite
> ------------------------------------------------
>
>                 Key: SPARK-1615
>                 URL: https://issues.apache.org/jira/browse/SPARK-1615
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 0.9.1
>            Reporter: Andrew Or
>            Assignee: Andrew Or
>            Priority: Minor
>             Fix For: 1.0.0
>
>
> Much of SparkListenerSuite relies on LiveListenerBus's waitUntilEmpty() method. As the name suggests, this waits until the event queue is empty. However, the following race condition could happen:
> (1) We dequeue the event
> (2) The queue is empty, we return true
> (3) The test asserts something assuming that all listeners have finished executing (and fails)
> (4) The listeners receive the event
> This has been a possible race condition for a long time, but for some reason we've never run into it.



--
This message was sent by Atlassian JIRA
(v6.2#6252)