{"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":"anyhow::Error","httpStatus":null,"severity":"info","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/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but-debug/src/command/dump/progress.rs#L97-L133","documentation":"`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.","triggerScenarios":"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()`.","commonSituations":"User cancels a long dump of a large repository; a wrapper script times out the command and sends SIGINT; CI job cancellation.","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()`."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Treat interrupt-abort as cancellation, not failure\nif err.to_string().contains(\"Interrupted while creating repository dump\") {\n    std::process::exit(130); // conventional SIGINT exit status\n}","preventionTips":["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."],"tags":["interrupt","cancellation","dump","signal"],"backgroundTag":"operation-cancelled","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}