public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug debuginfod/28339] New: groom/scan race condition
@ 2021-09-14 12:15 fche at redhat dot com
  2021-09-15 17:33 ` [Bug debuginfod/28339] " fche at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: fche at redhat dot com @ 2021-09-14 12:15 UTC (permalink / raw)
  To: elfutils-devel

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

            Bug ID: 28339
           Summary: groom/scan race condition
           Product: elfutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: debuginfod
          Assignee: fche at redhat dot com
          Reporter: fche at redhat dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

debuginfod's scan and groom operations (thread_main_scanner, 
thread_main_fts_source_paths) are intended to be mutually exclusive,
as a substitute for more complicated sql transaction batching.  (This
is because scanning / grooming involves inserting or deleting data
from multiple related tables.)

The workq class that governs this in debuginfod.cxx has a problem: if
the workq just becomes empty, its sole entry pulled by a scanner thread
in response to a wait_front(), an 'idler' groomer thread is ALSO permitted
to run, because there is no indication as to when the scanner thread
operation finishes, only when it starts.

Extending the workq with a counter ("fronters") to track any active
scanning activity (even if the workq is empty) lets us block idlers
groomers a little longer.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug debuginfod/28339] groom/scan race condition
  2021-09-14 12:15 [Bug debuginfod/28339] New: groom/scan race condition fche at redhat dot com
@ 2021-09-15 17:33 ` fche at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: fche at redhat dot com @ 2021-09-15 17:33 UTC (permalink / raw)
  To: elfutils-devel

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

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> ---
commit 2ff803956d6aaefeed3bc3f186da6fe666c7b1b6 
Author: Frank Ch. Eigler <fche@redhat.com>
Date:   Tue Sep 14 08:15:23 2021 -0400

    PR28339: debuginfod: fix groom/scan race condition on just-emptied queue

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-15 17:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 12:15 [Bug debuginfod/28339] New: groom/scan race condition fche at redhat dot com
2021-09-15 17:33 ` [Bug debuginfod/28339] " fche at redhat dot com

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).