git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Sergio Durigan Junior <sergiodj@sergiodj.net>,
	Elijah Newren <newren@gmail.com>
Cc: Duy Nguyen <pclouds@gmail.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: Possible race condition with git-rebase + .git/index.lock
Date: Wed, 13 Mar 2019 20:40:32 +0000
Message-ID: <e0e1e159-844d-c9bf-e1cc-ada05384ef76@gmail.com> (raw)
In-Reply-To: <8736nr6g94.fsf@sergiodj.net>

Hi Sergio

On 12/03/2019 19:32, Sergio Durigan Junior wrote:
> On Tuesday, March 12 2019, Elijah Newren wrote:
> 
>> On Tue, Mar 12, 2019 at 9:48 AM Sergio Durigan Junior
>> <sergiodj@sergiodj.net> wrote:
>>> On Tuesday, March 12 2019, Duy Nguyen wrote:
>>>
>>>> On Tue, Mar 12, 2019 at 5:18 AM Sergio Durigan Junior
>>>> <sergiodj@sergiodj.net> wrote:
>>>>> This works without problems most of the time (well, usually there are
>>>>> conflicts and all, but that's a burden I have to carry).  However,
>>>>> sometimes I notice that git fails with:
>>>>>
>>>>>    # 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.
>>>>
>>>> Is the output this clean? What I'm looking for is signs of automatic
>>>> garbage collection kicking in the middle of the rebase. Something like
>>>> "Auto packing the repository blah blah for optimum performance".
>>>
>>> Yeah, this is the exact output.  I also thought about "git gc", but I
>>> don't see any output related to it.  Is it possible that it's being
>>> executed in the background and not printing anything?
>>
>> Any chance you have a cronjob or other task execution mechanism that
>> is running git commands in various directories (even simple commands
>> like 'git status' since it's not read-only contrary to what some
>> expect, or 'git fetch' which might trigger a background gc)?
> 
> Nope, nothing like this.  AFAIK, nothing is touching that repository at
> the same time that I am.  Besides, even if I wait some minutes before
> trying again, the bug manifests again.
> 

Do you have any of the files in the repository open in an editor or ide 
while you are rebasing? I have seen this message when rebasing and one 
of the files is open in emacs which runs git status when it sees a file 
has changed which locks the index while the rebase is running.

Best Wishes

Phillip

  parent reply	other threads:[~2019-03-13 20:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 21:38 Sergio Durigan Junior
2019-03-11 22:50 ` Eric Sunshine
2019-03-11 22:53   ` Sergio Durigan Junior
2019-03-12 10:28 ` Duy Nguyen
2019-03-12 16:45   ` Sergio Durigan Junior
2019-03-12 19:23     ` Elijah Newren
2019-03-12 19:32       ` Sergio Durigan Junior
2019-03-12 19:39         ` Elijah Newren
2019-03-12 19:58           ` Sergio Durigan Junior
2019-03-13 20:40         ` Phillip Wood [this message]
2019-03-13 20:48           ` Sergio Durigan Junior
2019-03-13 20:59             ` Jeff King
2019-03-13 21:07               ` Sergio Durigan Junior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e0e1e159-844d-c9bf-e1cc-ada05384ef76@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.com \
    --cc=pclouds@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=sergiodj@sergiodj.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for the project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git