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

Re: [PATCH] verify_packfile: check pack validity before accessing data

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 22, 2016, 18:21 UTC
Message-ID
<xmqq37kr6bj5.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160922040523.x3pihbs7f5iudyfz@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> So I wanted to know whether there were any code paths that failed to do
> so, and just blindly rely on the lazy-open. Finding the races is
> inherently hard, because you only catch them when somebody else is doing
> a repack. But if we just _remove_ the lazy-load, then it becomes easy to
> catch anybody relying on it. Like:
> ...
Clever; I like it.
Show 7 quoted lines
> In such a case, we are relying on the lazy-load (and we _are_ racy!).
> But the patch above would punish people on low-descriptor systems. It's
> better to have an unlikely race and complete the request than to fail
> consistently. :-/
>
> For people who are running high-traffic servers, they just need to make
> sure their file descriptor limit is reasonably high to avoid the race.
Thanks for an illuminating backstory for the patch.
Previous: Jeff King
Message 3 of 3 in “verify_packfile: check pack validity before accessing data”
  1. verify_packfile: check pack validity before accessing dataJeff King, Sep 22, 2016
  2. Jeff KingSep 22, 2016
  3. Junio C HamanoSep 22, 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.