uutils/coreutils · error
Internal dd Error: Seek amount greater than signed 64-bit in
Error message
Internal dd Error: Seek amount greater than signed 64-bit integer
What it means
Error "Internal dd Error: Seek amount greater than signed 64-bit integer" thrown in uutils/coreutils.
Source
Thrown at src/uu/dd/src/dd.rs:747
}
/// Decide whether the given buffer is all zeros.
fn is_sparse(buf: &[u8]) -> bool {
buf.iter().all(|&e| e == 0u8)
}
/// Handle O_DIRECT write errors by temporarily removing the flag and retrying.
/// This follows GNU dd behavior for partial block writes with O_DIRECT.
#[cfg(any(target_os = "linux", target_os = "android"))]
fn handle_o_direct_write(f: &mut File, buf: &[u8], original_error: io::Error) -> io::Result<usize> {
use rustix::fs::{OFlags, fcntl_getfl, fcntl_setfl};
// Get current flags
let Ok(oflags) = fcntl_getfl(&*f) else {
return Err(original_error);
};
// If O_DIRECT is set, try removing it temporarily
if oflags.contains(OFlags::DIRECT) {
let flags_without_direct = oflags & !OFlags::DIRECT;
// Remove O_DIRECT flag
fcntl_setfl(&*f, flags_without_direct).map_err(|_| original_error)?;
// Retry the write without O_DIRECT
let write_result = f.write(buf);
// Restore O_DIRECT flag (GNU doesn't restore it, but we'll be safer)
// Log any restoration errors without failing the operation
if let Err(e) = fcntl_setfl(&*f, oflags).map_err(io::Error::from) {
// Just log the error, don't fail the whole operation
show_error!("Failed to restore O_DIRECT flag: {e}");
}
write_result
} else {View on GitHub (pinned to 9ff4114e82)
Solutions
- Use seek/skip values that fit in a signed 64-bit integer.
- Split very large offsets into multiple smaller seek operations.
When it happens
Trigger: Occurs when dd computes a seek amount exceeding the range of a signed 64-bit integer.
Common situations: Using enormous seek/skip values multiplied by a large block size, overflowing i64.
AI-assisted analysis of uutils/coreutils@9ff4114e82 (2026-08-19).
Data as JSON: /api/errors/1b30064e48005451.
Report an issue: GitHub.