{"record":{"id":"a5e6cb62d3e61a82","repo":"prestodb/presto","slug":"unable-to-dump-data-to-disk","errorCode":null,"errorMessage":"Unable to dump data to disk: ","messagePattern":"Unable to dump data to disk: ","errorType":"exception","errorClass":"UncheckedIOException","httpStatus":null,"severity":"error","filePath":"presto-spark-base/src/main/java/com/facebook/presto/spark/execution/task/PrestoSparkTaskExecutorFactory.java","lineNumber":1293,"sourceCode":"                    if (ioException != exception) {\n                        ioException.addSuppressed(exception);\n                    }\n                }\n            }\n            finally {\n                try {\n                    if (tempDataSink != null) {\n                        tempDataSink.close();\n                    }\n                }\n                catch (IOException e) {\n                    if (ioException == null) {\n                        ioException = e;\n                    }\n                    else if (ioException != e) {\n                        ioException.addSuppressed(e);\n                    }\n                    throw new UncheckedIOException(\"Unable to dump data to disk: \", ioException);\n                }\n            }\n\n            throw new UncheckedIOException(\"Unable to dump data to disk: \", ioException);\n        }\n\n        @Override\n        public long getTimeSpentWaitingForOutputInMillis()\n        {\n            return timeSpentWaitingForOutputInMillis;\n        }\n    }\n\n    private enum OutputBufferType\n    {\n        SPARK_ROW_OUTPUT_BUFFER,\n        SPARK_PAGE_OUTPUT_BUFFER,\n        SPARK_DISK_PAGE_OUTPUT_BUFFER,","sourceCodeStart":1275,"sourceCodeEnd":1311,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-spark-base/src/main/java/com/facebook/presto/spark/execution/task/PrestoSparkTaskExecutorFactory.java#L1275-L1311","documentation":"When a Spark task overflows pages to disk (spill/dump), the dump helper collects any IOException and rethrows it as UncheckedIOException with message 'Unable to dump data to disk: '. This throw at line 1293 wraps the first (or current) IOException encountered while writing the dump, preserving suppressed exceptions.","triggerScenarios":"The task attempts to dump/spill data to disk (e.g. when memory is exhausted and dump-to-disk is enabled) and an IOException occurs during writing; line 1293 rethrows the recorded ioException after the loop.","commonSituations":"Disk full on Spark executor local directories; misconfigured spark.local.dir / spill path permissions; disk failure or read-only mount on executor nodes.","solutions":["Check executor disk space on the spill/dump directory and free space or expand volumes","Verify the spill directory (e.g. spark.local.dir, presto native temp storage) exists and is writable by the Spark executor user","Inspect the wrapped IOException (suppressed chain) for the root cause (NoSpaceLeftOnDevice, permission denied, etc.)","Reduce memory pressure / increase executor memory so fewer pages spill to disk"],"exampleFix":"// check and fix spill location\n// before: dumpDir defaults to a full disk\n// after\nif (Files.getFileStore(dumpDir).getUsableSpace() < minFreeBytes) {\n    throw new PrestoException(GENERIC_INTERNAL_ERROR, \"dump dir low on space: \" + dumpDir);\n}","handlingStrategy":"retry","validationCode":"long usable = Files.getFileStore(Paths.get(dumpDir)).getUsableSpace();\nif (usable < requiredMinBytes) throw new PrestoException(NO_SPACE_LEFT_ON_DEVICE, \"spill dir low: \" + dumpDir);","typeGuard":"boolean dumpDirWritable(Path dir) { return Files.isDirectory(dir) && Files.isWritable(dir); }","tryCatchPattern":"try { dumpToFile(pages); } catch (UncheckedIOException e) { Throwable root = e.getCause(); if (root instanceof IOException && root.getMessage().contains(\"No space left\")) { alertOps(\"spill disk full\"); } throw e; }","preventionTips":["Monitor disk usage on executor spill directories with alerts before 90% full","Provision multiple local disks for spill","Ensure the executor user owns write permissions on the dump path"],"tags":["presto-on-spark","io","disk-spill","unchecked-io-exception"],"backgroundTag":"unable-to-dump-data-to-disk","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}