{"record":{"id":"483c135264beaa89","repo":"openai/codex","slug":"failed-to-exec-system-bubblewrap-program-path","errorCode":null,"errorMessage":"failed to exec system bubblewrap {program_path}: {err}","messagePattern":"failed to exec system bubblewrap (.+?): (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/linux-sandbox/src/launcher.rs","lineNumber":232,"sourceCode":"\n    let program_path = program.as_path().display().to_string();\n    let program = CString::new(program.as_path().as_os_str().as_bytes())\n        .unwrap_or_else(|err| panic!(\"invalid system bubblewrap path: {err}\"));\n    let cstrings = argv_to_cstrings(&argv);\n    let mut argv_ptrs: Vec<*const c_char> = cstrings\n        .iter()\n        .map(CString::as_c_str)\n        .map(CStr::as_ptr)\n        .collect();\n    argv_ptrs.push(std::ptr::null());\n\n    // SAFETY: `program` and every entry in `argv_ptrs` are valid C strings for\n    // the duration of the call. On success `execv` does not return.\n    unsafe {\n        libc::execv(program.as_ptr(), argv_ptrs.as_ptr());\n    }\n    let err = std::io::Error::last_os_error();\n    panic!(\"failed to exec system bubblewrap {program_path}: {err}\");\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use pretty_assertions::assert_eq;\n    use std::os::unix::fs::PermissionsExt;\n    use tempfile::NamedTempFile;\n\n    #[test]\n    fn prefers_system_bwrap_when_help_lists_argv0() {\n        let fake_bwrap = NamedTempFile::new().expect(\"temp file\");\n        let fake_bwrap_path = fake_bwrap.path();\n        let expected = AbsolutePathBuf::from_absolute_path(fake_bwrap_path).expect(\"absolute\");\n\n        assert_eq!(\n            system_bwrap_launcher_for_path_with_probe(fake_bwrap_path, |_| {\n                Some(SystemBwrapCapabilities {","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/linux-sandbox/src/launcher.rs#L214-L250","documentation":"Error \"failed to exec system bubblewrap {program_path}: {err}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/linux-sandbox/src/launcher.rs:232 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":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}