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

Re: Possible race condition with git-rebase + .git/index.lock

From
SJSergio Durigan Junior <sergiodj@sergiodj.net>
Date
Mar 11, 2019, 22:53 UTC
Message-ID
<87bm2h58fy.fsf@sergiodj.net>
In-Reply-To
<CAPig+cS_NLgwr6F2OqMpMZ3GBO-Cyru3G3UBxiT4ULJ_V1Bqvg@mail.gmail.com>
On Monday, March 11 2019, Eric Sunshine wrote:
Show 16 quoted lines
> On Mon, Mar 11, 2019 at 6:17 PM Sergio Durigan Junior
> <sergiodj@sergiodj.net> wrote:
>>   # git rebase origin/master
>>   ...
>>   Applying: commitX
>>   Applying: commitY
>>   Applying: commitZ
>>   fatal: Unable to create '/home/xyz/dir1/dir2/.git/index.lock': File exists.
>>
>> The first thing I did was to check whether the index.lock file existed,
>> but it doesn't.
>
> What platform is this on? If Windows, I'm wondering if something (such
> as a virus scanner) is holding the lock file open long enough to
> prevent Git from actually deleting it (and perhaps Git doesn't notice
> the failed deletion -- until the next time it tries to take the lock).

This is on GNU/Linux (Fedora 28, to be specific). I haven't had the chance to test this on other distros, unfortunately. And since it seems to be a race condition, it's kind of hard to perform tests that trigger this.

Thanks,
-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
Previous: Eric SunshineNext: Duy Nguyen
Message 3 of 14 in “Possible race condition with git-rebase + .git/index.lock”
  1. Sergio Durigan JuniorMar 11, 2019
  2. Eric SunshineMar 11, 2019
  3. Sergio Durigan JuniorMar 11, 2019
  4. Duy NguyenMar 12, 2019
  5. Sergio Durigan JuniorMar 12, 2019
  6. Elijah NewrenMar 12, 2019
  7. Sergio Durigan JuniorMar 12, 2019
  8. Elijah NewrenMar 12, 2019
  9. Sergio Durigan JuniorMar 12, 2019
  10. Phillip WoodMar 13, 2019
  11. Sergio Durigan JuniorMar 13, 2019
  12. Jeff KingMar 13, 2019
  13. Sergio Durigan JuniorMar 13, 2019
  14. MingunOct 28, 2022

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.