Skip to content

Conversation

@aarondav
Copy link
Contributor

We recently added this lock on 'conf' in order to prevent concurrent creation. However, it turns out that this can introduce a deadlock because Hadoop also synchronizes on the Configuration objects when creating new Configurations (and they do so via a static REGISTRY which contains all created Configurations).

This fix forces all Spark initialization of Configuration objects to occur serially by using a static lock that we control, and thus also prevents introducing the deadlock.

We recently added this lock on 'conf' in order to prevent concurrent
creation. However, it turns out that this can introduce a deadlock
because Hadoop also synchronizes on the Configuration objects when
creating new Configurations (and they do so via a static REGISTRY
which contains all created Configurations).

This fix forces all Spark initialization of Configuration objects
to occur serially by using a static lock that we control, and thus
also prevents introducing the deadlock.
@SparkQA
Copy link

SparkQA commented Jul 14, 2014

QA tests have started for PR 1409. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16639/consoleFull

@koeninger
Copy link
Contributor

Testing that patch, it seems to have fixed the deadlock we were seeing in production.

@aarondav
Copy link
Contributor Author

Jenkins, test this please.

@SparkQA
Copy link

SparkQA commented Jul 16, 2014

QA tests have started for PR 1409. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16740/consoleFull

@SparkQA
Copy link

SparkQA commented Jul 16, 2014

QA results for PR 1409:
- This patch PASSES unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16740/consoleFull

@pwendell
Copy link
Contributor

Okay I'm going to merge this into master and 1.0. We can cut a new patch release shortly for this.

asfgit pushed a commit that referenced this pull request Jul 16, 2014
We recently added this lock on 'conf' in order to prevent concurrent creation. However, it turns out that this can introduce a deadlock because Hadoop also synchronizes on the Configuration objects when creating new Configurations (and they do so via a static REGISTRY which contains all created Configurations).

This fix forces all Spark initialization of Configuration objects to occur serially by using a static lock that we control, and thus also prevents introducing the deadlock.

Author: Aaron Davidson <[email protected]>

Closes #1409 from aarondav/1054 and squashes the following commits:

7d1b769 [Aaron Davidson] SPARK-1097: Do not introduce deadlock while fixing concurrency bug
(cherry picked from commit 8867cd0)

Signed-off-by: Patrick Wendell <[email protected]>
@asfgit asfgit closed this in 8867cd0 Jul 16, 2014
gzm55 pushed a commit to MediaV/spark that referenced this pull request Jul 18, 2014
We recently added this lock on 'conf' in order to prevent concurrent creation. However, it turns out that this can introduce a deadlock because Hadoop also synchronizes on the Configuration objects when creating new Configurations (and they do so via a static REGISTRY which contains all created Configurations).

This fix forces all Spark initialization of Configuration objects to occur serially by using a static lock that we control, and thus also prevents introducing the deadlock.

Author: Aaron Davidson <[email protected]>

Closes apache#1409 from aarondav/1054 and squashes the following commits:

7d1b769 [Aaron Davidson] SPARK-1097: Do not introduce deadlock while fixing concurrency bug
(cherry picked from commit 8867cd0)

Signed-off-by: Patrick Wendell <[email protected]>
xiliu82 pushed a commit to xiliu82/spark that referenced this pull request Sep 4, 2014
We recently added this lock on 'conf' in order to prevent concurrent creation. However, it turns out that this can introduce a deadlock because Hadoop also synchronizes on the Configuration objects when creating new Configurations (and they do so via a static REGISTRY which contains all created Configurations).

This fix forces all Spark initialization of Configuration objects to occur serially by using a static lock that we control, and thus also prevents introducing the deadlock.

Author: Aaron Davidson <[email protected]>

Closes apache#1409 from aarondav/1054 and squashes the following commits:

7d1b769 [Aaron Davidson] SPARK-1097: Do not introduce deadlock while fixing concurrency bug
kazuyukitanimura pushed a commit to kazuyukitanimura/spark that referenced this pull request Aug 10, 2022
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