{"record":{"id":"b2ee3b35b3321da0","repo":"apache/hadoop","slug":"interrupted-receiveblock","errorCode":null,"errorMessage":"Interrupted receiveBlock","messagePattern":"Interrupted receiveBlock","errorType":"exception","errorClass":"InterruptedIOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java","lineNumber":1111,"sourceCode":"        try {\n          responder.interrupt();\n          // join() on the responder should timeout a bit earlier than the\n          // configured deadline. Otherwise, the join() on this thread will\n          // likely timeout as well.\n          long joinTimeout = datanode.getDnConf().getXceiverStopTimeout();\n          joinTimeout = joinTimeout > 1  ? joinTimeout*8/10 : joinTimeout;\n          responder.join(joinTimeout);\n          if (responder.isAlive()) {\n            String msg = \"Join on responder thread \" + responder\n                + \" timed out\";\n            LOG.warn(msg + \"\\n\" + StringUtils.getStackTrace(responder));\n            throw new IOException(msg);\n          }\n        } catch (InterruptedException e) {\n          responder.interrupt();\n          // do not throw if shutting down for restart.\n          if (!datanode.isRestarting()) {\n            throw new InterruptedIOException(\"Interrupted receiveBlock\");\n          }\n        }\n        responder = null;\n      }\n    }\n  }\n\n  /**\n   * If we have downstream DNs and peerMetrics are enabled, then initialize\n   * some state for monitoring the performance of downstream DNs.\n   *\n   * @param downstreams downstream DNs, or null if there are none.\n   */\n  private void initPerfMonitoring(DatanodeInfo[] downstreams) {\n    if (downstreams != null && downstreams.length > 0) {\n      downstreamDNs = downstreams;\n      isPenultimateNode = (downstreams.length == 1);\n      if (isPenultimateNode && datanode.getDnConf().peerStatsEnabled) {","sourceCodeStart":1093,"sourceCodeEnd":1129,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java#L1093-L1129","documentation":"Error \"Interrupted receiveBlock\" thrown in apache/hadoop.","triggerScenarios":"The BlockReceiver thread is interrupted while receiving a block, commonly during DataNode shutdown or aborted pipeline operations.","commonSituations":"The receiveBlock thread was interrupted, typically by DataNode shutdown or pipeline recovery. Harmless during planned restarts; otherwise check for premature interrupts.","solutions":["Treat as normal if it coincides with DataNode shutdown, block invalidation, or pipeline recovery; no action needed.","If frequent without shutdown/recovery, check what issues interrupts (e.g., premature client disconnects) and review thread management around the receiver."],"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-22T20:17:22.307Z"}