All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Eric Wong <e@80x24.org>
Cc: Junio C Hamano <gitster@pobox.com>,
	Yaroslav Halchenko <yoh@onerussian.com>,
	git@vger.kernel.org
Subject: Re: [PATCH 4/3] http: check curl_multi_remove_handle error code
Date: Wed, 21 Sep 2016 18:31:40 -0400	[thread overview]
Message-ID: <20160921223140.qj3354gtrm6km6mg@sigill.intra.peff.net> (raw)
In-Reply-To: <20160921222959.GA4781@whir>

On Wed, Sep 21, 2016 at 10:29:59PM +0000, Eric Wong wrote:

> Jeff King <peff@peff.net> wrote:
> > On Wed, Sep 21, 2016 at 09:46:23PM +0000, Eric Wong wrote:
> > 
> > > -----------8<-----------
> > > Subject: [PATCH] http: check curl_multi_remove_handle error code
> > > 
> > > This should help detect bugs in future changes.  While we're at
> > > it, fix a (probably innocuous) bug in our http_cleanup function
> > > for users of older curl.
> > > 
> > > curl_multi_remove_handle was not idempotent until curl 7.33.0
> > > with commit 84f3b3dd448399f9548468676e1bd1475dba8de5
> > > ("curl_multi_remove_handle: allow multiple removes"),
> > > so we track the "curlm" membership of the curl easy handle
> > > ourselves with a new "in_multi" flag.
> > 
> > Does curl provide a meaningful error here? I'm just wondering if we
> > could simply let curl handle this, and just ignore the error that comes
> > from older versions. We're basically just replicating curl's own state
> > data here.
> 
> curl before 7.33.0 returned CURLM_BAD_EASY_HANDLE.  This error
> code also happens if we pass a bad/corrupt easy handle;
> so it could be hiding an error on our end.

Hmm, yeah. So we would want to make it conditional on the version
anyway, so that we detected such bugs on more modern systems. That still
doesn't seem unreasonable to me, but your patch is also not very big, so
it's probably fine (the major risk with yours is simply that our state
and curl's state get out of sync).

-Peff

  reply	other threads:[~2016-09-21 22:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09 22:19 git clone http:// fails some times with "Request for d53.. aborted" Yaroslav Halchenko
2016-09-10  0:21 ` Eric Wong
2016-09-13  0:25 ` [RFC 0/3] http: avoid repeatedly adding curl easy to curlm Eric Wong
2016-09-13  0:25   ` [RFC 1/3] http: warn on curl_multi_add_handle failures Eric Wong
2016-09-13  0:25   ` [RFC 2/3] http: consolidate #ifdefs for curl_multi_remove_handle Eric Wong
2016-09-13  0:25   ` [RFC 3/3] http: always remove curl easy from curlm session on release Eric Wong
2016-09-13 20:32   ` [RFC 0/3] http: avoid repeatedly adding curl easy to curlm Junio C Hamano
2016-09-21 21:46     ` [PATCH 4/3] http: check curl_multi_remove_handle error code Eric Wong
2016-09-21 22:22       ` Jeff King
2016-09-21 22:29         ` Eric Wong
2016-09-21 22:31           ` Jeff King [this message]
2016-09-14 11:59   ` [RFC 0/3] http: avoid repeatedly adding curl easy to curlm Yaroslav Halchenko
2016-09-14 14:03 ` git submodule add spits unrelated to actual problem error msg about .gitignore Yaroslav Halchenko
2016-09-14 19:32   ` Stefan Beller
2016-09-14 20:23     ` Yaroslav Halchenko

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=20160921223140.qj3354gtrm6km6mg@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=e@80x24.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=yoh@onerussian.com \
    /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.