Skip to content

TEZ-4725: Fix flaky tests in TestAMRecoveryAggregationBroadcast - #520

Merged
abstractdog merged 4 commits into
apache:masterfrom
maheshrajus:TEZ-4725_flaky
Jul 29, 2026
Merged

TEZ-4725: Fix flaky tests in TestAMRecoveryAggregationBroadcast#520
abstractdog merged 4 commits into
apache:masterfrom
maheshrajus:TEZ-4725_flaky

Conversation

@maheshrajus

Copy link
Copy Markdown
Contributor

Root causes and fixes:

  1. TestAMRecoveryAggregationBroadcast.testMapJoinTemporalFailure (race condition)
    Replace fixed Thread.sleep(10s) before AM kill with a deterministic
    waitForVertexSucceeded() helper that polls DAGClient.getVertexStatus()
    every 500ms (up to 60s) until the target vertices reach SUCCEEDED state.
    Each test now waits for only the vertices it logically depends on before
    killing the AM, ensuring the recovery log assertions always see the
    expected counts.
    Make OUT_PATH unique per test run (random suffix) to eliminate cross-test.

  2. DAGClientRPCImpl / TezClientUtils: port out of range:-1 (YARN-808 gap)
    YARN sets rpcPort=-1 when an AM container is allocated (state=RUNNING)
    but the AM has not yet bound its RPC listener. The existing guard only
    checked rpcPort==0 (protobuf default), so rpcPort==-1 reached
    NetUtils.createSocketAddrForHost(), which threw
    IllegalArgumentException: port out of range:-1.
    Fix DAGClientRPCImpl.createAMProxyIfNeeded(): rpcPort == 0 → rpcPort <= 0.
    Fix TezClientUtils.getAMProxy(FrameworkClient,...): add the same
    rpcPort <= 0 guard

@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec4m 11sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗detsecrets0m 1sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 3 new or modified test files.
_ master Compile Tests _
+0 🆗mvndep0m 35sMaven dependency ordering for branch
+1 💚mvninstall4m 33smaster passed
+1 💚compile3m 59smaster passed
+1 💚checkstyle1m 4smaster passed
+1 💚javadoc1m 11smaster passed
+0 🆗spotbugs1m 23stez-api in master has 92 extant spotbugs warnings.
+0 🆗spotbugs0m 53stez-tests in master has 6 extant spotbugs warnings.
_ Patch Compile Tests _
+0 🆗mvndep0m 9sMaven dependency ordering for patch
+1 💚mvninstall3m 51sthe patch passed
+1 💚codespell1m 37sNo new issues.
+1 💚compile4m 5sthe patch passed
+1 💚javac4m 5sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
-0 ⚠️checkstyle0m 30s/results-checkstyle-tez-api.txttez-api: The patch generated 2 new + 62 unchanged - 0 fixed = 64 total (was 62)
+1 💚javadoc1m 10sthe patch passed
+1 💚spotbugs2m 33sthe patch passed
_ Other Tests _
+1 💚unit75m 58sroot in the patch passed.
+1 💚asflicense1m 0sThe patch does not generate ASF License warnings.
111m 9s
SubsystemReport/Notes
DockerClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-520/1/artifact/out/Dockerfile
Optional Testsdupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets
unameLinux c15aef73b5a9 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitytez-personality.sh
git revisionmaster / 4bccf3a
Default JavaEclipse Adoptium-21.0.11+10-LTS
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-520/1/testReport/
Max. process+thread count1525 (vs. ulimit of 5500)
modulesC: tez-api tez-tests U: .
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-520/1/console
versionsgit=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered byApache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

Comment threadtez-api/src/main/java/org/apache/tez/client/TezClientUtils.java Outdated
Comment threadtez-api/src/main/java/org/apache/tez/client/TezClientUtils.java Outdated
Comment threadtez-api/src/test/java/org/apache/tez/dag/api/client/rpc/TestDAGClient.java Outdated
@maheshrajus

Copy link
Copy Markdown
ContributorAuthor

