public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "mliska at suse dot cz" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug debuginfod/29474] Server returns 404 for concurrent requests when leading to a same .rpm
Date: Thu, 11 Aug 2022 20:30:35 +0000	[thread overview]
Message-ID: <bug-29474-10460-Uepdg6VzAJ@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29474-10460@http.sourceware.org/bugzilla/>

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

--- Comment #2 from Martin Liska <mliska at suse dot cz> ---
So it's the prefetching feature as documented here:

  // 3) extract some number of prefetched entries (just into fdcache)
...
      if (r != 0) // stage 3
        {
          // NB: now we know we have a complete reusable file; make fdcache
          // responsible for unlinking it later.
          obatched(clog) << "INTERN " << b_source1 << " filename=" << fn <<
endl;
          fdcache.intern(b_source0, fn,
                         tmppath, archive_entry_size(e),
                         false); // prefetched ones go to the prefetch cache
          prefetch_count --;
          close (fd); // we're not saving this fd to make a mhd-response from!
          continue;
        }

So what's bad is that
handle_buildid_r_match begins with:

  // check for a match in the fdcache first
  int fd = fdcache.lookup(b_source0, b_source1);
  while (fd >= 0) // got one!; NB: this is really an if() with a possible
branch out to the end
    {
...
    }

which was false, but happens to be true once another thread inters the file :/

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

  parent reply	other threads:[~2022-08-11 20:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11 16:48 [Bug debuginfod/29474] New: " mliska at suse dot cz
2022-08-11 20:17 ` [Bug debuginfod/29474] " mliska at suse dot cz
2022-08-11 20:30 ` mliska at suse dot cz [this message]
2022-08-11 20:39 ` mliska at suse dot cz
2022-08-11 20:42 ` mliska at suse dot cz
2022-08-15  7:55 ` mliska at suse dot cz
2022-08-15 10:27 ` fche at redhat dot com

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-29474-10460-Uepdg6VzAJ@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).