From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simark@simark.ca>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix race in background index-cache writing
Date: Fri, 31 Mar 2023 08:39:47 -0600 [thread overview]
Message-ID: <87y1nd6l3g.fsf@tromey.com> (raw)
In-Reply-To: <fdc6a2e2-c847-2bdb-8ae8-34319007801c@simark.ca> (Simon Marchi's message of "Thu, 30 Mar 2023 10:27:22 -0400")
>> This patch avoids the race by rearranging the code slightly, to ensure
>> the cache cannot possibly be written before the member is set.
Simon> I've been seeing a lot of random failures of the index-cache tests
Simon> lately on my CI, so I presume this will help.
Hopefully.
Simon> An alternative I see would be to make cooked_index::cooked_index set the
Simon> per_bfd field itself (before starting the background task). But if you
Simon> don't find it a clean solution for whatever reason, I think what you
Simon> have is fine.
I'm not sure I want cooked_index modifying the dwarf per-bfd.
This area is all rewritten again on my WIP branch to move all DWARF
reading to workers. There, the index_table member is set very early in
the DWARF reading process. I looked at extracting this code, but it's
tied in to how background reading works.
Tom
prev parent reply other threads:[~2023-03-31 14:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 21:55 Tom Tromey
2023-03-30 14:27 ` Simon Marchi
2023-03-31 14:39 ` Tom Tromey [this message]
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=87y1nd6l3g.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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).