{"record":{"id":"ae9f166b36ba7be5","repo":"xai-org/grok-build","slug":"grok-update-failed-with","errorCode":null,"errorMessage":"grok update failed with {}","messagePattern":"grok update failed with (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codegen/xai-grok-update/src/auto_update.rs","lineNumber":859,"sourceCode":"            // stderr must be null, not piped: `.status()` does not drain\n            // pipes, so if the child writes more than the OS pipe buffer\n            // (~16 KB macOS / ~64 KB Linux) to stderr (e.g. download\n            // progress bars), the child blocks on the write while the\n            // parent blocks on waitpid — deadlocking both processes.\n            // With `panic = \"abort\"`, the blocked child eventually\n            // receives SIGABRT.\n            cmd.stdin(Stdio::null())\n                .stdout(Stdio::null())\n                // inherit, not piped: the TUI is already restored so the\n                // parent's stderr fd is a normal terminal. inherit lets\n                // the child's diagnostic output reach the user. piped +\n                // status() would immediately close the read end → EPIPE\n                // → panic → SIGABRT (signal 6) under panic=abort.\n                .stderr(Stdio::inherit());\n            // No detach: the child must stay in the foreground process group so Ctrl+C cancels it with the parent; the atomic install protocol makes mid-download kills safe.\n            let status = cmd.status().await?;\n            if !status.success() {\n                anyhow::bail!(\"grok update failed with {}\", status);\n            }\n            Ok(None)\n        }\n        UpdateRunMode::NonBlocking => {\n            cmd.stdin(Stdio::null())\n                .stdout(Stdio::null())\n                .stderr(Stdio::null());\n            // Detach = new session (Ctrl+C isolation), not handle abandonment:\n            // the child is still ours to wait() on.\n            xai_grok_tools::util::detach_command(&mut cmd);\n            #[allow(clippy::disallowed_methods)] // the caller owns the returned handle\n            let child = cmd.spawn()?;\n            Ok(Some(child))\n        }\n    }\n}\n\n/// Resolve the grok binary path for re-execution after an update.","sourceCodeStart":841,"sourceCodeEnd":877,"githubUrl":"https://github.com/xai-org/grok-build/blob/bc7f02eddd3d84085849dc19ed216f11c23b0571/crates/codegen/xai-grok-update/src/auto_update.rs#L841-L877","documentation":"Error \"grok update failed with {}\" thrown in xai-org/grok-build.","triggerScenarios":"Thrown at crates/codegen/xai-grok-update/src/auto_update.rs:859 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bc7f02eddd3d84085849dc19ed216f11c23b0571","analyzedAt":"2026-08-31T04:59:42.031Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}