{"record":{"id":"985746b956d6565b","repo":"openai/codex","slug":"failed-to-fork-for-bubblewrap-err","errorCode":null,"errorMessage":"failed to fork for bubblewrap: {err}","messagePattern":"failed to fork for bubblewrap: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/linux-sandbox/src/linux_run_main.rs","lineNumber":584,"sourceCode":"}\n\nfn run_bwrap_in_child_with_synthetic_mount_cleanup(bwrap_args: crate::bwrap::BwrapArgs) -> ! {\n    let crate::bwrap::BwrapArgs {\n        args,\n        preserved_files,\n        synthetic_mount_targets,\n        protected_create_targets,\n    } = bwrap_args;\n    let setup_signal_mask = ForwardedSignalMask::block();\n    let synthetic_mount_registrations = register_synthetic_mount_targets(&synthetic_mount_targets);\n    let protected_create_registrations =\n        register_protected_create_targets(&protected_create_targets);\n    let exec_start_pipe = create_exec_start_pipe(!protected_create_targets.is_empty());\n    let parent_pid = unsafe { libc::getpid() };\n    let pid = unsafe { libc::fork() };\n    if pid < 0 {\n        let err = std::io::Error::last_os_error();\n        panic!(\"failed to fork for bubblewrap: {err}\");\n    }\n\n    if pid == 0 {\n        reset_forwarded_signal_handlers_to_default();\n        setup_signal_mask.restore();\n        let setpgid_res = unsafe { libc::setpgid(0, 0) };\n        if setpgid_res < 0 {\n            let err = std::io::Error::last_os_error();\n            panic!(\"failed to place bubblewrap child in its own process group: {err}\");\n        }\n        terminate_with_parent(parent_pid);\n        wait_for_parent_exec_start(exec_start_pipe[0], exec_start_pipe[1]);\n        exec_bwrap(args, preserved_files);\n    }\n\n    close_child_exec_start_read(exec_start_pipe[0]);\n    let protected_create_monitor = ProtectedCreateMonitor::start(&protected_create_targets);\n    let signal_forwarders = install_bwrap_signal_forwarders(pid);","sourceCodeStart":566,"sourceCodeEnd":602,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/linux-sandbox/src/linux_run_main.rs#L566-L602","documentation":"Error \"failed to fork for bubblewrap: {err}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/linux-sandbox/src/linux_run_main.rs:584 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"}