Re: Non-robust lock files in containers can lead to repo corruption

2019-08-13 Thread Junio C Hamano
Jeff King writes: > I don't think there are. Most of Git's locks are predicated purely on > the existence of the lockfile (with the intent that they'd work over > systems like NFS). The gc lock is a weird one-off. > > And while it's not great for multiple gc's to run at the same time > (because i

Re: Non-robust lock files in containers can lead to repo corruption

2019-08-12 Thread Jeff King
On Sat, Aug 10, 2019 at 09:05:33AM -0700, Gregory Szorc wrote: > I tracked down a source of Git corrupting repositories to lock file > design not being robust when containers / PID namespaces are present. > > In my case, the corruption stemmed from premature release of the `git > gc` lock in the

Re: Non-robust lock files in containers can lead to repo corruption

2019-08-12 Thread Junio C Hamano
"Randall S. Becker" writes: >> The lock design of gc.pid stores the current hostname and PID of the locking >> process in the file. If another process comes along and its hostname matches >> the stored hostname, it checks to see if the listed PID exists. If the PID is >> missing, it assumes the l

RE: Non-robust lock files in containers can lead to repo corruption

2019-08-12 Thread Randall S. Becker
On August 10, 2019 12:06 PM, Gregory Szorc wrote: > I tracked down a source of Git corrupting repositories to lock file design not > being robust when containers / PID namespaces are present. > > In my case, the corruption stemmed from premature release of the `git gc` > lock in the gc.pid file. B