Re: [BUG REPORT] Intermittent errors: Unable to create '/usr/ports/.git/index.lock': File exists.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 09, 2021 at 12:29:32PM -0700, Yuri wrote:

> Once every ~20 times I call 'git commit' it fails like this:
> 
> $ git commit .
> fatal: Unable to create '/usr/ports/.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.
> 
> 
> There's no other instance.

In previous cases of this we've seen, there usually _is_ another
instance, just not one directly triggered by the user. E.g., some GUI
clients will trigger "git status" in the background, which tries to
refresh the index.

If you're running any other Git-related tools (or anything via cron),
those might be worth investigating. Otherwise you might try using OS
tools to see which processes might be opening such a file (on Linux I'd
use inotifywait, but I'm not sure what's available on FreeBSD).

If you do find the culprit, one solution is to get it to use the
"--no-optional-locks" option. See the discussion of that option and
GIT_OPTIONAL_LOCKS in git(1), as well as the "BACKGROUND REFRESH"
section of git-status(1).

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux