public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Something makes curl hang for 5 minutes after connection refused
@ 2018-11-30 11:03 Basin Ilya
  2018-11-30 19:49 ` Lee
  0 siblings, 1 reply; 6+ messages in thread
From: Basin Ilya @ 2018-11-30 11:03 UTC (permalink / raw)
  To: cygwin

Hi.

Recently I noticed that `curl` does not fail immediately after connection refused, but waits for 5 minutes.

This only happens on my machine and only with the `Cygwin` version of `curl`. The mingw version is unaffected.
I tried downgrading curl, but it didn't help. I thought there's a rogue setting in `/etc` or in home or maybe some environment variable, but I couldn't find it.

    basin@BASIN /cygdrive/c/Users/basin
    $ >/dev/null /usr/bin/curl -v http://127.0.0.1:2/
    * STATE: INIT => CONNECT handle 0x80048658; line 1404 (connection #-5000)
    * Added connection 0. The cache now contains 1 members
    *   Trying 127.0.0.1...
    * TCP_NODELAY set
    * STATE: CONNECT => WAITCONNECT handle 0x80048658; line 1456 (connection #0)
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:--  0:04:59 --:--:--     0* Connection timed out after 300145 milliseconds
    * multi_done
    * stopped the pause stream!
      0     0    0     0    0     0      0      0 --:--:--  0:05:00 --:--:--     0
    * Closing connection 0
    * The cache now contains 0 members
    curl: (28) Connection timed out after 300145 milliseconds
   
    basin@BASIN /cygdrive/c/Users/basin
    $ /usr/bin/curl --version
    curl 7.59.0 (i686-pc-cygwin) libcurl/7.59.0 OpenSSL/1.0.2p zlib/1.2.11 libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh2/1.7.0 nghttp2/1.31.0
    Release-Date: 2018-03-14
    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
    Features: AsynchDNS Debug IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL Metalink

Can someone try to reproduce it?


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Something makes curl hang for 5 minutes after connection refused
  2018-11-30 11:03 Something makes curl hang for 5 minutes after connection refused Basin Ilya
@ 2018-11-30 19:49 ` Lee
  2018-12-01  3:57   ` Brian Inglis
  0 siblings, 1 reply; 6+ messages in thread
From: Lee @ 2018-11-30 19:49 UTC (permalink / raw)
  To: cygwin

On 11/30/18, Basin Ilya  wrote:
> Hi.
>
> Recently I noticed that `curl` does not fail immediately after connection
> refused, but waits for 5 minutes.
>
> This only happens on my machine and only with the `Cygwin` version of
> `curl`. The mingw version is unaffected.
> I tried downgrading curl, but it didn't help. I thought there's a rogue
> setting in `/etc` or in home or maybe some environment variable, but I
> couldn't find it.
>
>     basin@BASIN /cygdrive/c/Users/basin
>     $ >/dev/null /usr/bin/curl -v http://127.0.0.1:2/
>     * STATE: INIT => CONNECT handle 0x80048658; line 1404 (connection
> #-5000)
>     * Added connection 0. The cache now contains 1 members
>     *   Trying 127.0.0.1...
>     * TCP_NODELAY set
>     * STATE: CONNECT => WAITCONNECT handle 0x80048658; line 1456 (connection
> #0)
    <.. snip ..>
>     curl: (28) Connection timed out after 300145 milliseconds
>
>     basin@BASIN /cygdrive/c/Users/basin
>     $ /usr/bin/curl --version
>     curl 7.59.0 (i686-pc-cygwin) libcurl/7.59.0 OpenSSL/1.0.2p zlib/1.2.11
> libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh2/1.7.0 nghttp2/1.31.0

> Can someone try to reproduce it?

I get the same behavior:
$ /usr/bin/curl -v http://127.0.0.1:2/
* STATE: INIT => CONNECT handle 0x600057ad0; line 1404 (connection #-5000)
* Added connection 0. The cache now contains 1 members
*   Trying 127.0.0.1...
* TCP_NODELAY set
* STATE: CONNECT => WAITCONNECT handle 0x600057ad0; line 1456 (connection #0)
* Connection timed out after 300324 milliseconds
* multi_done
* stopped the pause stream!
* Closing connection 0
* The cache now contains 0 members
curl: (28) Connection timed out after 300324 milliseconds

$ /usr/bin/curl --version
curl 7.59.0 (x86_64-unknown-cygwin) libcurl/7.59.0 OpenSSL/1.0.2p
zlib/1.2.11 libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh2/1.7.0
nghttp2/1.31.0


I also get an almost immediate 'failed to connect' notice on windows:
C:\>C:\UTIL\curl\curl.exe -v http://127.0.0.1:2/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* connect to 127.0.0.1 port 2 failed: Connection refused
* Failed to connect to 127.0.0.1 port 2: Connection refused
* Closing connection 0
curl: (7) Failed to connect to 127.0.0.1 port 2: Connection refused

with either version of curl:
C:\>where curl
C:\UTIL\curl\curl.exe
C:\Windows\System32\curl.exe

Regards,
Lee

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Something makes curl hang for 5 minutes after connection refused
  2018-11-30 19:49 ` Lee
