git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 16:59 UTC

Re: Parallel fetch and commit graph writing results in locking failure (even on linux)

From
Thomas Braun <thomas.braun@virtuell-zuhause.de>
Date
Dec 15, 2019, 17:19 UTC
Message-ID
<264571040.270538.1576430345179@ox.hosteurope.de>
In-Reply-To
<b7d5a758-9753-bb8b-f66e-6435fb19046b@gmail.com>
Show 22 quoted lines
> Derrick Stolee <stolee@gmail.com> hat am 13. Dezember 2019 um 20:58 geschrieben:
> 
> 
> On 12/13/2019 2:52 PM, Jeff King wrote:
> > On Fri, Dec 13, 2019 at 02:35:47PM -0500, Derrick Stolee wrote:
> > 
> >> I don't think so. I think you just found a bug where the
> >> fetch.writeCommitGraph logic doesn't work with parallel fetch
> >> jobs (only one can write at a time).
> >>
> >> I believe the fix would be to write the commit-graph after
> >> all of the jobs have completed, which should mean we need to
> >> move the call to write_commit_graph_reachable() somewhere else
> >> inside builtin/fetch.c.
> > 
> > This should be fixed in master by bcb06e204c (Merge branch
> > 'js/fetch-multi-lockfix', 2019-12-01), I think.
> 
> Thanks, Peff. That exactly looks like the right fix. The
> actual commit is 7d8e72b9 ("fetch: avoid locking issues between
> fetch.jobs/fetch.writeCommitGraph" 2019-11-03). I had forgotten
> that this was already fixed.
Thanks Stolee and Peff, I'll update to a version with that fix. And in the unlikely case this does not resolve my issue, report back.
 
Show 19 quoted lines
> Here is the diff, for reference:
> 
> diff --git a/builtin/fetch.c b/builtin/fetch.c
> index 8d27f8abb7..20bcda09c4 100644
> --- a/builtin/fetch.c
> +++ b/builtin/fetch.c
> @@ -1602,7 +1602,8 @@ static int fetch_multiple(struct string_list *list, int max_children)
>                         return errcode;
>         }
>  
> -       argv_array_pushl(&argv, "fetch", "--append", "--no-auto-gc", NULL);
> +       argv_array_pushl(&argv, "fetch", "--append", "--no-auto-gc",
> +                       "--no-write-commit-graph", NULL);
>         add_options_to_argv(&argv);
>  
>         if (max_children != 1 && list->nr != 1) {
> 
> -Stolee
>
Previous: SZEDER GáborNext: Thomas Braun
Message 6 of 8 in “Parallel fetch and commit graph writing results in locking failure (even on linux)”
  1. Thomas BraunDec 13, 2019
  2. Derrick StoleeDec 13, 2019
  3. Jeff KingDec 13, 2019
  4. Derrick StoleeDec 13, 2019
  5. SZEDER GáborDec 13, 2019
  6. Thomas BraunDec 15, 2019
  7. german language fix: Generierung vs. Generation [was: Re: Parallel fetch and commit graph writing results in locking failure (even on linux)]Thomas Braun, Dec 15, 2019
  8. l10n: de.po: Reword generation numbersRalf Thielow, Dec 15, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.