All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dennis Kaarsemaker <dennis@kaarsemaker.net>
To: Jeff King <peff@peff.net>
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
	git@vger.kernel.org
Subject: Re: [PATCH 0/2] fix http deadlock on giant ref negotiations
Date: Fri, 15 May 2015 10:44:50 +0200	[thread overview]
Message-ID: <1431679490.14042.42.camel@kaarsemaker.net> (raw)
In-Reply-To: <20150515083843.GA16910@peff.net>

On vr, 2015-05-15 at 04:38 -0400, Jeff King wrote:
> On Fri, May 15, 2015 at 09:41:20AM +0200, Dennis Kaarsemaker wrote:
> 
> > > I have no clue how to write a test that would trigger this reliably
> > > without requiring a gigantic test fixture. However, I did confirm that
> > > it fixes the problem on the chromium case you provided (which otherwise
> > > deadlocks reliably for me).
> > 
> > This looks similar to the failure I posted about alst year in
> > http://thread.gmane.org/gmane.comp.version-control.git/258514
> > 
> > Though the issue is different, it has the same 'hanging git fetch'
> > symptom due to the deadlock between upload-pack and http-backend.
> 
> Thanks, I think it is the same issue (in the end I was replicating not
> with `--reference`, but just by doing a fetch from the other
> repository). And our solutions are essentially the same. I do prefer
> mine because:
> 
>   1. It keeps the buffering logic in http-backend; the half-duplex
>      nature is an http detail.
> 
>   2. I think it's better to buffer the request rather than the response,
>      for the reasons I stated in the commit message.
> 
> > The patch I sent back then is suboptimal, as it can cause larger packs
> > than necessary (we still use it though, as the alternative is a
> > non-working git), but it does include a test you may be able to use to
> > verify your fix, if this is indeed the same issue.
> 
> I applied the test from your patch, but couldn't get it to fail even
> with stock git.  The test above it shrunk a bit, but I was able to tweak
> yours to generate tags from 2001..100000, which I thought would have
> worked.  I suspect it's something silly like the size not being quite
> big enough for the pipe buffer on my system, or something like that.
> Though I couldn't get it to fail even with 200,000 tags, so perhaps it's
> something else.

The shrinkage in the test above it will actually work around the issue,
as there are now fewer already-fetched tags to negotiate. Either
reverting that shrinkage or executing the new test twice should do the
trick.
-- 
Dennis Kaarsemaker
http://www.kaarsemaker.net

  reply	other threads:[~2015-05-15  8:45 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13 21:04 Clone hangs when done over http with --reference Konstantin Ryabitsev
2015-05-14  0:47 ` Jeff King
2015-05-14  1:02   ` [PATCH] http-backend: fix die recursion with custom handler Jeff King
2015-05-15  6:20     ` Jeff King
2015-05-14 17:08   ` Clone hangs when done over http with --reference Konstantin Ryabitsev
2015-05-14 19:52     ` Jeff King
2015-05-15  6:29   ` [PATCH 0/2] fix http deadlock on giant ref negotiations Jeff King
2015-05-15  6:29     ` [PATCH 1/2] http-backend: fix die recursion with custom handler Jeff King
2015-05-15  6:33     ` [PATCH 2/2] http-backend: spool ref negotiation requests to buffer Jeff King
2015-05-15 18:22       ` Junio C Hamano
2015-05-15 18:28         ` Konstantin Ryabitsev
2015-05-20  7:35           ` [PATCH v2 0/3] fix http deadlock on giant ref negotiations Jeff King
2015-05-20  7:36             ` [PATCH v2 1/3] http-backend: fix die recursion with custom handler Jeff King
2015-05-20  7:36             ` [PATCH v2 2/3] t5551: factor out tag creation Jeff King
2015-05-20  7:37             ` [PATCH v2 3/3] http-backend: spool ref negotiation requests to buffer Jeff King
2015-05-26  2:07               ` Konstantin Ryabitsev
2015-05-26  2:24                 ` Jeff King
2015-05-26  3:43                   ` Junio C Hamano
2015-05-15 19:16         ` [PATCH 2/2] " Jeff King
2015-05-15  7:41     ` [PATCH 0/2] fix http deadlock on giant ref negotiations Dennis Kaarsemaker
2015-05-15  8:38       ` Jeff King
2015-05-15  8:44         ` Dennis Kaarsemaker [this message]
2015-05-15  8:53           ` Jeff King
2015-05-15  9:11             ` Dennis Kaarsemaker

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431679490.14042.42.camel@kaarsemaker.net \
    --to=dennis@kaarsemaker.net \
    --cc=git@vger.kernel.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=peff@peff.net \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.