Skip to content

TEZ-4334: Fix deadlock in ShuffleScheduler between ShuffleScheduler.close() and the ShufflePenaltyReferee thread - #273

Merged
abstractdog merged 1 commit into
apache:masterfrom
abstractdog:TEZ-4334
Mar 6, 2023
Merged

TEZ-4334: Fix deadlock in ShuffleScheduler between ShuffleScheduler.close() and the ShufflePenaltyReferee thread#273
abstractdog merged 1 commit into
apache:masterfrom
abstractdog:TEZ-4334

Conversation

@abstractdog

@abstractdogabstractdog commented Feb 28, 2023

Copy link
Copy Markdown
Contributor

This patch resolved a deadlock between different parts of ShuffleSheduler:

  1. exceptionReporter.reportException(newIOException(errorMsg, fetchFailure.getCause()));

The patch
a) removed synchronized keyword from copyFailed method, but let parts of that method remain sync
b) removed the boolean return mess from methods that called from copyFailed and introduced a clearer IOException pattern and let the exceptionReporter be called from a non-sync part, at one single place

@tez-yetus

This comment was marked as outdated.

@tez-yetus

This comment was marked as outdated.

@abstractdogabstractdog changed the title TEZ-4334: Fix deadlock in ShuffleScheduler - wipTEZ-4334: Fix deadlock in ShuffleSchedulerMar 3, 2023
@abstractdogabstractdog changed the title TEZ-4334: Fix deadlock in ShuffleSchedulerTEZ-4334: Fix deadlock in ShuffleScheduler between ShuffleScheduler.close() and the ShufflePenaltyReferee threadMar 3, 2023
@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec25m 21sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall15m 47smaster passed
+1 💚compile0m 38smaster passed with JDK Ubuntu-11.0.18+10-post-Ubuntu-0ubuntu122.04
+1 💚compile0m 29smaster passed with JDK Private Build-1.8.0_362-8u362-ga-0ubuntu1~22.04-b09
+1 💚checkstyle1m 2smaster passed
+1 💚javadoc0m 38smaster passed with JDK Ubuntu-11.0.18+10-post-Ubuntu-0ubuntu122.04
+1 💚javadoc0m 27smaster passed with JDK Private Build-1.8.0_362-8u362-ga-0ubuntu1~22.04-b09
+0 🆗spotbugs1m 22sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs1m 18smaster passed
_ Patch Compile Tests _
+1 💚mvninstall0m 22sthe patch passed
+1 💚compile0m 23sthe patch passed with JDK Ubuntu-11.0.18+10-post-Ubuntu-0ubuntu122.04
+1 💚javac0m 23sthe patch passed
+1 💚compile0m 21sthe patch passed with JDK Private Build-1.8.0_362-8u362-ga-0ubuntu1~22.04-b09
+1 💚javac0m 21sthe patch passed
+1 💚checkstyle0m 14stez-runtime-library: The patch generated 0 new + 37 unchanged - 2 fixed = 37 total (was 39)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 18sthe patch passed with JDK Ubuntu-11.0.18+10-post-Ubuntu-0ubuntu122.04
+1 💚javadoc0m 17sthe patch passed with JDK Private Build-1.8.0_362-8u362-ga-0ubuntu1~22.04-b09
+1 💚findbugs0m 59sthe patch passed
_ Other Tests _
+1 💚unit5m 30stez-runtime-library in the patch passed.
+1 💚asflicense0m 14sThe patch does not generate ASF License warnings.
55m 11s
SubsystemReport/Notes
DockerClientAPI=1.42 ServerAPI=1.42 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-273/3/artifact/out/Dockerfile
GITHUB PR#273
JIRA IssueTEZ-4334
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
unameLinux 7d957bdff81b 4.15.0-200-generic #211-Ubuntu SMP Thu Nov 24 18:16:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / 6bd6f9c
Default JavaPrivate Build-1.8.0_362-8u362-ga-0ubuntu1~22.04-b09
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.18+10-post-Ubuntu-0ubuntu122.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_362-8u362-ga-0ubuntu1~22.04-b09
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-273/3/testReport/
Max. process+thread count2090 (vs. ulimit of 5500)
modulesC: tez-runtime-library U: tez-runtime-library
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-273/3/console
versionsgit=2.34.1 maven=3.6.3 findbugs=3.0.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 42sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall16m 7smaster passed
+1 💚compile0m 36smaster passed with JDK Ubuntu-11.0.18+10-post-Ubuntu-0ubuntu122.04
+1 💚compile0m 30smaster passed with JDK Private Build-1.8.0_362-8u362-ga-0ubuntu1~22.04-b09
+1 💚checkstyle0m 59smaster passed
+1 💚javadoc0m 39smaster passed with JDK Ubuntu-11.0.18+10-post-Ubuntu-0ubuntu122.04
+1 💚javadoc0m 25smaster passed with JDK Private Build-1.8.0_362-8u362-ga-0ubuntu1~22.04-b09
+0 🆗spotbugs1m 28sUsed deprecated FindBugs config; considering switching to SpotBugs.
+1 💚findbugs1m 25smaster passed
_ Patch Compile Tests _
+1 💚mvninstall0m 21sthe patch passed
+1 💚compile0m 24sthe patch passed with JDK Ubuntu-11.0.18+10-post-Ubuntu-0ubuntu122.04
+1 💚javac0m 24sthe patch passed
+1 💚compile0m 20sthe patch passed with JDK Private Build-1.8.0_362-8u362-ga-0ubuntu1~22.04-b09
+1 💚javac0m 20sthe patch passed
+1 💚checkstyle0m 13stez-runtime-library: The patch generated 0 new + 37 unchanged - 2 fixed = 37 total (was 39)
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚javadoc0m 17sthe patch passed with JDK Ubuntu-11.0.18+10-post-Ubuntu-0ubuntu122.04
+1 💚javadoc0m 16sthe patch passed with JDK Private Build-1.8.0_362-8u362-ga-0ubuntu1~22.04-b09
+1 💚findbugs0m 58sthe patch passed
_ Other Tests _
+1 💚unit5m 15stez-runtime-library in the patch passed.
+1 💚asflicense0m 14sThe patch does not generate ASF License warnings.
30m 32s
SubsystemReport/Notes
DockerClientAPI=1.42 ServerAPI=1.42 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-273/4/artifact/out/Dockerfile
GITHUB PR#273
JIRA IssueTEZ-4334
Optional Testsdupname asflicense javac javadoc unit spotbugs findbugs checkstyle compile
unameLinux 302f69617d1e 4.15.0-200-generic #211-Ubuntu SMP Thu Nov 24 18:16:04 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / 6bd6f9c
Default JavaPrivate Build-1.8.0_362-8u362-ga-0ubuntu1~22.04-b09
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.18+10-post-Ubuntu-0ubuntu122.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_362-8u362-ga-0ubuntu1~22.04-b09
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-273/4/testReport/
Max. process+thread count2091 (vs. ulimit of 5500)
modulesC: tez-runtime-library U: tez-runtime-library
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-273/4/console
versionsgit=2.34.1 maven=3.6.3 findbugs=3.0.1
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@rbalamohan

