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

Re: [PATCH] Fix potential local deadlock during fetch-pack

From
Shawn Pearce <spearce@spearce.org>
Date
Mar 29, 2011, 17:30 UTC
Message-ID
<AANLkTi=UDPFkox9Gsgv5Bbfsb-VTRweY9D2SNAAhptAc@mail.gmail.com>
In-Reply-To
<AANLkTikZ=POeQi5nnt8D9v4Z-_OaXNrXDjP2awWUtKzA@mail.gmail.com>
On Tue, Mar 29, 2011 at 10:22, Shawn Pearce <spearce@spearce.org> wrote:
Show 10 quoted lines
> On Tue, Mar 29, 2011 at 10:06, Junio C Hamano <gitster@pobox.com> wrote:
>> The fetch-pack/upload-pack protocol relies on the underlying transport
>> (local pipe or TCP socket) to have enough slack to allow one window worth
>> of data in flight without blocking the writer.  Traditionally we always
>> relied on being able to have a batch of 32 "have"s in flight (roughly 1.5k
>
>> +               count += flush_limit;
>
> Nak. You still deadlock because when count reaches PIPESAFE_FLUSH you
> still double it to 2*PIPESAFE_FLUSH here. Instead I think you mean:

I take this comment back. Re-reading fetch-pack.c the next_flush() method is accepting as input a running counter of how many have lines have already been sent to the remote peer, and is never reset to 0. Therefore it is necessary to add the next round size to count and return it.

-- 
Shawn.
Previous: Shawn PearceNext: Erik Faye-Lund
Message 3 of 6 in “Fix potential local deadlock during fetch-pack”
  1. Fix potential local deadlock during fetch-packJunio C Hamano, Mar 29, 2011
  2. Shawn PearceMar 29, 2011
  3. Shawn PearceMar 29, 2011
  4. Erik Faye-LundMar 30, 2011
  5. Erik Faye-LundMar 30, 2011
  6. Shawn PearceMar 31, 2011

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.