public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "mark at klomp dot org" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug debuginfod/28240] debuginfod client cache falsely sticky for root user
Date: Sun, 24 Apr 2022 18:48:30 +0000	[thread overview]
Message-ID: <bug-28240-10460-WxkJriQM0V@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28240-10460@http.sourceware.org/bugzilla/>

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

--- Comment #3 from Mark Wielaard <mark at klomp dot org> ---
We got rid of the zero-permission 000 files with:

commit 8b568fdea8e1baea3d68cc38dec587e4c9219276
Author: Aaron Merey <amerey@redhat.com>
Date:   Fri Apr 8 19:37:11 2022 -0400

    PR29022: 000-permissions files cause problems for backups

    000-permission files currently used for negative caching can cause
    permission problems for some backup software and disk usage checkers.
    Fix this by using empty files for negative caching instead.

    Also use each empty file's mtime to determine the time since
    last download attempt instead of the cache_miss_s file's mtime.

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

    Tested-by: Milian Wolff <mail@milianw.de>
    Signed-off-by: Aaron Merey <amerey@redhat.com>

And I think that also got rid of this race issue.

Any other client that races past us now will either create a new empty file
with   
open (target_cache_path, O_CREAT|O_EXCL, DEFFILEMODE) or puts in a new
non-empty file using rename (target_cache_tmppath, target_cache_path). Both of
which are atomic.

So I think this is resolved now. But would like someone else to double check.
These races are tricky.

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

  parent reply	other threads:[~2022-04-24 18:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 10:25 [Bug debuginfod/28240] New: " fche at redhat dot com
2021-10-22 16:59 ` [Bug debuginfod/28240] " fche at redhat dot com
2021-10-25 12:35 ` mark at klomp dot org
2022-04-24 18:48 ` mark at klomp dot org [this message]
2023-10-09 16:14 ` mark at klomp dot org
2023-10-16 15:11 ` mark at klomp dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-28240-10460-WxkJriQM0V@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=elfutils-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).