You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 19, 2026. It is now read-only.
RecoverStaleDirs: an unremovable stale temp dir reports Error on every store operation, but the operation succeeds #2401
When RecoverStaleDirs cannot remove a stale temp dir, the failure is joined into a returned error and surfaces as Error: getting store info: ... on ordinary commands. The command then completes and prints its output normally, so the operation has in fact succeeded. The message repeats on every subsequent store operation indefinitely, and does not say what to do about it.
What I saw
A single podman ps -a invocation, printing the error and the container list together:
$ podman ps -a --format "{{.Names}}"
Error: getting store info: error removing stale temp dir: unlinkat /var/home/core/.local/share/containers/storage/overlay/tempdirs/temp-dir-489503836/1-<layer>/diff/usr/local/share/perl/5.34.0/OpenSRF/Transport/Redis/BusConnection.pm: permission denied
evergreen-rag_db_1
evergreen-rag_ollama_1
evergreen-rag_rag_1
This repeated on every store operation for about a month.
Cause, which was mine
I had written files into a container's layer with sudo — real root, outside the rootless user namespace — so when the container was removed, podman moved the layer to tempdirs/ and could not unlink the root-owned files or their parent directories. That part is my own misuse and I am not asking for it to be defended against.
Once I corrected ownership, podman reaped the directory on the next store operation with no further action:
$ sudo chown -R core:core .../tempdirs/temp-dir-489503836
$ podman ps -a --format "{{.Names}}" # no error; directory gone
The part that seems worth separating from the cause
Removing a stale temp dir is best-effort garbage collection. Whatever makes it fail, the user's command still did what it was asked. Reporting it as Error: on an operation that succeeded is misleading, and because nothing self-heals, it recurs forever.
ifrmErr:=os.RemoveAll(tempDirPath); rmErr!=nil&&!os.IsNotExist(rmErr) {
recoveryErrors=append(recoveryErrors, fmt.Errorf("error removing stale temp dir %s: %w", tempDirPath, rmErr))
}
...returnerrors.Join(recoveryErrors...)
A warning that leaves the command's own exit status alone would read more accurately, and naming the directory as something safe to remove would make it actionable.
I have no reproducer that does not involve my own misuse, so treat the severity accordingly — I am reporting the handling, not claiming a defect in the cleanup itself.
Activity
github-actions commentedon Oct 7, 2026
This repository has been migrated to https://github.com/containers/container-libs. Please open your issue there.