gitbutlerapp/gitbutler · info · anyhow::Error
Interrupted while creating repository dump
Error message
Interrupted while creating repository dump
What it means
`check_abort()` in the repository-dump progress helper polls `gix::interrupt::IS_INTERRUPTED` (the flag gix's interrupt handler sets on SIGINT/SIGTERM-style triggers) between dump steps. When a trigger fires, dump creation stops with this error instead of producing a partial dump silently. A sibling `check_abort_io()` does the same for io::Result paths.
Source
Thrown at crates/but-debug/src/command/dump/progress.rs:115
self.bytes_read.set_max(Some(bytes_read));
self.files_processed.set_max(Some(files_processed));
}
fn add_bytes_read(&self, amount: usize) {
self.bytes_read.inc_by(amount);
}
fn add_bytes_written(&self, amount: usize) {
self.bytes_written.inc_by(amount);
}
pub(super) fn add_file_processed(&self) {
self.files_processed.inc();
}
pub(super) fn check_abort(&self) -> Result<()> {
if gix::interrupt::IS_INTERRUPTED.load(Ordering::SeqCst) {
bail!("Interrupted while creating repository dump");
}
Ok(())
}
fn check_abort_io(&self) -> io::Result<()> {
if gix::interrupt::IS_INTERRUPTED.load(Ordering::SeqCst) {
return Err(io::Error::other(
"interrupted while creating repository dump",
));
}
Ok(())
}
}
impl Drop for DumpProgress {
fn drop(&mut self) {
if let Some(renderer) = self.renderer.take() {
renderer.shutdown_and_wait();View on GitHub (pinned to caf1f223d3)
Solutions
- No repair needed — rerun the dump command without interrupting; partial output should be discarded and regenerated.
- For large repos, let it finish or run it with output to a file in the background so Ctrl+C isn't needed.
- If dumps are scripted, treat this error as cancellation: exit quietly or retry rather than reporting corruption.
- If it fires without any signal, check for code in your process that calls `gix::interrupt::trigger()`.
Defensive patterns
Strategy: try-catch
Try / catch
// Treat interrupt-abort as cancellation, not failure
if err.to_string().contains("Interrupted while creating repository dump") {
std::process::exit(130); // conventional SIGINT exit status
} Prevention
- Run large dumps detached/backgrounded so Ctrl+C isn't the only way to manage them.
- Discard partial dump artifacts after an interrupt; never treat them as complete.
- Don't call `gix::interrupt::trigger()` from library code while long operations may be in flight.
When it happens
Trigger: Pressing Ctrl+C (or gix receiving a trigger-initiated interrupt) while `but debug dump`-style repository dump creation is iterating files/objects; each loop iteration calls `check_abort()`.
Common situations: User cancels a long dump of a large repository; a wrapper script times out the command and sends SIGINT; CI job cancellation.
Related errors
AI-assisted analysis of gitbutlerapp/gitbutler@caf1f223d3 (2026-08-20).
Data as JSON: /api/errors/c980f12660ebf91b.
Report an issue: GitHub.