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

Re: Fix potential hang in https handshake (v2).

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 19, 2012, 00:37 UTC
Message-ID
<7v4nlrl2jq.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7v8vb3l2q5.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> 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.
Previous: Junio C Hamano
Message 3 of 3 in “Fix potential hang in https handshake (v2).”
  1. szager@google.comOct 18, 2012
  2. Junio C HamanoOct 19, 2012
  3. Junio C HamanoOct 19, 2012

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.