{"record":{"id":"b0655ba0139816a5","repo":"apache/hadoop","slug":"fsck-encountered-internal-errors","errorCode":null,"errorMessage":"fsck encountered internal errors!","messagePattern":"fsck encountered internal errors!","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java","lineNumber":471,"sourceCode":"        out.println(\" Total dirs:\\t\\t\\t\" + totalDirs);\n        out.println(\" Total symlinks:\\t\\t\" + totalSymlinks);\n        out.println(\"\\nReplicated Blocks:\");\n        out.println(replRes);\n        out.println(\"\\nErasure Coded Block Groups:\");\n        out.println(ecRes);\n\n        if (this.showStoragePolcies) {\n          out.print(storageTypeSummary);\n        }\n\n        out.println(\"FSCK ended at \" + new Date() + \" in \"\n            + (Time.monotonicNow() - startTime + \" milliseconds\"));\n\n        // If there were internal errors during the fsck operation, we want to\n        // return FAILURE_STATUS, even if those errors were not immediately\n        // fatal.  Otherwise many unit tests will pass even when there are bugs.\n        if (internalError) {\n          throw new IOException(\"fsck encountered internal errors!\");\n        }\n\n        // DFSck client scans for the string HEALTHY/CORRUPT to check the status\n        // of file system and return appropriate code. Changing the output\n        // string might break testcases. Also note this must be the last line\n        // of the report.\n        if (replRes.isHealthy() && ecRes.isHealthy()) {\n          out.print(\"\\n\\nThe filesystem under path '\" + path + \"' \" + HEALTHY_STATUS);\n        } else {\n          out.print(\"\\n\\nThe filesystem under path '\" + path + \"' \" + CORRUPT_STATUS);\n        }\n\n      } else {\n        out.print(\"\\n\\nPath '\" + path + \"' \" + NONEXISTENT_STATUS);\n      }\n    } catch (Exception e) {\n      String errMsg = \"Fsck on path '\" + path + \"' \" + FAILURE_STATUS;\n      LOG.warn(errMsg, e);","sourceCodeStart":453,"sourceCodeEnd":489,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java#L453-L489","documentation":"Error \"fsck encountered internal errors!\" thrown in apache/hadoop.","triggerScenarios":"hdfs fsck hits an unexpected internal error while collecting block or volume information.","commonSituations":"Running fsck during NameNode startup, failover, or heavy block report processing.","solutions":["Re-run fsck; check NameNode logs for the underlying internal error and address it (often transient block-manager state during startup)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}