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

Re: concurrent access to multiple local git repos is error prone

From
Alexander Mills <alexander.d.mills@gmail.com>
Date
Aug 6, 2018, 07:36 UTC
Message-ID
<CA+KyZp760a3yTF6ghiNh=c5FoU36MN3cdQU5J8NF2Ss+nwRqyQ@mail.gmail.com>
In-Reply-To
<20180805081116.GG44140@aiede.svl.corp.google.com>
Hi Johnathan,

Yeah this concurrency problem is real. Not only does it happen with `git status` the same thing happens with `git rev-parse --show-toplevel`. What happens is that I get no stdout when repos are accessed concurrently (and no stderr). If I limit concurrency to 1, the problem goes away. When I up the concurrency, the problem is sporadic, which is the exact signal for a concurrency/race-condition related issue. The signs are damn clear. I have seen this problem on MacOS I think a year back on a different project, but I never reported it b/c I hadn't really verified it.

Like I said I am on Ubuntu. I have 3 git repos that are incorporated into the tool that's generating the problem. For one repo I got this:

$ git fsck

Checking object directories: 100% (256/256), done. dangling tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904

For `$ git version --build-options` I have:

git version 2.17.1 cpu: x86_64 no commit associated with this build sizeof-long: 8

-alex
On Sun, Aug 5, 2018 at 1:11 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 25 quoted lines
> Alexander Mills wrote:
>
>> Yeah in this case what appeared to be happening is that if `git status` was
>> called concurrently, frequently I wouldnt get any stdout..
>
> Thanks for reporting.  A few questions:
>
> What platform are you on?  What version of Git are you running?  What
> is the output of "git version --build-options"?
>
> What is the exit status from these "git status" invocations that
> didn't write output?  What options are you passing to "git status"?
> Are there any other interesting symptoms?
>
> Is this part of a larger tool or script?  Are there other operations
> going on (e.g. something sending signals to these git processes)?
>
> Does the repository pass "git fsck"?  Any other symptoms or hints that
> could help in tracking this down?
>
> Can you paste a transcript of the commands or script you ran and what
> output it produced?  Is this something I should be able to reproduce?
>
> Thanks and hope that helps,
> Jonathan
-- 
Alexander D. Mills
¡¡¡ New cell phone number: (415)730-1805 !!!
alexander.d.mills@gmail.com

www.linkedin.com/pub/alexander-mills/b/7a5/418/
Previous: Thomas GummererNext: Alexander Mills
Message 8 of 11 in “concurrent access to multiple local git repos is error prone”
  1. Alexander MillsAug 4, 2018
  2. Alexander MillsAug 4, 2018
  3. Jonathan NiederAug 5, 2018
  4. Jonathan NiederAug 5, 2018
  5. Jonathan NiederAug 5, 2018
  6. Alexander MillsAug 5, 2018
  7. exit code in git diff-index [was: Re: concurrent access to multiple local git repos is error prone]Thomas Gummerer, Aug 5, 2018
  8. Alexander MillsAug 6, 2018
  9. Alexander MillsAug 6, 2018
  10. Jonathan NiederAug 6, 2018
  11. Duy NguyenAug 6, 2018

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.