From: Junio C Hamano <gitster@pobox.com>
To: szager@google.com
Cc: git@vger.kernel.org, sop@google.com
Subject: Re: Fix potential hang in https handshake (v2).
Date: Thu, 18 Oct 2012 17:37:45 -0700 [thread overview]
Message-ID: <7v4nlrl2jq.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <7v8vb3l2q5.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Thu, 18 Oct 2012 17:33:54 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> We end up calling select() without any bit set in fds, so it would
> become micro-sleep of select_timeout in such a case, but as far as I
> can see, the existing code either
>
> * does not select() and keeps polling step_active_slots() without
> delay, when curl_timeout gives a 0 return value; or
>
> * sets 50ms timeout or whatever negative value derived from
> curl_timeout when the returned value is not 0 nor -1.
>
> Is the symptom that select(), when given a negative timeout and no
> fd to wake it, sleeps forever (or "loooong time, taking that negative
> value as if it is a large unsigned long") or something?
Addendum.
What I am trying to get at are (1) three line description I can put
in the release notes for this fix when it is merged to the
maintenance track, and (2) a feel of how often this happens and how
bad the damage is.
The latter helps us judge if this "do the normal thing, but if in a
rare case where we do not find any fds, patch it up to proceed" is a
better approach over your original.
Thanks.
prev parent reply other threads:[~2012-10-19 0:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-18 23:27 Fix potential hang in https handshake (v2) szager
2012-10-19 0:33 ` Junio C Hamano
2012-10-19 0:37 ` Junio C Hamano [this message]
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=7v4nlrl2jq.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=sop@google.com \
--cc=szager@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox