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

Re: Cannot clone redirecting stdout

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Sep 11, 2009, 22:47 UTC
Message-ID
<alpine.LNX.2.00.0909111820450.28290@iabervon.org>
In-Reply-To
<20090911162013.GA10939@coredump.intra.peff.net>
On Fri, 11 Sep 2009, Jeff King wrote:
Show 36 quoted lines
> On Fri, Sep 11, 2009 at 12:05:10PM -0400, Jeff King wrote:
> 
> > Ah. I have a theory. If I do a clone of git://gitorious.org/qt/qt.git,
> > the counting/compressing stages take a long time (I timed it at 1m40
> > before it actually sends any data). And looking at upload-pack.c, we
> > leave the 30-second alarm set while creating the pack. Meaning we die 30
> > seconds into creating the pack.
> > 
> > When progress is being displayed, however, the progress timer actually
> > uses SIGALRM, as well. So we are constantly resetting the timer and it
> > never goes off.
> 
> Hmm. Actually, this is not quite right. It looks like we call out to
> pack-objects as an external program, so there is no conflict with the
> signal. And we do proxy the output of pack-objects, which will keep our
> timer resetting every time we see a chunk of output. But pack-objects
> produces no output during the deltification phase, unless progress is
> turned on.  So we still hit our timeout in upload-pack during that
> phase.
> 
> So our options are:
> 
>   1. Turn off the timer during deltification, which could mean that it
>      would potentially go forever. But it's not controlled by the user.
>      I think the 'timeout' feature is really about the client just
>      opening the connection and sitting.
> 
>   2. Keep progress on during deltification, but just throw it away
>      instead of relaying it if no-progress is in effect.
> 
>   3. Accept that hitting the timeout during deltification _should_ cause
>      it to die. In that case, then the case with progress is wrong, and
>      we should stop resetting the timer just because we got some
>      progress output from pack-objects. But this may be redefining the
>      intent of --timeout. I don't know what the original intent was, or
>      what users of the feature are expecting.

You don't remember October 2005? HPA introduced it in 960decc, which has a pretty good explanation: we doesn't want to get DoS'd if clients just send SYNs. So it's supposed to time out only if we spend that long waiting for a protocol item from the client.

	-Daniel
*This .sig left intentionally blank*
Previous: Jeff King
Message 10 of 10 in “Cannot clone redirecting stdout”
  1. AloisioSep 10, 2009
  2. Stefan NaeweSep 11, 2009
  3. Stefan NaeweSep 11, 2009
  4. Jean-Luc HerrenSep 11, 2009
  5. Jeff KingSep 11, 2009
  6. Jeff KingSep 11, 2009
  7. Johan SørensenSep 11, 2009
  8. Jeff KingSep 11, 2009
  9. Jeff KingSep 11, 2009
  10. Daniel BarkalowSep 11, 2009

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.