[
https://issues.apache.org/jira/browse/YARN-11876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18028336#comment-18028336
]
ASF GitHub Bot commented on YARN-11876:
---------------------------------------
slfan1989 commented on PR #8014:
URL: https://github.com/apache/hadoop/pull/8014#issuecomment-3381131989
@cnauroth @steveloughran @szetszwo Could you please help review this PR?
Thank you very much!
This PR fixes an issue that caused the YARN ResourceManager to crash during
JUnit tests.
Instead of calling System.exit(-1) on failure, the process now continues
safely, ensuring that all assertions are still executed.
This change does not affect the correctness of existing assertions and
improves test robustness.
> Fix AsyncDispatcher crash in TestAppManager
> -------------------------------------------
>
> Key: YARN-11876
> URL: https://issues.apache.org/jira/browse/YARN-11876
> Project: Hadoop YARN
> Issue Type: Improvement
> Components: resourcemanager
> Affects Versions: 3.5.0
> Reporter: Shilun Fan
> Assignee: Shilun Fan
> Priority: Major
> Labels: pull-request-available
>
> h3. *Description*
> After upgrading to {*}JUnit 5{*}, the {{ResourceManager}} module encounters a
> crash when running unit tests. Specifically, the failure occurs in the test
> case {{{}TestAppManager#testRMAppSubmitWithQueueChanged{}}}.
> During application submission, the test changes the queue assignment, which
> triggers a {{SchedulerEvent}} that the {{AsyncDispatcher}} cannot handle.
> As a result, the dispatcher thread throws an exception and terminates,
> causing the test JVM to exit abnormally with a
> {{{}SurefireBooterForkException{}}}.
> *Error Details*
> {code:java}
> 2025-10-08 07:56:46,833 ERROR [AsyncDispatcher event handler]
> event.AsyncDispatcher (MarkerIgnoringBase.java:error(159)) - Error in
> dispatcher thread
> java.lang.Exception: No handler registered for class
> org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.SchedulerEventType
> at
> org.apache.hadoop.yarn.event.AsyncDispatcher.dispatch(AsyncDispatcher.java:277)
> at
> org.apache.hadoop.yarn.event.AsyncDispatcher$1.run(AsyncDispatcher.java:162)
> at java.lang.Thread.run(Thread.java:750) {code}
> This leads to Maven Surefire reporting a forked VM crash:
> {code:java}
> org.apache.maven.surefire.booter.SurefireBooterForkException:
> ExecutionException The forked VM terminated without properly saying goodbye.
> VM crash or System.exit called?
> Process Exit Code: 255
> Crashed tests: org.apache.hadoop.yarn.server.resourcemanager.TestAppManager
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]