prestodb/presto · error · UncheckedIOException
Unable to dump data to disk:
Error message
Unable to dump data to disk:
What it means
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.
Source
Thrown at presto-spark-base/src/main/java/com/facebook/presto/spark/execution/task/PrestoSparkTaskExecutorFactory.java:1293
if (ioException != exception) {
ioException.addSuppressed(exception);
}
}
}
finally {
try {
if (tempDataSink != null) {
tempDataSink.close();
}
}
catch (IOException e) {
if (ioException == null) {
ioException = e;
}
else if (ioException != e) {
ioException.addSuppressed(e);
}
throw new UncheckedIOException("Unable to dump data to disk: ", ioException);
}
}
throw new UncheckedIOException("Unable to dump data to disk: ", ioException);
}
@Override
public long getTimeSpentWaitingForOutputInMillis()
{
return timeSpentWaitingForOutputInMillis;
}
}
private enum OutputBufferType
{
SPARK_ROW_OUTPUT_BUFFER,
SPARK_PAGE_OUTPUT_BUFFER,
SPARK_DISK_PAGE_OUTPUT_BUFFER,View on GitHub (pinned to 55bb57d202)
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
Example fix
// check and fix spill location
// before: dumpDir defaults to a full disk
// after
if (Files.getFileStore(dumpDir).getUsableSpace() < minFreeBytes) {
throw new PrestoException(GENERIC_INTERNAL_ERROR, "dump dir low on space: " + dumpDir);
} Defensive patterns
Strategy: retry
Validate before calling
long usable = Files.getFileStore(Paths.get(dumpDir)).getUsableSpace(); if (usable < requiredMinBytes) throw new PrestoException(NO_SPACE_LEFT_ON_DEVICE, "spill dir low: " + dumpDir);
Type guard
boolean dumpDirWritable(Path dir) { return Files.isDirectory(dir) && Files.isWritable(dir); } Try / catch
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; } Prevention
- 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
When it happens
Trigger: 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.
Common situations: Disk full on Spark executor local directories; misconfigured spark.local.dir / spill path permissions; disk failure or read-only mount on executor nodes.
Related errors
- java.io.IOException (wrapped in UncheckedIOException)
- UNEXPECTED_ACCUMULO_ERROR
- ATOP_CANNOT_START_PROCESS_ERROR
- Failed to create Credentials from file
- BIGQUERY_ERROR_END_OF_AVRO_BUFFER
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/a5e6cb62d3e61a82.
Report an issue: GitHub.