{"record":{"id":"c980f12660ebf91b","repo":"gitbutlerapp/gitbutler","slug":"interrupted-while-creating-repository-dump","errorCode":null,"errorMessage":"Interrupted while creating repository dump","messagePattern":"Interrupted while creating repository dump","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/but-debug/src/command/dump/progress.rs","lineNumber":115,"sourceCode":"        self.bytes_read.set_max(Some(bytes_read));\n        self.files_processed.set_max(Some(files_processed));\n    }\n\n    fn add_bytes_read(&self, amount: usize) {\n        self.bytes_read.inc_by(amount);\n    }\n\n    fn add_bytes_written(&self, amount: usize) {\n        self.bytes_written.inc_by(amount);\n    }\n\n    pub(super) fn add_file_processed(&self) {\n        self.files_processed.inc();\n    }\n\n    pub(super) fn check_abort(&self) -> Result<()> {\n        if gix::interrupt::IS_INTERRUPTED.load(Ordering::SeqCst) {\n            bail!(\"Interrupted while creating repository dump\");\n        }\n        Ok(())\n    }\n\n    fn check_abort_io(&self) -> io::Result<()> {\n        if gix::interrupt::IS_INTERRUPTED.load(Ordering::SeqCst) {\n            return Err(io::Error::other(\n                \"interrupted while creating repository dump\",\n            ));\n        }\n        Ok(())\n    }\n}\n\nimpl Drop for DumpProgress {\n    fn drop(&mut self) {\n        if let Some(renderer) = self.renderer.take() {\n            renderer.shutdown_and_wait();","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/crates/but-debug/src/command/dump/progress.rs#L97-L133","documentation":"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).","triggerScenarios":"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().","commonSituations":"User presses Ctrl-C during `but debug dump`; a supervisor sends SIGINT; test harness cancels a long-running dump of a large repository.","solutions":["Wait for the dump to complete, or re-run it when time permits — this is an intentional cancellation, not a bug","If the abort is unwanted, avoid sending SIGINT/SIGTERM to the process; run it under nohup or a service manager","Ensure the partial dump output is discarded and re-run to produce a complete dump","If interrupts are triggered spuriously, check the harness/CI for stray signal delivery"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match dump::run(args) {\n    Err(e) if e.to_string().contains(\"Interrupted while creating repository dump\") => {\n        // user cancellation: clean up partial output, exit 130\n        std::process::exit(130);\n    }\n    other => other?,\n}","preventionTips":["Don't send SIGINT to long dumps unless cancellation is intended","Run long dumps under nohup/systemd-run to shield from terminal signals","Discard partial dump files after an interrupt and re-run"],"tags":["interrupt","signal","dump","cancelation"],"backgroundTag":"thread-interrupted","analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}