Skip to content

YARN-11843. Fix potential deadlock when auto-correction of container allocation is enabled #7855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

TaoYang526
Copy link
Contributor

Details please refer to YARN-11843.

Description of PR

How was this patch tested?

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

@TaoYang526
Copy link
Contributor Author

@shameersss1 @slfan1989 Could you please help to review this PR? Thanks!

Copy link
Contributor

@shameersss1 shameersss1 left a comment

Choose a reason for hiding this comment

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

LGTM +1

@shameersss1
Copy link
Contributor

@TaoYang526 - It is good catch indeed.
Just curious to know - May i know the use case behind using auto-correction feature ?

@TaoYang526
Copy link
Contributor Author

TaoYang526 commented Aug 5, 2025

@TaoYang526 - It is good catch indeed. Just curious to know - May i know the use case behind using auto-correction feature ?

@shameersss1 Currently, we don't have a specific use case for the auto-correction feature. We have always been aware that YARN has an over-allocation issue, but considered it a minor concern, so no action was taken. When I discovered YARN-11702, I wanted to take a look and found that it could resolve most over-allocation issues, except for some in-scheduling cases. It's sufficient to reduce unnecessary consumption in the scheduling cycle and we may enable this feature in the future.

@shameersss1
Copy link
Contributor

@TaoYang526 - It is good catch indeed. Just curious to know - May i know the use case behind using auto-correction feature ?

@shameersss1 Currently, we don't have a specific use case for the auto-correction feature. We have always been aware that YARN has an over-allocation issue, but considered it a minor concern, so no action was taken. When I discovered YARN-11702, I wanted to take a look and found that it could resolve most over-allocation issues, except for some in-scheduling cases. It's sufficient to reduce unnecessary consumption in the scheduling cycle and we may enable this feature in the future.

Thanks for the details.

@hadoop-yetus

This comment was marked as outdated.

@hadoop-yetus

This comment was marked as outdated.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 49s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The 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.
_ trunk Compile Tests _
+1 💚 mvninstall 52m 19s trunk passed
+1 💚 compile 1m 8s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 54s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 0m 57s trunk passed
+1 💚 mvnsite 0m 59s trunk passed
+1 💚 javadoc 0m 59s trunk passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 49s trunk passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 1m 59s trunk passed
+1 💚 shadedclient 41m 49s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 48s the patch passed
+1 💚 compile 0m 57s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 0m 57s the patch passed
+1 💚 compile 0m 47s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 0m 47s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 44s the patch passed
+1 💚 mvnsite 0m 50s the patch passed
+1 💚 javadoc 0m 46s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 41s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 1m 54s the patch passed
+1 💚 shadedclient 42m 38s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 117m 4s hadoop-yarn-server-resourcemanager in the patch passed.
+1 💚 asflicense 0m 39s The patch does not generate ASF License warnings.
270m 30s
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7855/3/artifact/out/Dockerfile
GITHUB PR #7855
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 8e43c4d936c4 5.15.0-144-generic #157-Ubuntu SMP Mon Jun 16 07:33:10 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 29cd1d7
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7855/3/testReport/
Max. process+thread count 939 (vs. ulimit of 5500)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7855/3/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@TaoYang526 TaoYang526 self-assigned this Aug 8, 2025
completedContainer(rmContainer, SchedulerUtils.createAbnormalContainerStatus(
rmContainer.getContainerId(), SchedulerUtils.EXPIRED_CONTAINER),
RMContainerEventType.EXPIRE);
asyncContainerRelease(rmContainer);
Copy link
Contributor

Choose a reason for hiding this comment

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

Will it cause the message at the end of the container to be different?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the message will be updated from "Container expired since it was unused" to "Container released by application", which I believe is more appropriate.

@TaoYang526
Copy link
Contributor Author

@slfan1989 @aajisaka Could you please help review this PR when you have time?

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

Successfully merging this pull request may close these issues.

4 participants