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

ASF GitHub Bot commented on HDFS-17869:
---------------------------------------

hadoop-yetus commented on PR #8314:
URL: https://github.com/apache/hadoop/pull/8314#issuecomment-4091243622

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |   0m 26s |  |  Docker mode activated.  |
   |||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  0s |  |  detect-secrets was not available.  
|
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
   |||| _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  27m  9s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   0m 55s |  |  trunk passed with JDK 
Ubuntu-21.0.10+7-Ubuntu-124.04  |
   | +1 :green_heart: |  compile  |   0m 54s |  |  trunk passed with JDK 
Ubuntu-17.0.18+8-Ubuntu-124.04.1  |
   | +1 :green_heart: |  checkstyle  |   1m  2s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   0m 59s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   0m 49s |  |  trunk passed with JDK 
Ubuntu-21.0.10+7-Ubuntu-124.04  |
   | +1 :green_heart: |  javadoc  |   0m 48s |  |  trunk passed with JDK 
Ubuntu-17.0.18+8-Ubuntu-124.04.1  |
   | +1 :green_heart: |  spotbugs  |   2m 21s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  18m 16s |  |  branch has no errors 
when building and testing our client artifacts.  |
   |||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 45s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 41s |  |  the patch passed with JDK 
Ubuntu-21.0.10+7-Ubuntu-124.04  |
   | +1 :green_heart: |  javac  |   0m 41s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 45s |  |  the patch passed with JDK 
Ubuntu-17.0.18+8-Ubuntu-124.04.1  |
   | +1 :green_heart: |  javac  |   0m 45s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | +1 :green_heart: |  checkstyle  |   0m 46s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   0m 50s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 34s |  |  the patch passed with JDK 
Ubuntu-21.0.10+7-Ubuntu-124.04  |
   | +1 :green_heart: |  javadoc  |   0m 38s |  |  the patch passed with JDK 
Ubuntu-17.0.18+8-Ubuntu-124.04.1  |
   | +1 :green_heart: |  spotbugs  |   2m 17s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  18m 10s |  |  patch has no errors 
when building and testing our client artifacts.  |
   |||| _ Other Tests _ |
   | -1 :x: |  unit  | 179m 27s | 
[/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8314/2/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt)
 |  hadoop-hdfs in the patch failed.  |
   | +1 :green_heart: |  asflicense  |   0m 25s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 257m 51s |  |  |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.54 ServerAPI=1.54 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8314/2/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/8314 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux f1c7224040af 5.15.0-141-generic #151-Ubuntu SMP Sun May 18 
21:35:19 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / c962772a44a0ed28ea2bb7dab12225015787351e |
   | Default Java | Ubuntu-17.0.18+8-Ubuntu-124.04.1 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.10+7-Ubuntu-124.04 
/usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.18+8-Ubuntu-124.04.1 |
   |  Test Results | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8314/2/testReport/ |
   | Max. process+thread count | 4412 (vs. ulimit of 5500) |
   | modules | C: hadoop-hdfs-project/hadoop-hdfs U: 
hadoop-hdfs-project/hadoop-hdfs |
   | Console output | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8314/2/console |
   | versions | git=2.43.0 maven=3.9.11 spotbugs=4.9.7 |
   | Powered by | Apache Yetus 0.14.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   




> Missing root exception cause in QuorumJournalManager.java
> ---------------------------------------------------------
>
>                 Key: HDFS-17869
>                 URL: https://issues.apache.org/jira/browse/HDFS-17869
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 3.3.6
>            Reporter: WeiLinJin
>            Priority: Minor
>              Labels: exception, pull-request-available
>         Attachments: HDFS-17869.patch
>
>
> Dear HDFS developers, we are developing a tool to detect exception-related 
> bugs in Java. Our primary focus is on identifying issues where the caught 
> exception is rethrown without propagating the original exception as the 
> cause. When such errors occur, the root cause exception is swallowed, 
> resulting in incomplete call stacks in error reports. This makes it hard to 
> trace the origin of the exception and hinders debugging efforts.
> Version: Hadoop-3.3.6
> File: org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager
> Line: 257-261 275-279 682-686 699-703 716-720 747-753 768-772 785-791 816-822
> For example,Line: 257-261:
> {code:java}
> try {
>     call.waitFor(loggers.size(), loggers.size(), 0, timeoutMs,
>         "format");
> } catch (InterruptedException e) {
>     throw new IOException("Interrupted waiting for format() response");//no 
> cause
> } catch (TimeoutException e) {
>     throw new IOException("Timed out waiting for format() response");//no 
> cause
> }
> {code}
> In the code snippet above, two key locations exhibit this problematic 
> pattern: when catching exceptions and re-throwing a new exception instance, 
> the caught original exceptions are not passed as the root cause (or "cause" 
> parameter) of the new exception. Without chaining the original exception to 
> the new one, the error stack trace loses critical context about the initial 
> failure location, which makes tracing the source of the original exceptions 
> extremely difficult and prolongs the troubleshooting process.
> Fix Suggestion:
> {code:java}
> try {
>     call.waitFor(loggers.size(), loggers.size(), 0, timeoutMs,
>         "format");
> } catch (InterruptedException e) {
>     throw new IOException("Interrupted waiting for format() response", e);
> } catch (TimeoutException e) {
>     throw new IOException("Timed out waiting for format() response", e);
> }
> {code}
> There are multiple instances of this issue in the methods of the 
> {{QuorumJournalManager.java}}.  (Line:257-261 275-279 682-686 699-703 716-720 
> 747-753 768-772 785-791 816-822)
>  
>  
>  



--
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