New issue
Advanced search Search tips

Issue 718726 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

git rebase-update fails often with "Unable to create '<path_to_repo>/.git/index.lock': File exists

Project Member Reported by andypaicu@chromium.org, May 5 2017

Issue description

While running git rebase-update, a lot of the time it will fail with the error "Unable to create '<path_to_repo>/.git/index.lock': File exists".

When looking for it manually, the file is not there.

What steps will reproduce the problem?
(1)Run "git rebase-update"
(2)Be lucky/unlucky
(3)See error 

Please use labels and text to provide additional information.

Attached screenshot of it happening

Stack trace:

Failed! Attempting to squash skip-csp ...
Traceback (most recent call last):
  File "<home_dir>/work/depot_tools/git_rebase_update.py", line 332, in <module>
    sys.exit(main())
  File "<home_dir>/work/depot_tools/git_rebase_update.py", line 278, in main
    ret = rebase_branch(branch, parent, merge_base[branch])
  File "<home_dir>/work/depot_tools/git_rebase_update.py", line 165, in rebase_branch
    git.run('checkout', '-b', squash_branch)
  File "<home_dir>/work/depot_tools/git_common.py", line 676, in run
    return run_with_stderr(*cmd, **kwargs)[0]
  File "<home_dir>/work/depot_tools/git_common.py", line 745, in run_with_stderr
    raise subprocess2.CalledProcessError(retcode, cmd, os.getcwd(), ret, err)
subprocess2.CalledProcessError: Command 'git -c color.ui=never checkout -b skip-csp_squash_attempt' returned non-zero exit status 128 in <home_dir>/work/chromium/src
fatal: Unable to create '<home_dir>/work/chromium/src/.git/index.lock': File exists.


 
Screenshot from 2017-05-05 09:17:36.png
290 KB View Download

Comment 1 by dgn@chromium.org, Sep 20 2017

Labels: -Pri-3 Pri-2
I also see that quite often:


% git rebase master
First, rewinding head to replay your work on top of it...
fatal: Unable to create '/usr/local/ssd/clankium/src/.git/index.lock': File exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
could not detach HEAD
dgn@

I have grown to suspect that emacs might actually be the cause. Are you by any chance using emacs with auto-revert-move enabled?

Sign in to add a comment