EpicGames/lore · error · io::Error
file refused further writes
Error message
file refused further writes
What it means
The synchronous write_all_at loop received a zero-byte write from write_at_impl, indicating the file accepted no more data at the current offset. The library reports this as ErrorKind::WriteZero instead of a silent partial write, so callers can rely on full-buffer semantics.
Solutions
- Free disk space or raise the quota on the target volume, then retry.
- Reopen the file (it may have been truncated/replaced) and rewrite from scratch.
- Check ENOSPC conditions proactively: stat the filesystem's free bytes before large writes.
- If writing to pipes/special files, ensure the consumer end is open.
Example fix
// before
psync::write_all_at(&file, &data, offset)?;
// after
if fs_free_bytes(&path)? < data.len() as u64 {
return Err(std::io::Error::new(std::io::ErrorKind::StorageFull, "insufficient space"));
}
psync::write_all_at(&file, &data, offset)?; Defensive patterns
Strategy: try-catch
Validate before calling
// Rust
if fs2::available_space(&path)? < data.len() as u64 {
return Err(std::io::Error::new(std::io::ErrorKind::StorageFull, "insufficient space"));
} Try / catch
// Rust
match psync::write_all_at(&file, &data, offset) {
Ok(()) => {}
Err(e) if e.kind() == std::io::ErrorKind::WriteZero => { /* ENOSPC handling: free space, reopen, retry */ }
Err(e) => return Err(e.into()),
} Prevention
- Monitor free space/quota on target volumes
- Don't share writable files across processes without locking
- Cap file sizes and check before writing
- Handle WriteZero as ENOSPC-equivalent in sync I/O paths
When it happens
Trigger: Calling write_all_at where an individual positioned write returns Ok(0): volume is full or at quota, the file was truncated concurrently, or the target is a special file whose write end is closed.
Common situations: Disk-full during a large synchronous write; another process shrank the file mid-write; writing to a full tmpfs or a size-limited container volume; quota enforced on network filesystems.
Understand the failure class
Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.
Related errors
- file refused further writes
- file refused further writes
- file ended before the requested read length
- file shrank while reading
- file refused further writes
AI-assisted analysis of EpicGames/lore@074eb0b0d1 (2026-09-13).
Data as JSON: /api/errors/ea7bef39f386a850.
Report an issue: GitHub.
Appendix: source
Thrown at lore-io/src/psync.rs:110
.await
}
/// Writes all `len` bytes, looping inside one dispatch. See [`Self::read_exact_at`].
pub(crate) async fn write_all_at<B: StableBuf>(
&self,
file: Arc<File>,
buffer: B,
len: usize,
offset: u64,
) -> std::io::Result<B> {
SyscallPool::global()
.submit(move || {
let mut done = 0;
while done < len {
let written =
write_at_impl(&file, &buffer.as_ref()[done..len], offset + done as u64)?;
if written == 0 {
return Err(std::io::Error::new(
std::io::ErrorKind::WriteZero,
"file refused further writes",
));
}
done += written;
}
Ok(buffer)
})
.await
}
pub(crate) async fn write_at<B: StableBuf>(
&self,
file: Arc<File>,
buffer: B,
buffer_offset: usize,
len: usize,
offset: u64,View on GitHub (pinned to 074eb0b0d1)