Re: concurrent access to multiple local git repos is error prone
From: Alexander Mills <hidden>
Date: 2018-08-06 07:36:31
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 [off-list ref] wrote:
Alexander Mills wrote:quoted
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/