Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:55:04

Junio C Hamano [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help