From: Patrick Steinhardt <ps@pks.im>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, karthik nayak <karthik.188@gmail.com>,
Eric Sunshine <sunshine@sunshineco.com>,
James Liu <james@jamesliu.io>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v4 3/3] refs/reftable: reload locked stack when preparing transaction
Date: Mon, 30 Sep 2024 08:49:40 +0200 [thread overview]
Message-ID: <ZvpJ_zpAcpezXB89@pks.im> (raw)
In-Reply-To: <20240927040752.GA567671@coredump.intra.peff.net>
On Fri, Sep 27, 2024 at 12:07:52AM -0400, Jeff King wrote:
> On Tue, Sep 24, 2024 at 07:33:08AM +0200, Patrick Steinhardt wrote:
>
> > +test_expect_success 'ref transaction: many concurrent writers' '
> > + test_when_finished "rm -rf repo" &&
> > + git init repo &&
> > + (
> > + cd repo &&
> > + # Set a high timeout such that a busy CI machine will not abort
> > + # early. 10 seconds should hopefully be ample of time to make
> > + # this non-flaky.
> > + git config set reftable.lockTimeout 10000 &&
>
> I saw this test racily fail in the Windows CI build. The failure is as
> you might imagine, a few of the background update-ref invocations
> failed:
>
> fatal: update_ref failed for ref 'refs/heads/branch-21': reftable: transaction failure: I/O error
>
> but of course we don't notice because they're backgrounded. And then the
> expected output is missing the branch-21 entry (and in my case,
> branch-64 suffered a similar fate).
>
> At first I thought we probably needed to bump the timeout (and EIO was
> just our way of passing that up the stack). But looking at the
> timestamps in the Actions log, the whole loop took less than 10ms to
> run.
>
> So could this be indicative of a real contention issue specific to
> Windows? I'm wondering if something like the old "you can't delete a
> file somebody else has open" restriction is biting us somehow.
Thanks for letting me know!
I very much expect that this is the scenario that you mention, where we
try to delete a file that is still held open by another process. We're
trying to be mindful about this restriction is the reftable library by
not failing when a call to unlink(3P) fails for any of the tables, and
we do have logic in place to unlink them at a later point in time when
not referenced by the "tables.list" file. So none of the calls to unlink
are error-checked at all.
But there's one file that we _have_ to rewrite, and that is of course
the "tables.list" file itself. We never unlink the file though but only
rename the new instance into place. I think I recently discovered that
we have some problems here, because Windows seemed to allow this in some
scenarios but not in others.
In any case, I've already set up a Windows VM last week, so I'll
investigate the issue later this week.
Patrick
next prev parent reply other threads:[~2024-09-30 6:49 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-17 13:43 [PATCH 0/3] reftable: graceful concurrent writes Patrick Steinhardt
2024-09-17 13:43 ` [PATCH 1/3] refs/reftable: introduce "reftable.lockTimeout" Patrick Steinhardt
2024-09-17 17:46 ` karthik nayak
2024-09-17 17:50 ` Eric Sunshine
2024-09-18 4:31 ` Patrick Steinhardt
2024-09-18 4:31 ` Patrick Steinhardt
2024-09-17 13:43 ` [PATCH 2/3] reftable/stack: allow locking of outdated stacks Patrick Steinhardt
2024-09-17 13:43 ` [PATCH 3/3] refs/reftable: reload locked stack when preparing transaction Patrick Steinhardt
2024-09-17 18:26 ` [PATCH 0/3] reftable: graceful concurrent writes karthik nayak
2024-09-18 4:31 ` Patrick Steinhardt
2024-09-18 4:32 ` [PATCH v2 " Patrick Steinhardt
2024-09-18 4:32 ` [PATCH v2 1/3] refs/reftable: introduce "reftable.lockTimeout" Patrick Steinhardt
2024-09-18 9:22 ` James Liu
2024-09-18 9:39 ` Patrick Steinhardt
2024-09-18 4:32 ` [PATCH v2 2/3] reftable/stack: allow locking of outdated stacks Patrick Steinhardt
2024-09-18 9:26 ` James Liu
2024-09-18 9:39 ` Patrick Steinhardt
2024-09-18 4:32 ` [PATCH v2 3/3] refs/reftable: reload locked stack when preparing transaction Patrick Steinhardt
2024-09-18 9:33 ` [PATCH v2 0/3] reftable: graceful concurrent writes James Liu
2024-09-18 9:59 ` [PATCH v3 " Patrick Steinhardt
2024-09-18 9:59 ` [PATCH v3 1/3] refs/reftable: introduce "reftable.lockTimeout" Patrick Steinhardt
2024-09-19 21:34 ` Junio C Hamano
2024-09-18 9:59 ` [PATCH v3 2/3] reftable/stack: allow locking of outdated stacks Patrick Steinhardt
2024-09-20 18:10 ` Junio C Hamano
2024-09-24 5:33 ` Patrick Steinhardt
2024-09-18 9:59 ` [PATCH v3 3/3] refs/reftable: reload locked stack when preparing transaction Patrick Steinhardt
2024-09-18 23:23 ` [PATCH v3 0/3] reftable: graceful concurrent writes James Liu
2024-09-24 5:33 ` Patrick Steinhardt
2024-09-24 5:32 ` [PATCH v4 " Patrick Steinhardt
2024-09-24 5:33 ` [PATCH v4 1/3] refs/reftable: introduce "reftable.lockTimeout" Patrick Steinhardt
2024-09-24 5:33 ` [PATCH v4 2/3] reftable/stack: allow locking of outdated stacks Patrick Steinhardt
2024-09-24 5:33 ` [PATCH v4 3/3] refs/reftable: reload locked stack when preparing transaction Patrick Steinhardt
2024-09-27 4:07 ` Jeff King
2024-09-30 6:49 ` Patrick Steinhardt [this message]
2024-09-30 22:19 ` Josh Steadmon
2024-10-01 4:27 ` Patrick Steinhardt
2024-10-01 22:54 ` Jeff King
2024-10-01 23:24 ` Junio C Hamano
2024-10-02 10:58 ` Patrick Steinhardt
2024-10-01 7:34 ` Junio C Hamano
2024-10-01 18:53 ` Josh Steadmon
2024-10-01 19:08 ` Jeff King
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=ZvpJ_zpAcpezXB89@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=james@jamesliu.io \
--cc=karthik.188@gmail.com \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.com \
/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 NNTP newsgroup(s).