@abstractdog I have addressed your review comments. Could you please review and approve the PR at your convenience? Thanks !

@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec3m 59sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 3 new or modified test files.
_ master Compile Tests _
+0 🆗mvndep0m 33sMaven dependency ordering for branch
+1 💚mvninstall4m 32smaster passed
+1 💚compile4m 3smaster passed
+1 💚checkstyle1m 3smaster passed
+1 💚javadoc1m 12smaster passed
+0 🆗spotbugs1m 23stez-api in master has 92 extant spotbugs warnings.
+0 🆗spotbugs0m 51stez-tests in master has 6 extant spotbugs warnings.
_ Patch Compile Tests _
+0 🆗mvndep0m 9sMaven dependency ordering for patch
+1 💚mvninstall3m 40sthe patch passed
+1 💚codespell1m 36sNo new issues.
+1 💚compile4m 2sthe patch passed
+1 💚javac4m 2sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
-0 ⚠️checkstyle0m 31s/results-checkstyle-tez-api.txttez-api: The patch generated 2 new + 62 unchanged - 0 fixed = 64 total (was 62)
+1 💚javadoc1m 10sthe patch passed
+1 💚spotbugs2m 37sthe patch passed
_ Other Tests _
+1 💚unit75m 54sroot in the patch passed.
+1 💚asflicense0m 56sThe patch does not generate ASF License warnings.
110m 40s
SubsystemReport/Notes
DockerClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-520/2/artifact/out/Dockerfile
Optional Testsdupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets
unameLinux d02fa7af64e9 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitytez-personality.sh
git revisionmaster / efab6a1
Default JavaEclipse Adoptium-21.0.11+10-LTS
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-520/2/testReport/
Max. process+thread count1479 (vs. ulimit of 5500)
modulesC: tez-api tez-tests U: .
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-520/2/console
versionsgit=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered byApache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

@abstractdogabstractdog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @maheshrajus , only a few minor comments left

@abstractdogabstractdog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 more thing, otherwise it's okay

@abstractdog
abstractdog merged commit d348bf1 into apache:masterJul 29, 2026
6 checks passed
@tez-yetus

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 12sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚test4tests0m 0sThe patch appears to include 3 new or modified test files.
_ master Compile Tests _
+0 🆗mvndep0m 34sMaven dependency ordering for branch
+1 💚mvninstall4m 31smaster passed
+1 💚compile4m 5smaster passed
+1 💚checkstyle1m 2smaster passed
+1 💚javadoc1m 13smaster passed
+0 🆗spotbugs1m 23stez-api in master has 92 extant spotbugs warnings.
+0 🆗spotbugs0m 53stez-tests in master has 6 extant spotbugs warnings.
_ Patch Compile Tests _
+0 🆗mvndep0m 10sMaven dependency ordering for patch
+1 💚mvninstall4m 0sthe patch passed
+1 💚codespell1m 36sNo new issues.
+1 💚compile4m 3sthe patch passed
+1 💚javac4m 3sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
-0 ⚠️checkstyle0m 30s/results-checkstyle-tez-api.txttez-api: The patch generated 2 new + 62 unchanged - 0 fixed = 64 total (was 62)
+1 💚javadoc1m 10sthe patch passed
+1 💚spotbugs2m 38sthe patch passed
_ Other Tests _
+1 💚unit78m 8sroot in the patch passed.
+1 💚asflicense0m 57sThe patch does not generate ASF License warnings.
109m 33s
SubsystemReport/Notes
DockerClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-520/4/artifact/out/Dockerfile
Optional Testsdupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets
unameLinux dc30764bbeb3 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitytez-personality.sh
git revisionmaster / 84e634a
Default JavaEclipse Adoptium-21.0.11+10-LTS
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-520/4/testReport/
Max. process+thread count1287 (vs. ulimit of 5500)
modulesC: tez-api tez-tests U: .
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-520/4/console
versionsgit=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered byApache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

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

@maheshrajus@tez-yetus@abstractdog