{"record":{"id":"97168bce923ef985","repo":"apache/hadoop","slug":"stream-is-closed-97168b","errorCode":null,"errorMessage":"Stream is closed!","messagePattern":"Stream is closed!","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-aliyun/src/main/java/org/apache/hadoop/fs/aliyun/oss/OSSDataBlocks.java","lineNumber":782,"sourceCode":"        /**\n         * After the stream is closed, set the local reference to the byte\n         * buffer to null; this guarantees that future attempts to use\n         * stream methods will fail.\n         */\n        @Override\n        public synchronized void close() {\n          LOG.debug(\"ByteBufferInputStream.close() for {}\",\n              ByteBufferBlock.super.toString());\n          byteBuffer = null;\n        }\n\n        /**\n         * Verify that the stream is open.\n         * @throws IOException if the stream is closed\n         */\n        private void verifyOpen() throws IOException {\n          if (byteBuffer == null) {\n            throw new IOException(FSExceptionMessages.STREAM_IS_CLOSED);\n          }\n        }\n\n        public synchronized int read() throws IOException {\n          if (available() > 0) {\n            return byteBuffer.get() & 0xFF;\n          } else {\n            return -1;\n          }\n        }\n\n        @Override\n        public synchronized long skip(long offset) throws IOException {\n          verifyOpen();\n          long newPos = position() + offset;\n          if (newPos < 0) {\n            throw new EOFException(FSExceptionMessages.NEGATIVE_SEEK);\n          }","sourceCodeStart":764,"sourceCodeEnd":800,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-aliyun/src/main/java/org/apache/hadoop/fs/aliyun/oss/OSSDataBlocks.java#L764-L800","documentation":"Error \"Stream is closed!\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-tools/hadoop-aliyun/src/main/java/org/apache/hadoop/fs/aliyun/oss/OSSDataBlocks.java:782 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Do not write to a block stream after close(); check the calling code for use-after-close."],"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"}