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

Races on ref .lock files?

From
Andreas Krey <a.krey@gmx.de>
Date
Dec 16, 2016, 16:47 UTC
Message-ID
<20161216164751.GA12174@inner.h.apk.li>
Hi all,
We're occasionally seeing a lot of 
  error: cannot lock ref 'stash-refs/pull-requests/18978/to': Unable to create '/opt/apps/..../repositories/68/stash-refs/pull-requests/18978/to.lock': File exists.
from the server side with fetches as well as pushes. (Bitbucket server.)

What I find strange is that neither the fetches nor the pushes even touch these refs (but the bitbucket triggers underneath might).

But my question is whether there are race conditions that can cause such messages in regular operation - they continue with 'If no other git process is currently running, this probably means a git process crashed in this repository earlier.' which indicates some level of anticipation.

- Andreas
-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800
Next: Junio C Hamano
Message 1 of 6 in “Races on ref .lock files?”
  1. Andreas KreyDec 16, 2016
  2. Junio C HamanoDec 16, 2016
  3. Bryan TurnerDec 16, 2016
  4. Andreas KreyDec 21, 2016
  5. Andreas KreyDec 21, 2016
  6. Junio C HamanoDec 21, 2016

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.