From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 07B8F385828A; Thu, 11 Aug 2022 20:30:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07B8F385828A From: "mliska at suse dot cz" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: debuginfod X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mliska at suse dot cz X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Aug 2022 20:30:36 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29474 --- Comment #2 from Martin Liska --- So it's the prefetching feature as documented here: // 3) extract some number of prefetched entries (just into fdcache) ... if (r !=3D 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=3D" << 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 fr= om! continue; } So what's bad is that handle_buildid_r_match begins with: // check for a match in the fdcache first int fd =3D fdcache.lookup(b_source0, b_source1); while (fd >=3D 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= :/ --=20 You are receiving this mail because: You are on the CC list for the bug.=