git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Derrick Stolee <stolee@gmail.com>
Date
Dec 13, 2019, 19:35 UTC
Message-ID
<bdb9201f-b77f-ab3c-251f-d902c76fa9bc@gmail.com>
In-Reply-To
<492636883.190386.1576264842701@ox.hosteurope.de>
On 12/13/2019 2:20 PM, Thomas Braun wrote:
Show 43 quoted lines
> Hi,
> 
> on git version da72936f (Git 2.24, 2019-11-04) and debian stretch I currently get every now and then the following error during fetching
> 
> $git fetch --all --jobs 12
> Fordere an von origin
> Fordere an von XXXX
> Fordere an von YYYY
> Fordere an von ZZZZ
> Fordere an von EEEE
> Von github.com:tango-controls/cppTango
>    37cc52f8..4550a743  tango-9-lts -> origin/tango-9-lts
> Commit-Graph Generierungsnummern berechnen: 100% (14/14), Fertig.
> Commit-Graph Generierungsnummern berechnen: 100% (13/13), Fertig.
> fatal: Konnte '/home/firma/devel/cppTango/.git/objects/info/commit-graphs/commit-graph-chain.lock' nicht erstellen: Die Datei existiert bereits.
> 
> Ein anderer Git-Prozess scheint in diesem Repository ausgeführt
> zu werden, zum Beispiel ein noch offener Editor von 'git commit'.
> Bitte stellen Sie sicher, dass alle Prozesse beendet wurden und
> versuchen Sie es erneut. Falls es immer noch fehlschlägt, könnte
> ein früherer Git-Prozess in diesem Repository abgestürzt sein:
> Löschen Sie die Datei manuell um fortzufahren.
> Konnte 'myFork' nicht anfordern (Exit-Code: 128)
> Commit-Graph Generierungsnummern berechnen: 100% (13/13), Fertig.
> Commit-Graph Generierungsnummern berechnen: 100% (13/13), Fertig.
> Commit-Graph Generierungsnummern berechnen: 100% (13/13), Fertig.
> 
> (Sorry for the german text, this is not easily reproducible.)
> It complains that it could not create the lock file as it already exists.
> 
> I've set the following possible relevant settings:
> 
> [core]
>   commitGraph = true
> 
> [fetch]
>   prune = true
>   writeCommitGraph = true
> 
> [protocol]
>   version = 2
> 
> Anything obvious I'm doing wrong?

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.

I'll take a look now.

Thanks, -Stolee

Previous: Thomas BraunNext: Jeff King
Message 2 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. Thomas BraunDec 15, 2019
  6. SZEDER GáborDec 13, 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.