From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C804E3858429; Thu, 11 Aug 2022 20:17:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C804E3858429 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:17:23 +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:17:23 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29474 --- Comment #1 from Martin Liska --- Have a better knowledge of what happens. Let's assume the following debuggi= ng patch: diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx index a089d0bd..0320f289 100644 --- a/debuginfod/debuginfod.cxx +++ b/debuginfod/debuginfod.cxx @@ -1743,7 +1743,10 @@ handle_buildid_r_match (bool internal_req_p, continue; if (fdcache.probe (b_source0, fn)) // skip if already interned + { + obatched(clog) << "SKIPPING due to probe=3D" << b_source1 << " filename=3D" << fn << " r=3D" << r << endl; continue; + } // extract this file to a temporary file char* tmppath =3D NULL; @@ -1776,6 +1779,7 @@ handle_buildid_r_match (bool internal_req_p, { // 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 cac= he @@ -1792,6 +1796,7 @@ handle_buildid_r_match (bool internal_req_p, inc_metric ("http_responses_total","result",archive_extension + " archive"); r =3D MHD_create_response_from_fd (archive_entry_size(e), fd); + obatched(clog) << "ASSIGN " << b_source1 << " filename=3D" << fn << = " r=3D" << r << endl; if (r =3D=3D 0) { if (verbose) @@ -1820,6 +1825,7 @@ handle_buildid_r_match (bool internal_req_p, } // XXX: rpm/file not found: delete this R entry? + obatched(clog) << "RETURN" << b_source1 << " r=3D" << r << endl; return r; } debuginfod log shows: ... [Thu 11 Aug 2022 08:02:42 PM GMT] (21225/21257): found mtime=3D1659137364 s= type=3DR source0=3D/home/marxin/BIG/test/cross-aarch64-gcc12-debuginfo-12.1.1+git287= -1.1.x86_64.rpm source1=3D/usr/lib/debug/.dwz/cross-aarch64-gcc12-12.1.1+git287-1.1.x86_64 [Thu 11 Aug 2022 08:02:42 PM GMT] (21225/21251): found mtime=3D1659137364 s= type=3DR source0=3D/home/marxin/BIG/test/cross-aarch64-gcc12-debuginfo-12.1.1+git287= -1.1.x86_64.rpm source1=3D/usr/lib/debug/usr/aarch64-suse-linux/sys-root/lib64/libgcc_s.so.= 1-12.1.1+git287-1.1.x86_64.debug ... [Thu 11 Aug 2022 08:02:42 PM GMT] (21225/21257): INTERN /usr/lib/debug/.dwz/cross-aarch64-gcc12-12.1.1+git287-1.1.x86_64 filename=3D/usr/lib/debug/usr/aarch64-suse-linux/sys-root/lib64/libgcc_s.so= .1-12.1.1+git287-1.1.x86_64.debug <- so here 21257 request interns libgcc_s.so.1-12.1.1+git287-1.1.x86_64.deb= ug [Thu 11 Aug 2022 08:02:42 PM GMT] (21225/21251): SKIPPING due to probe=3D/usr/lib/debug/usr/aarch64-suse-linux/sys-root/lib64/libgcc_s.so.1-= 12.1.1+git287-1.1.x86_64.debug filename=3D/usr/lib/debug/usr/aarch64-suse-linux/sys-root/lib64/libgcc_s.so= .1-12.1.1+git287-1.1.x86_64.debug r=3D0 <- and due to that it's skipped here and we never assign r =3D ... [Thu 11 Aug 2022 08:02:43 PM GMT] (21225/21251): RETURN/usr/lib/debug/usr/aarch64-suse-linux/sys-root/lib64/libgcc_s.so.1-12= .1.1+git287-1.1.x86_64.debug r=3D0 ... Note in correct run the following happens: [Thu 11 Aug 2022 08:16:42 PM GMT] (22289/22319): ASSIGN /usr/lib/debug/usr/aarch64-suse-linux/sys-root/lib64/libgcc_s.so.1-12.1.1+g= it287-1.1.x86_64.debug filename=3D/usr/lib/debug/usr/aarch64-suse-linux/sys-root/lib64/libgcc_s.so= .1-12.1.1+git287-1.1.x86_64.debug r=3D0x7fff740548c0 ... [Thu 11 Aug 2022 08:16:43 PM GMT] (22289/22319): RETURN/usr/lib/debug/usr/aarch64-suse-linux/sys-root/lib64/libgcc_s.so.1-12= .1.1+git287-1.1.x86_64.debug r=3D0x7fff740548c0 So the problem is somehow related to fdcache. --=20 You are receiving this mail because: You are on the CC list for the bug.=