Skip to content

Conversation

@zsxwing
Copy link
Member

@zsxwing zsxwing commented Nov 27, 2015

In StreamingListenerSuite."don't call ssc.stop in listener", after the main thread calls ssc.stop(), StreamingContextStoppingCollector may call ssc.stop() in the listener bus thread, which is a dead-lock. This PR updated StreamingContextStoppingCollector to only call ssc.stop() in the first batch to avoid the dead-lock.

@zsxwing
Copy link
Member Author

zsxwing commented Nov 27, 2015

cc @tdas @tedyu @andrewor14

BTW, there is a similar test in SparkListenerSuite. But SparkContext doesn't hold a lock in stop method, it won't be a problem.

@zsxwing
Copy link
Member Author

zsxwing commented Nov 27, 2015

retest this please

@tedyu
Copy link
Contributor

tedyu commented Nov 27, 2015

Thanks for the quick fix, shixiong

Happy Thanksgiving

@SparkQA
Copy link

SparkQA commented Nov 27, 2015

Test build #46800 has finished for PR 10011 at commit 82d45c9.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@zsxwing
Copy link
Member Author

zsxwing commented Nov 27, 2015

I saw this issue frequently in several PR builds. I'm going to merge this one because it only touches the test codes and it bores other people.

asfgit pushed a commit that referenced this pull request Nov 27, 2015
…ingListenerSuite

In StreamingListenerSuite."don't call ssc.stop in listener", after the main thread calls `ssc.stop()`,  `StreamingContextStoppingCollector` may call  `ssc.stop()` in the listener bus thread, which is a dead-lock. This PR updated `StreamingContextStoppingCollector` to only call `ssc.stop()` in the first batch to avoid the dead-lock.

Author: Shixiong Zhu <[email protected]>

Closes #10011 from zsxwing/fix-test-deadlock.

(cherry picked from commit f57e6c9)
Signed-off-by: Shixiong Zhu <[email protected]>
@asfgit asfgit closed this in f57e6c9 Nov 27, 2015
@zsxwing zsxwing deleted the fix-test-deadlock branch November 27, 2015 19:53
@zsxwing
Copy link
Member Author

zsxwing commented Nov 27, 2015

@tedyu Happy Thanksgiving, too :)

@CodingCat
Copy link
Contributor

Thanks, @zsxwing, at least it works for my PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants