[Bug debuginfod/26125] during debuginfod cache cleanup, try harder to rmdir empty dirs

mark at klomp dot org sourceware-bugzilla@sourceware.org
Mon Nov 30 11:46:07 GMT 2020


https://sourceware.org/bugzilla/show_bug.cgi?id=26125

--- Comment #6 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Frank Ch. Eigler from comment #5)
> Yeah, I suppose there is that race possibility.
> 
> One way to fix it is to use something like file locks, such as a flock(2) on
> a designated file such as $CACHE/cache_clean_interval_s.  During
> aging/cleanup, hold a LOCK_EX.  During normal operation (creation of
> build-id subdirectories & files), hold a LOCK_SH to permit multiple clients
> to work independently of one another.

That is somewhat unfortunate given that the current scheme is lock-free. I
wonder if there is some way around it using temp names for the directories,
like we do for the actual file names, so that we can atomically rename them
in-place.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Elfutils-devel mailing list