From: Junio C Hamano <gitster@pobox.com>
To: "Randall S. Becker" <rsbecker@nexbridge.com>
Cc: "'Gregory Szorc'" <gregory.szorc@gmail.com>, <git@vger.kernel.org>
Subject: Re: Non-robust lock files in containers can lead to repo corruption
Date: Mon, 12 Aug 2019 08:54:35 -0700 [thread overview]
Message-ID: <xmqqk1bibcqs.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <003901d55114$9428df40$bc7a9dc0$@nexbridge.com> (Randall S. Becker's message of "Mon, 12 Aug 2019 09:48:04 -0400")
"Randall S. Becker" <rsbecker@nexbridge.com> 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 lock is stale and releases the lock.
The assumption that <hostname, pid> pair can be used to identify
running process (until the pid wraps around and gets reused) does
not sound particularly limited Git. Don't container folks solve it
without touching individual applications? For example, is it a
viable option to isolate UTS namespaces (CLONE_NEWUTS) in addition
to PID namespaces (CLONE_NEWPID)?
next prev parent reply other threads:[~2019-08-12 15:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-10 16:05 Non-robust lock files in containers can lead to repo corruption Gregory Szorc
2019-08-12 13:48 ` Randall S. Becker
2019-08-12 15:54 ` Junio C Hamano [this message]
2019-08-12 16:38 ` Jeff King
2019-08-13 19:13 ` Junio C Hamano
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=xmqqk1bibcqs.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gregory.szorc@gmail.com \
--cc=rsbecker@nexbridge.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).