@ 2018-12-01  3:57   ` Brian Inglis
  2018-12-01  9:51     ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Brian Inglis @ 2018-12-01  3:57 UTC (permalink / raw)
  To: cygwin

On 2018-11-30 12:49, Lee wrote:
> On 11/30/18, Basin Ilya  wrote:
>> Hi.
>>
>> Recently I noticed that `curl` does not fail immediately after connection
>> refused, but waits for 5 minutes.
>>
>> This only happens on my machine and only with the `Cygwin` version of
>> `curl`. The mingw version is unaffected.
>> I tried downgrading curl, but it didn't help. I thought there's a rogue
>> setting in `/etc` or in home or maybe some environment variable, but I
>> couldn't find it.
>>
>>     basin@BASIN /cygdrive/c/Users/basin
>>     $ >/dev/null /usr/bin/curl -v http://127.0.0.1:2/
>>     * STATE: INIT => CONNECT handle 0x80048658; line 1404 (connection
>> #-5000)
>>     * Added connection 0. The cache now contains 1 members
>>     *   Trying 127.0.0.1...
>>     * TCP_NODELAY set
>>     * STATE: CONNECT => WAITCONNECT handle 0x80048658; line 1456 (connection
>> #0)
>     <.. snip ..>
>>     curl: (28) Connection timed out after 300145 milliseconds
>>
>>     basin@BASIN /cygdrive/c/Users/basin
>>     $ /usr/bin/curl --version
>>     curl 7.59.0 (i686-pc-cygwin) libcurl/7.59.0 OpenSSL/1.0.2p zlib/1.2.11
>> libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh2/1.7.0 nghttp2/1.31.0
> 
>> Can someone try to reproduce it?
> 
> I get the same behavior:
> $ /usr/bin/curl -v http://127.0.0.1:2/
> * STATE: INIT => CONNECT handle 0x600057ad0; line 1404 (connection #-5000)
> * Added connection 0. The cache now contains 1 members
> *   Trying 127.0.0.1...
> * TCP_NODELAY set
> * STATE: CONNECT => WAITCONNECT handle 0x600057ad0; line 1456 (connection #0)
> * Connection timed out after 300324 milliseconds
> * multi_done
> * stopped the pause stream!
> * Closing connection 0
> * The cache now contains 0 members
> curl: (28) Connection timed out after 300324 milliseconds
> 
> $ /usr/bin/curl --version
> curl 7.59.0 (x86_64-unknown-cygwin) libcurl/7.59.0 OpenSSL/1.0.2p
> zlib/1.2.11 libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh2/1.7.0
> nghttp2/1.31.0
> 
> 
> I also get an almost immediate 'failed to connect' notice on windows:
> C:\>C:\UTIL\curl\curl.exe -v http://127.0.0.1:2/
> *   Trying 127.0.0.1...
> * TCP_NODELAY set
> * connect to 127.0.0.1 port 2 failed: Connection refused
> * Failed to connect to 127.0.0.1 port 2: Connection refused
> * Closing connection 0
> curl: (7) Failed to connect to 127.0.0.1 port 2: Connection refused
> 
> with either version of curl:
> C:\>where curl
> C:\UTIL\curl\curl.exe
> C:\Windows\System32\curl.exe

Ditto all the way!

Could this be caused by network speed improvements made to Cygwin a while back?
Or were those patches never sent/received/applied from Daniel Havey (MS Windows
Program Manager for Transports and IP)?

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Something makes curl hang for 5 minutes after connection refused
  2018-12-01  3:57   ` Brian Inglis
