openai/codex · error
failed to remove stale synthetic bubblewrap mount marker
Error message
failed to remove stale synthetic bubblewrap mount marker {}: {err} What it means
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.
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
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at codex-rs/linux-sandbox/src/linux_run_main.rs:1081 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/278ac9a5318b10b1.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/linux-sandbox/src/linux_run_main.rs:1081
let entry = entry.unwrap_or_else(|err| {
panic!(
"failed to read synthetic bubblewrap mount marker in {}: {err}",
marker_dir.display()
)
});
let path = entry.path();
let Some(pid) = path
.file_name()
.and_then(|name| name.to_str())
.and_then(|name| name.parse::<libc::pid_t>().ok())
else {
continue;
};
if !process_is_active(pid) {
match fs::remove_file(&path) {
Ok(()) => {}
Err(err) if err.kind() == std::io::ErrorKind::NotFound => {}
Err(err) => panic!(
"failed to remove stale synthetic bubblewrap mount marker {}: {err}",
path.display()
),
}
continue;
}
let matches_marker = matches_marker(&path);
if matches_marker {
return true;
}
}
false
}
fn cleanup_synthetic_mount_targets(targets: &[SyntheticMountTargetRegistration]) {
with_synthetic_mount_registry_lock(|| {
for target in targets.iter().rev() {
match fs::remove_file(&target.marker_file) {View on GitHub (pinned to 339751715c)