From: Jeff King <peff@peff.net>
To: David Turner <dturner@twosigma.com>
Cc: git@vger.kernel.org, spearce@spearce.org
Subject: Re: [PATCH] remote-curl: don't hang when a server dies before any output
Date: Mon, 14 Nov 2016 19:44:26 -0500 [thread overview]
Message-ID: <20161115004426.unheihlmftlw6ex7@sigill.intra.peff.net> (raw)
In-Reply-To: <20161114194049.mktpsvgdhex2f4zv@sigill.intra.peff.net>
On Mon, Nov 14, 2016 at 02:40:49PM -0500, Jeff King wrote:
> On Mon, Nov 14, 2016 at 01:24:31PM -0500, Jeff King wrote:
>
> > 2. Have remote-curl understand enough of the protocol that it can
> > abort rather than hang.
> >
> > I think that's effectively the approach of your patch, but for one
> > specific case. But could we, for example, make sure that everything
> > we proxy is a complete set of pktlines and ends with a flush? And
> > if not, then we hang up on fetch-pack.
> >
> > I _think_ that would work, because even the pack is always encased
> > in pktlines for smart-http.
>
> So something like this. It turned out to be a lot uglier than I had
> hoped because we get fed the data from curl in odd-sized chunks, so we
> need a state machine.
>
> But it does seem to work. At least it doesn't seem to break anything in
> the test suite, and it fixes the new tests you added. I'd worry that
> there's some obscure case where the response isn't packetized in the
> same way.
Actually, I take it back. I think it works for a single round of ref
negotiation, but not for multiple. Enabling GIT_TEST_LONG=1 causes it to
fail t5551.
I think I've probably made a mis-assumption on exactly when in the HTTP
protocol we will see a flush packet (and perhaps that is a sign that
this protocol-snooping approach is not a good one).
I don't have time to dig more on this tonight, and I'll be traveling for
the rest of the week. So if anybody is interested, please feel free to
dig into it.
-Peff
next prev parent reply other threads:[~2016-11-15 0:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 22:18 [PATCH] remote-curl: don't hang when a server dies before any output David Turner
2016-11-14 18:24 ` Jeff King
2016-11-14 19:40 ` Jeff King
2016-11-14 21:19 ` Junio C Hamano
2016-11-14 21:33 ` Jeff King
2016-11-14 23:25 ` David Turner
2016-11-14 23:48 ` Jeff King
2016-11-15 15:45 ` David Turner
2016-11-15 0:44 ` Jeff King [this message]
2016-11-15 1:02 ` Junio C Hamano
2016-11-15 3:58 ` Jeff King
2016-11-15 17:42 ` Junio C Hamano
2016-11-18 17:01 ` Jeff King
2016-11-18 17:04 ` David Turner
2016-11-18 17:08 ` Jeff King
2016-11-18 17:48 ` David Turner
2016-11-18 18:28 ` Junio C Hamano
2016-11-15 2:40 ` Jeff King
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=20161115004426.unheihlmftlw6ex7@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=dturner@twosigma.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/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 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 NNTP newsgroup(s).