@ 2018-12-01  9:51     ` Corinna Vinschen
  2019-09-15 10:13       ` Basin Ilya
  0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2018-12-01  9:51 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 3032 bytes --]

On Nov 30 20:42, Brian Inglis wrote:
> On 2018-11-30 12:49, Lee wrote:
> > On 11/30/18, Basin Ilya  wrote:
> >> Hi.
> >>
> >> Recently I noticed that `curl` does not fail immediately after connection
> >> refused, but waits for 5 minutes.
> >>
> >> This only happens on my machine and only with the `Cygwin` version of
> >> `curl`. The mingw version is unaffected.
> >> I tried downgrading curl, but it didn't help. I thought there's a rogue
> >> setting in `/etc` or in home or maybe some environment variable, but I
> >> couldn't find it.
> >>
> >>     basin@BASIN /cygdrive/c/Users/basin
> >>     $ >/dev/null /usr/bin/curl -v http://127.0.0.1:2/
> >>     * STATE: INIT => CONNECT handle 0x80048658; line 1404 (connection
> >> #-5000)
> >>     * Added connection 0. The cache now contains 1 members
> >>     *   Trying 127.0.0.1...
> >>     * TCP_NODELAY set
> >>     * STATE: CONNECT => WAITCONNECT handle 0x80048658; line 1456 (connection
> >> #0)
> >     <.. snip ..>
> >>     curl: (28) Connection timed out after 300145 milliseconds
> >>
> >>     basin@BASIN /cygdrive/c/Users/basin
> >>     $ /usr/bin/curl --version
> >>     curl 7.59.0 (i686-pc-cygwin) libcurl/7.59.0 OpenSSL/1.0.2p zlib/1.2.11
> >> libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh2/1.7.0 nghttp2/1.31.0
> > 
> >> Can someone try to reproduce it?
> > 
> > I get the same behavior:
> > $ /usr/bin/curl -v http://127.0.0.1:2/
> > * STATE: INIT => CONNECT handle 0x600057ad0; line 1404 (connection #-5000)
> > * Added connection 0. The cache now contains 1 members
> > *   Trying 127.0.0.1...
> > * TCP_NODELAY set
> > * STATE: CONNECT => WAITCONNECT handle 0x600057ad0; line 1456 (connection #0)
> > * Connection timed out after 300324 milliseconds
> > * multi_done
> > * stopped the pause stream!
> > * Closing connection 0
> > * The cache now contains 0 members
> > curl: (28) Connection timed out after 300324 milliseconds
> > 
> > $ /usr/bin/curl --version
> > curl 7.59.0 (x86_64-unknown-cygwin) libcurl/7.59.0 OpenSSL/1.0.2p
> > zlib/1.2.11 libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh2/1.7.0
> > nghttp2/1.31.0
> > 
> > 
> > I also get an almost immediate 'failed to connect' notice on windows:
> > C:\>C:\UTIL\curl\curl.exe -v http://127.0.0.1:2/
> > *   Trying 127.0.0.1...
> > * TCP_NODELAY set
> > * connect to 127.0.0.1 port 2 failed: Connection refused
> > * Failed to connect to 127.0.0.1 port 2: Connection refused
> > * Closing connection 0
> > curl: (7) Failed to connect to 127.0.0.1 port 2: Connection refused
> > 
> > with either version of curl:
> > C:\>where curl
> > C:\UTIL\curl\curl.exe
> > C:\Windows\System32\curl.exe
> 
> Ditto all the way!
> 
> Could this be caused by network speed improvements made to Cygwin a while back?
> Or were those patches never sent/received/applied from Daniel Havey (MS Windows
> Program Manager for Transports and IP)?

Somebody may want to bisect this...


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Something makes curl hang for 5 minutes after connection refused
  2018-12-01  9:51     ` Corinna Vinschen
@ 2019-09-15 10:13       ` Basin Ilya
  2020-11-12 15:35         ` basinilya
  0 siblings, 1 reply; 6+ messages in thread
From: Basin Ilya @ 2019-09-15 10:13 UTC (permalink / raw)
  To: cygwin

Hi.
Any update on this?

01.12.2018 12:51, Corinna Vinschen пишет:
> On Nov 30 20:42, Brian Inglis wrote:
>> On 2018-11-30 12:49, Lee wrote:
>>> On 11/30/18, Basin Ilya  wrote:
>>>> Hi.
>>>>
>>>> Recently I noticed that `curl` does not fail immediately after connection
>>>> refused, but waits for 5 minutes.
>>>>
>>>> This only happens on my machine and only with the `Cygwin` version of
>>>> `curl`. The mingw version is unaffected.
>>>> I tried downgrading curl, but it didn't help. I thought there's a rogue
>>>> setting in `/etc` or in home or maybe some environment variable, but I
>>>> couldn't find it.
>>>>
>>>>     basin@BASIN /cygdrive/c/Users/basin
>>>>     $ >/dev/null /usr/bin/curl -v http://127.0.0.1:2/
>>>>     * STATE: INIT => CONNECT handle 0x80048658; line 1404 (connection
>>>> #-5000)
>>>>     * Added connection 0. The cache now contains 1 members
>>>>     *   Trying 127.0.0.1...
>>>>     * TCP_NODELAY set
>>>>     * STATE: CONNECT => WAITCONNECT handle 0x80048658; line 1456 (connection
>>>> #0)
>>>     <.. snip ..>
>>>>     curl: (28) Connection timed out after 300145 milliseconds
>>>>
>>>>     basin@BASIN /cygdrive/c/Users/basin
>>>>     $ /usr/bin/curl --version
>>>>     curl 7.59.0 (i686-pc-cygwin) libcurl/7.59.0 OpenSSL/1.0.2p zlib/1.2.11
>>>> libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh2/1.7.0 nghttp2/1.31.0
>>>
>>>> Can someone try to reproduce it?
>>>
>>> I get the same behavior:
>>> $ /usr/bin/curl -v http://127.0.0.1:2/
>>> * STATE: INIT => CONNECT handle 0x600057ad0; line 1404 (connection #-5000)
>>> * Added connection 0. The cache now contains 1 members
>>> *   Trying 127.0.0.1...
>>> * TCP_NODELAY set
>>> * STATE: CONNECT => WAITCONNECT handle 0x600057ad0; line 1456 (connection #0)
>>> * Connection timed out after 300324 milliseconds
>>> * multi_done
>>> * stopped the pause stream!
>>> * Closing connection 0
>>> * The cache now contains 0 members
>>> curl: (28) Connection timed out after 300324 milliseconds
>>>
>>> $ /usr/bin/curl --version
>>> curl 7.59.0 (x86_64-unknown-cygwin) libcurl/7.59.0 OpenSSL/1.0.2p
>>> zlib/1.2.11 libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh2/1.7.0
>>> nghttp2/1.31.0
>>>
>>>
>>> I also get an almost immediate 'failed to connect' notice on windows:
>>> C:\>C:\UTIL\curl\curl.exe -v http://127.0.0.1:2/
>>> *   Trying 127.0.0.1...
>>> * TCP_NODELAY set
>>> * connect to 127.0.0.1 port 2 failed: Connection refused
>>> * Failed to connect to 127.0.0.1 port 2: Connection refused
>>> * Closing connection 0
>>> curl: (7) Failed to connect to 127.0.0.1 port 2: Connection refused
>>>
>>> with either version of curl:
>>> C:\>where curl
>>> C:\UTIL\curl\curl.exe
>>> C:\Windows\System32\curl.exe
>>
>> Ditto all the way!
>>
>> Could this be caused by network speed improvements made to Cygwin a while back?
>> Or were those patches never sent/received/applied from Daniel Havey (MS Windows
>> Program Manager for Transports and IP)?
> 
> Somebody may want to bisect this...
> 
> 
> Corinna
> 

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Something makes curl hang for 5 minutes after connection refused
  2019-09-15 10:13       ` Basin Ilya
@ 2020-11-12 15:35         ` basinilya
  0 siblings, 0 replies; 6+ messages in thread
From: basinilya @ 2020-11-12 15:35 UTC (permalink / raw)
  To: cygwin

This looks fixed now. Thanks.

On 15.09.2019 10:07, Basin Ilya wrote:
> Hi.
> Any update on this?
>
> 01.12.2018 12:51, Corinna Vinschen пишет:
>> On Nov 30 20:42, Brian Inglis wrote:
>>> On 2018-11-30 12:49, Lee wrote:
>>>> On 11/30/18, Basin Ilya  wrote:
>>>>> Hi.
>>>>>
>>>>> Recently I noticed that `curl` does not fail immediately after connection
>>>>> refused, but waits for 5 minutes.
>>>>>
>>>>> This only happens on my machine and only with the `Cygwin` version of
>>>>> `curl`. The mingw version is unaffected.
>>>>> I tried downgrading curl, but it didn't help. I thought there's a rogue
>>>>> setting in `/etc` or in home or maybe some environment variable, but I
>>>>> couldn't find it.
>>>>>
>>>>>     basin@BASIN /cygdrive/c/Users/basin
>>>>>     $ >/dev/null /usr/bin/curl -v http://127.0.0.1:2/
>>>>>     * STATE: INIT => CONNECT handle 0x80048658; line 1404 (connection
>>>>> #-5000)
>>>>>     * Added connection 0. The cache now contains 1 members
>>>>>     *   Trying 127.0.0.1...
>>>>>     * TCP_NODELAY set
>>>>>     * STATE: CONNECT => WAITCONNECT handle 0x80048658; line 1456 (connection
>>>>> #0)
>>>>     <.. snip ..>
>>>>>     curl: (28) Connection timed out after 300145 milliseconds
>>>>>
>>>>>     basin@BASIN /cygdrive/c/Users/basin
>>>>>     $ /usr/bin/curl --version
>>>>>     curl 7.59.0 (i686-pc-cygwin) libcurl/7.59.0 OpenSSL/1.0.2p zlib/1.2.11
>>>>> libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh2/1.7.0 nghttp2/1.31.0
>>>>> Can someone try to reproduce it?
>>>> I get the same behavior:
>>>> $ /usr/bin/curl -v http://127.0.0.1:2/
>>>> * STATE: INIT => CONNECT handle 0x600057ad0; line 1404 (connection #-5000)
>>>> * Added connection 0. The cache now contains 1 members
>>>> *   Trying 127.0.0.1...
>>>> * TCP_NODELAY set
>>>> * STATE: CONNECT => WAITCONNECT handle 0x600057ad0; line 1456 (connection #0)
>>>> * Connection timed out after 300324 milliseconds
>>>> * multi_done
>>>> * stopped the pause stream!
>>>> * Closing connection 0
>>>> * The cache now contains 0 members
>>>> curl: (28) Connection timed out after 300324 milliseconds
>>>>
>>>> $ /usr/bin/curl --version
>>>> curl 7.59.0 (x86_64-unknown-cygwin) libcurl/7.59.0 OpenSSL/1.0.2p
>>>> zlib/1.2.11 libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh2/1.7.0
>>>> nghttp2/1.31.0
>>>>
>>>>
>>>> I also get an almost immediate 'failed to connect' notice on windows:
>>>> C:\>C:\UTIL\curl\curl.exe -v http://127.0.0.1:2/
>>>> *   Trying 127.0.0.1...
>>>> * TCP_NODELAY set
>>>> * connect to 127.0.0.1 port 2 failed: Connection refused
>>>> * Failed to connect to 127.0.0.1 port 2: Connection refused
>>>> * Closing connection 0
>>>> curl: (7) Failed to connect to 127.0.0.1 port 2: Connection refused
>>>>
>>>> with either version of curl:
>>>> C:\>where curl
>>>> C:\UTIL\curl\curl.exe
>>>> C:\Windows\System32\curl.exe
>>> Ditto all the way!
>>>
>>> Could this be caused by network speed improvements made to Cygwin a while back?
>>> Or were those patches never sent/received/applied from Daniel Havey (MS Windows
>>> Program Manager for Transports and IP)?
>> Somebody may want to bisect this...
>>
>>
>> Corinna
>>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-11-12 15:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-30 11:03 Something makes curl hang for 5 minutes after connection refused Basin Ilya
2018-11-30 19:49 ` Lee
2018-12-01  3:57   ` Brian Inglis
2018-12-01  9:51     ` Corinna Vinschen
2019-09-15 10:13       ` Basin Ilya
2020-11-12 15:35         ` basinilya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).