{"record":{"id":"a110746bdf69c7e0","repo":"zed-industries/zed","slug":"git-log-command-failed-with","errorCode":null,"errorMessage":"git log command failed with {}","messagePattern":"git log command failed with (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/git/src/repository.rs","lineNumber":3374,"sourceCode":"                        }\n                        .into());\n                    }\n                }\n\n                return Ok(());\n            }\n\n            if git_binary.is_trusted {\n                let git_binary = git_binary.envs(HashMap::clone(&env));\n                git_binary\n                    .run(&[\"hook\", \"run\", \"--ignore-missing\", hook.as_str()])\n                    .await?;\n            }\n            Ok(())\n        }\n        .boxed()\n    }\n\n    fn initial_graph_data(\n        &self,\n        log_source: LogSource,\n        log_order: LogOrder,\n        request_tx: Sender<Vec<Arc<InitialGraphCommitData>>>,\n    ) -> BoxFuture<'_, Result<()>> {\n        let git = self.git_binary();\n\n        async move {\n            let log_source_args = log_source.get_args();\n            let mut git_log_command = vec![\"log\", GRAPH_COMMIT_FORMAT, log_order.as_arg()];\n            git_log_command.extend(log_source_args.iter().map(|arg| arg.as_ref()));\n            let mut command = git.build_command(&git_log_command);\n            command.stdout(Stdio::piped());\n            command.stderr(Stdio::piped());\n\n            let mut child = command.spawn()?;\n            let stdout = child.stdout.take().context(\"failed to get stdout\")?;","sourceCodeStart":3356,"sourceCodeEnd":3392,"githubUrl":"https://github.com/zed-industries/zed/blob/5a9b9558db01a6b906cec2fb70a797affdc58cdd/crates/git/src/repository.rs#L3356-L3392","documentation":"A streamed `git log` child process exited non-zero and stderr was empty or could not be read (the stderr read failure is only logged), so only the process exit status is reported. This shape — failure with no stderr — usually means the process was killed by a signal rather than git printing an error.","triggerScenarios":"git killed by a signal (status like `signal: 9 (SIGKILL)` from OOM killers or sandbox policies); the git binary removed or replaced mid-session; resource exhaustion during long history scans; stdin/stderr pipes closed early.","commonSituations":"Streaming history of very large repositories under memory pressure; sandboxed CI environments killing child processes; PATH changes underneath a long-lived application so the spawned binary disappears.","solutions":["Retry once: signal kills and transient resource exhaustion are the most common silent exits.","Inspect the reported status: `signal: N (SIGKILL)` points to an external kill, while an exit code points to git itself.","Reproduce by running the same `git log` arguments manually to see whether any stderr appears.","If SIGKILL recurs, check system logs for OOM or sandbox kills and reduce the scan scope."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match log_result {\n    Err(e) if e.to_string().contains(\"git log command failed with\")\n        && e.to_string().contains(\"signal\") =>\n    {\n        // process was killed (OOM/sandbox): safe to retry once with a narrower scope\n    }\n    other => other?,\n}","preventionTips":["Watch child process memory when streaming history of huge repos; narrow the scope instead of scanning everything.","Do not change PATH under a running app that spawns git.","Distinguish `signal: N` from exit codes in the status text — signals point to external kills."],"tags":["git","log","subprocess","signal"],"backgroundTag":"git-command-failed","analyzedSha":"5a9b9558db01a6b906cec2fb70a797affdc58cdd","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}