gitbutlerapp/gitbutler · warning

Interrupted while creating repository dump

Error message

Interrupted while creating repository dump

What it means

During a repository dump, check_abort polls gix::interrupt::IS_INTERRUPTED; when an interrupt (e.g. Ctrl-C) was delivered, it bails with this message so the dump stops promptly instead of completing a partial output file. It is invoked from the dump's tree/entry visitors (visit_worktree_entries, visit_git_entries, collect_git_entries).

Solutions

  1. Wait for the dump to complete, or re-run it when time permits — this is an intentional cancellation, not a bug
  2. If the abort is unwanted, avoid sending SIGINT/SIGTERM to the process; run it under nohup or a service manager
  3. Ensure the partial dump output is discarded and re-run to produce a complete dump
  4. If interrupts are triggered spuriously, check the harness/CI for stray signal delivery
Defensive patterns

Strategy: try-catch

Try / catch

match dump::run(args) {
    Err(e) if e.to_string().contains("Interrupted while creating repository dump") => {
        // user cancellation: clean up partial output, exit 130
        std::process::exit(130);
    }
    other => other?,
}

Prevention

When it happens

Trigger: The process receives an interrupt signal (IS_INTERRUPTED set by gix's signal handling) while a dump is walking worktree or git entries, and the visitor calls check_abort().

Common situations: User presses Ctrl-C during `but debug dump`; a supervisor sends SIGINT; test harness cancels a long-running dump of a large repository.

Related errors


AI-assisted analysis of gitbutlerapp/gitbutler@58e5313667 (2026-09-18). Data as JSON: /api/errors/c980f12660ebf91b. Report an issue: GitHub.

Appendix: 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 58e5313667)