Copy link
Copy Markdown
Contributor

Good catch. This should happen more in clusters with bad nodes (in exception codepath).

LGTM. +1

@abstractdog
abstractdog merged commit 25a9536 into apache:masterMar 6, 2023
zhuxt2015 pushed a commit to zhuxt2015/tez that referenced this pull request May 14, 2024
…lose() and the ShufflePenaltyReferee thread (apache#273) (Laszlo Bodor, Sungwoo Park, reviewed by Rajesh Balamohan)
(cherry picked from commit 25a9536)
prabhjyotsingh pushed a commit to acceldata-io/tez that referenced this pull request Nov 11, 2024
…lose() and the ShufflePenaltyReferee thread (apache#273) (Laszlo Bodor, Sungwoo Park, reviewed by Rajesh Balamohan)
(cherry picked from commit 25a9536)
prabhjyotsingh pushed a commit to acceldata-io/tez that referenced this pull request Nov 20, 2024
…lose() and the ShufflePenaltyReferee thread (apache#273) (Laszlo Bodor, Sungwoo Park, reviewed by Rajesh Balamohan)
(cherry picked from commit 25a9536)
(cherry picked from commit 6b5355a)
prabhjyotsingh added a commit to acceldata-io/tez that referenced this pull request Nov 20, 2024
…cheduler.close() and the ShufflePenaltyReferee thread (apache#273) (Laszlo Bodor, Sungwoo Park, reviewed by Rajesh Balamohan) (#17)
(cherry picked from commit 25a9536)
(cherry picked from commit 6b5355a)
Co-authored-by: Bodor Laszlo <bodorlaszlo0202@gmail.com>
shubhluck pushed a commit to acceldata-io/tez that referenced this pull request Nov 21, 2024
…cheduler.close() and the ShufflePenaltyReferee thread (apache#273) (Laszlo Bodor, Sungwoo Park, reviewed by Rajesh Balamohan) (#17)
(cherry picked from commit 25a9536)
(cherry picked from commit 6b5355a)
Co-authored-by: Bodor Laszlo <bodorlaszlo0202@gmail.com>
Sign up for freeto 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.

3 participants

@abstractdog@tez-yetus@rbalamohan