{"record":{"id":"278ac9a5318b10b1","repo":"openai/codex","slug":"failed-to-remove-stale-synthetic-bubblewrap-mount","errorCode":null,"errorMessage":"failed to remove stale synthetic bubblewrap mount marker {}: {err}","messagePattern":"failed to remove stale synthetic bubblewrap mount marker (.+?): (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/linux-sandbox/src/linux_run_main.rs","lineNumber":1081,"sourceCode":"        let entry = entry.unwrap_or_else(|err| {\n            panic!(\n                \"failed to read synthetic bubblewrap mount marker in {}: {err}\",\n                marker_dir.display()\n            )\n        });\n        let path = entry.path();\n        let Some(pid) = path\n            .file_name()\n            .and_then(|name| name.to_str())\n            .and_then(|name| name.parse::<libc::pid_t>().ok())\n        else {\n            continue;\n        };\n        if !process_is_active(pid) {\n            match fs::remove_file(&path) {\n                Ok(()) => {}\n                Err(err) if err.kind() == std::io::ErrorKind::NotFound => {}\n                Err(err) => panic!(\n                    \"failed to remove stale synthetic bubblewrap mount marker {}: {err}\",\n                    path.display()\n                ),\n            }\n            continue;\n        }\n        let matches_marker = matches_marker(&path);\n        if matches_marker {\n            return true;\n        }\n    }\n    false\n}\n\nfn cleanup_synthetic_mount_targets(targets: &[SyntheticMountTargetRegistration]) {\n    with_synthetic_mount_registry_lock(|| {\n        for target in targets.iter().rev() {\n            match fs::remove_file(&target.marker_file) {","sourceCodeStart":1063,"sourceCodeEnd":1099,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/linux-sandbox/src/linux_run_main.rs#L1063-L1099","documentation":"A stale synthetic-mount marker file belonging to a dead process could not be removed from the marker directory. This panic in synthetic_mount_marker_dir_has_active_process_matching fires during cleanup when remove_file on a marker whose pid is no longer active fails with an error other than NotFound — e.g. EACCES — so garbage marker accumulation or permission problems prevent the liveness scan from proceeding.","triggerScenarios":"Thrown at codex-rs/linux-sandbox/src/linux_run_main.rs:1081 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check permissions on the marker file and its parent directory for the running uid","Manually remove stale marker files under the synthetic mount registry temp dir","Verify no other uid owns the marker files (mixed-user runs share the registry root)","Report as a bug if permissions look correct"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}