{"record":{"id":"08ef92294b437553","repo":"apache/flink","slug":"could-not-cancel-job","errorCode":null,"errorMessage":"Could not cancel job {}.","messagePattern":"Could not cancel job (.+?)\\.","errorType":"exception","errorClass":"FlinkException","httpStatus":null,"severity":"critical","filePath":"flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java","lineNumber":670,"sourceCode":"                                + targetDirectory\n                                + '.');\n            }\n\n            runClusterAction(\n                    activeCommandLine,\n                    commandLine,\n                    (clusterClient, effectiveConfiguration) -> {\n                        final String savepointPath;\n                        try {\n                            savepointPath =\n                                    clusterClient\n                                            .cancelWithSavepoint(jobId, targetDirectory, formatType)\n                                            .get(\n                                                    getClientTimeout(effectiveConfiguration)\n                                                            .toMillis(),\n                                                    TimeUnit.MILLISECONDS);\n                        } catch (Exception e) {\n                            throw new FlinkException(\"Could not cancel job \" + jobId + '.', e);\n                        }\n                        logAndSysout(\n                                \"Cancelled job \"\n                                        + jobId\n                                        + \". Savepoint stored in \"\n                                        + savepointPath\n                                        + '.');\n                    });\n        } else {\n            final JobID jobId;\n\n            if (cleanedArgs.length > 0) {\n                jobId = parseJobId(cleanedArgs[0]);\n            } else {\n                throw new CliArgsException(\"Missing JobID. Specify a JobID to cancel a job.\");\n            }\n\n            logAndSysout(\"Cancelling job \" + jobId + '.');","sourceCodeStart":652,"sourceCodeEnd":688,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java#L652-L688","documentation":"Thrown from AbstractColumnReader.readDataBuffer when slicing `length` bytes from the page's data stream fails — i.e. the page has fewer remaining bytes than the fixed-width value being read requires. The message states exactly how many bytes were requested. This is a page-body truncation invariant violation.","triggerScenarios":"Reading FIXED_LEN_BYTE_ARRAY (e.g. DECIMAL, INT96 timestamps) or fixed-width values where the remaining page bytes < value length; page metadata count/values inconsistent with actual page size; corrupted page bytes.","commonSituations":"Truncated files in object storage; writers with bugs emitting short pages for fixed-length types; decimal(38,x) or INT96 timestamp columns in malformed files.","solutions":["Compare the requested length in the message with the page size — a fixed-width read exceeding remaining bytes proves page truncation","Re-obtain the file and verify its size/CRC; retry read on a clean copy","Dump the column chunk with `parquet-tools dump -c <column>` to confirm the page layout in a reference reader","If reproducible, the writer produced invalid pages — capture the file and report to the writer's project"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before reading fixed-length types, confirm page byte counts from metadata\nColumnChunkMetaData cc = ...;\nint typeLen = cc.getType() == PrimitiveType.PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY\n        ? cc.getTypeLength() : cc.getType().byteSize();\n// page sizes live in the page index / column index when present; absent them,\n// rely on footer-consistency checks: encodings + total size must be coherent","typeGuard":null,"tryCatchPattern":"try {\n    vectorizedReader.readToVector(...);\n} catch (ParquetDecodingException e) {\n    if (String.valueOf(e.getMessage()).startsWith(\"Failed to read\")) {\n        quarantine(file); // deterministic truncation\n    } else throw e;\n}","preventionTips":["Verify content-length/ETag after uploading/downloading Parquet files","Use page-index-enabled writers so truncation is detectable from metadata","Never retry this error unchanged — it is deterministic per file"],"tags":["parquet","io","data-corruption","fixed-len-byte-array"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}