Re: Fix potential hang in https handshake.

2012-10-19 Thread Jeff King
On Thu, Oct 18, 2012 at 03:59:41PM -0700, Junio C Hamano wrote: It will sometimes happen that curl_multi_fdset() doesn't return any file descriptors. In that case, it's recommended that the application sleep for a short time before running curl_multi_perform() again.

Re: Fix potential hang in https handshake.

2012-10-19 Thread Shawn Pearce
On Fri, Oct 19, 2012 at 3:36 AM, Jeff King p...@peff.net wrote: On Thu, Oct 18, 2012 at 03:59:41PM -0700, Junio C Hamano wrote: It will sometimes happen that curl_multi_fdset() doesn't return any file descriptors. In that case, it's recommended that the application sleep for a short time

Re: Fix potential hang in https handshake.

2012-10-19 Thread Junio C Hamano
Stefan Zager sza...@google.com writes: On Oct 19, 2012 7:11 AM, Shawn Pearce spea...@spearce.org wrote: The issue with the current code is sometimes when libcurl is opening a CONNECT style connection through an HTTP proxy it returns a crazy high timeout (240 seconds) and no fds. In this case

Re: Fix potential hang in https handshake.

2012-10-19 Thread Daniel Stenberg
On Fri, 19 Oct 2012, Shawn Pearce wrote: The issue with the current code is sometimes when libcurl is opening a CONNECT style connection through an HTTP proxy it returns a crazy high timeout (240 seconds) and no fds. In this case Git waits forever. Is this repeatable with a recent libcurl?

Re: Fix potential hang in https handshake.

2012-10-19 Thread Jeff King
On Fri, Oct 19, 2012 at 07:10:46AM -0700, Shawn O. Pearce wrote: IOW, it seems like we are _already_ following the advice referenced in curl's manpage. Is there some case I am missing? Confused... The issue with the current code is sometimes when libcurl is opening a CONNECT style

Re: Fix potential hang in https handshake.

2012-10-19 Thread Stefan Zager
On Fri, Oct 19, 2012 at 1:27 PM, Jeff King p...@peff.net wrote: On Fri, Oct 19, 2012 at 07:10:46AM -0700, Shawn O. Pearce wrote: IOW, it seems like we are _already_ following the advice referenced in curl's manpage. Is there some case I am missing? Confused... The issue with the

Re: Fix potential hang in https handshake.

2012-10-19 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Fri, Oct 19, 2012 at 07:10:46AM -0700, Shawn O. Pearce wrote: IOW, it seems like we are _already_ following the advice referenced in curl's manpage. Is there some case I am missing? Confused... The issue with the current code is sometimes when libcurl

Fix potential hang in https handshake (v3)

2012-10-19 Thread szager
From 32e06128dbc97ceb0d060c88ec8db204fa51be5c Mon Sep 17 00:00:00 2001 From: Stefan Zager sza...@google.com Date: Thu, 18 Oct 2012 16:23:53 -0700 Subject: [PATCH] Fix potential hang in https handshake. It has been observed that curl_multi_timeout may return a very long timeout value (e.g., 294

Re: Fix potential hang in https handshake (v3)

2012-10-19 Thread Jeff King
On Fri, Oct 19, 2012 at 02:04:20PM -0700, sza...@google.com wrote: From 32e06128dbc97ceb0d060c88ec8db204fa51be5c Mon Sep 17 00:00:00 2001 From: Stefan Zager sza...@google.com Date: Thu, 18 Oct 2012 16:23:53 -0700 Drop these lines. Subject: [PATCH] Fix potential hang in https handshake

Re: Fix potential hang in https handshake (v3)

2012-10-19 Thread Junio C Hamano
Jeff King p...@peff.net writes: +if (max_fd 0 +select_timeout.tv_sec 0 || +select_timeout.tv_usec 5) { +select_timeout.tv_sec = 0; +select_timeout.tv_usec =

[PATCH] Fix potential hang in https handshake.

2012-10-19 Thread szager
It has been observed that curl_multi_timeout may return a very long timeout value (e.g., 294 seconds and some usec) just before curl_multi_fdset returns no file descriptors for reading. The upshot is that select() will hang for a long time -- long enough for an https handshake to be dropped. The

Re: [PATCH] Fix potential hang in https handshake.

2012-10-19 Thread Junio C Hamano
Thanks. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Fix potential hang in https handshake.

2012-10-18 Thread szager
From 700b8075c578941c8f951711825c390ac68b190f Mon Sep 17 00:00:00 2001 From: Stefan Zager sza...@google.com Date: Thu, 18 Oct 2012 14:03:59 -0700 Subject: [PATCH] Fix potential hang in https handshake. It will sometimes happen that curl_multi_fdset() doesn't return any file descriptors

Re: Fix potential hang in https handshake.

2012-10-18 Thread Junio C Hamano
sza...@google.com writes: From 700b8075c578941c8f951711825c390ac68b190f Mon Sep 17 00:00:00 2001 From: Stefan Zager sza...@google.com Date: Thu, 18 Oct 2012 14:03:59 -0700 Subject: [PATCH] Fix potential hang in https handshake. It will sometimes happen that curl_multi_fdset() doesn't

Fix potential hang in https handshake (v2).

2012-10-18 Thread szager
From aa77ab3dd5b98a5786ac158528f45355fc0ddbc3 Mon Sep 17 00:00:00 2001 From: Stefan Zager sza...@google.com Date: Thu, 18 Oct 2012 16:23:53 -0700 Subject: [PATCH] Fix potential hang in https handshake. It will sometimes happen that curl_multi_fdset() doesn't return any file descriptors

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

2012-10-18 Thread Junio C Hamano
sza...@google.com writes: From aa77ab3dd5b98a5786ac158528f45355fc0ddbc3 Mon Sep 17 00:00:00 2001 From: Stefan Zager sza...@google.com Date: Thu, 18 Oct 2012 16:23:53 -0700 Subject: [PATCH] Fix potential hang in https handshake. Please don't do the above (as usual ;-) It will sometimes

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

2012-10-18 Thread Junio C Hamano
Junio C Hamano gits...@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,