[ 
https://issues.apache.org/jira/browse/HADOOP-19964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18104452#comment-18104452
 ] 

ASF GitHub Bot commented on HADOOP-19964:
-----------------------------------------

joseluisll commented on PR #8682:
URL: https://github.com/apache/hadoop/pull/8682#issuecomment-5281664150

   Cross-reference: this pairs with #8659 (HDFS-17957), which sets a default
   `junit.jupiter.execution.timeout.default` on the hdfs modules.
   The two cover different halves of the same problem. This PR restores the 
thread
   dump for tests that fail *through JUnit*, and explicitly cannot cover a fork
   killed at `forkedProcessTimeoutInSeconds`: Surefire sends the fork
   `Shutdown.KILL`, the fork executes `Runtime.halt()`, and that bypasses
   listeners and shutdown hooks alike. #8659 is what moves hung hdfs tests off
   that path — with a default `@Timeout` they fail through JUnit instead, at 
which
   point this listener produces the dump. Neither PR alone yields a usable
   diagnostic for a hung HDFS test.
   The two touch one file in common, `hadoop-hdfs-project/hadoop-hdfs/pom.xml`:
   #8659 adds inside `<systemPropertyVariables>`, this one removes the dead
   `<properties>` listener block just after it. I trial-merged the two heads and
   the result is clean, with both changes intact, in either order — no rebase
   needed whichever lands first.




> Restore TimedOutTestsListener thread dumps on test timeout
> ----------------------------------------------------------
>
>                 Key: HADOOP-19964
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19964
>             Project: Hadoop Common
>          Issue Type: Test
>            Reporter: Jose Luis López
>            Priority: Critical
>              Labels: pull-request-available
>
> Goal: a test that fails on @Timeout prints a full thread dump into its
> surefire report. Today it prints nothing, and a timeout without thread state
> is undiagnosable after the fact.
>  
> This is a regression. TimedOutTestsListener (HADOOP-8755, 2012) did exactly
> this until the JUnit 5 migration (HADOOP-19415 Part4) left it implementing no
> listener interface. The Surefire "listener" property that 8 poms still carry
> registers nothing.
>  
> Fix:
> * Reimplement it as a JUnit Platform TestExecutionListener, auto-registered
> via META-INF/services in the hadoop-common test artifact.
> * Remove the dead "listener" property from the 8 poms.
> * -Dhadoop.test.timedout.dump=false turns it off;
> -Dhadoop.test.timedout.dump.limit (default 5) caps dumps per JVM.
>  
> Covers timeouts that fail through JUnit. Does not cover Surefire's fork kill
> (forkedProcessTimeoutInSeconds), which halts the JVM and bypasses listeners.
> Complements HADOOP-19950, whose CI upload globs already capture the report
> files these dumps land in.
>  
> The listener activates for every consumer of the hadoop-common test artifact,
> including HBase, Ozone, Hive and Tez: needs a release note.
>  
> Test-scope only; no production code is touched.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to