Discussion:
Cygwin's curl is only working in Safe Mode on Windows 7
t***@thomsonreuters.com
2017-08-08 23:56:35 UTC
Permalink
I've been pulling my hair out over this. Hoping someone has some ideas.
Something must have changed on my machine because this used to work OK. I
have Cygwin 64-bit installed on Windows 7. The curl command in the Cygwin
shell has been working fine for me in the past, but lately it might work for a
short time after a fresh reboot, but then it'll stop working until I
completely reboot again. Here's' what the output looks like with the verbose
(-v) option:



$ curl -v -L www.google.com
* STATE: INIT => CONNECT handle 0x600057970; line 1410 (connection #-5000)
* Rebuilt URL to: www.google.com/
* Added connection 0. The cache now contains 1 members



... and here's what the output looks like when it works fine:



$ curl -v -L www.google.com
* STATE: INIT => CONNECT handle 0x600057970; line 1410 (connection #-5000)
* Rebuilt URL to: www.google.com/
* Added connection 0. The cache now contains 1 members
* STATE: CONNECT => WAITRESOLVE handle 0x600057970; line 1446 (connection #0)
* Trying 172.217.0.132...
* TCP_NODELAY set
* STATE: WAITRESOLVE => WAITCONNECT handle 0x600057970; line 1527 (connection
#0)
* Connected to www.google.com (172.217.0.132) port 80 (#0)
* STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x600057970; line 1579
(connection #0)
* Marked for [keep alive]: HTTP default
* STATE: SENDPROTOCONNECT => DO handle 0x600057970; line 1597 (connection #0)
GET / HTTP/1.1
Host: www.google.com
User-Agent: curl/7.54.1
Accept: */*
* STATE: DO => DO_DONE handle 0x600057970; line 1676 (connection #0)
* STATE: DO_DONE => WAITPERFORM handle 0x600057970; line 1801 (connection #0)
* STATE: WAITPERFORM => PERFORM handle 0x600057970; line 1811 (connection #0)
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 200 OK
< Date: Tue, 08 Aug 2017 22:47:30 GMT
< Expires: -1
< Cache-Control: private, max-age=0
< Content-Type: text/html; charset=ISO-8859-1
< P3P: CP="This is not a P3P policy! See
https://www.google.com/support/accounts/answer/151657?hl=en for more info."
* Server gws is not blacklisted
< Server: gws
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: SAMEORIGIN
< Set-Cookie:
NID=109=qUfNKGtmpC18E2B31Mpbx2GFa5vPk481r3jaDu7Onuoj1f3gvigD_sQEGdag8SqNp-eVFhjmMT3O4TNXgYJLAZGIknpKqcWfmD_fAGo5C2gBRe5ieqgECh252Vze9Ymi;
expires=Wed, 07-Feb-2018 22:47:30 GMT; path=/; domain=.google.com; HttpOnly
< Accept-Ranges: none
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
<
<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage"
lang="en"><head><meta content="Search the world's information, including
webpages, images, videos and more. Google has many special features to help
you find exactly what you're looking for." name="description"><meta
content="noodp" name="robots"><meta content="text/html; charset=UTF-8"
http-equiv="Content-Type"><meta
content="/images/branding/googleg/1x/googleg_standard_color_128dp.png"
itemprop="image"><title>Google</title><script>(function(){window.google={kEI:'gj-KWce3Gc78mQHDgpB4',kEXPI:'1353383,1354276,1354296,1354514,1354625,1354750,1354838,3700062,3700254,3700347,3700433,3700442,4029815,4031109,4043492,4045841,4048347,4063220,4072776,4076999,4078430,4081039,4081164,4094544,4095910,4096834,4097153,4097470,4097922,4097929,4097951,4098721,4098728,4098752,4102239,4102827,4103469,4103475,4103861,4104258,4104658,4105085,4105115,4105128,4105786,4106084,4107555,4108511,4109041,4109316,4109489,4109528,4110259,4110656,4112160,4113148,4113217,4113495,4114597,4114975,4115112,4115287,4115697,4116724,4116731,4116875,4116926,4116927,4116935,4117980,4118102,4118226,4118457,4118626,4118798,4119032,4119034,4119036,4119272,4119621,4119626,4119655,4120004,4120332,4120767,4120880,4120916,4120974,4120988,4121035,4121175,4121513,4121787,4122027,4122035,4122177,4122185,4122379,4122723,4123381,4123647,4123829,4123837,4124286,4124338,4124417,4125399,4125468,4125478,4125878,41!
25880,4125882,4126055,4126137,10200083,10200095,10201957,19002949,19002955,19002971,19002985',authuser:0,kscs:'c9c918f0_24'};google.kHL='en';})();(function(){google.lc=[];google.li=0;google.getEI=function(a){for(var
b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return
b||google.kEI};google.getLEI=function(a){for(var
b=null;a&&(!a.getAttribute||!(b=a.getAttribute("leid")));)a=a.parentNode;return
b};google.https=function(){return"https:"==window.location.protocol};google.ml=function(){return
null};google.wl=function(a,b){try{google.ml(Error(a),!1,b)}catch(c){}};google.time=function(){return(new
Date).getTime()};google.log=function(a,b,c,d,g){if(a=google.logUrl(a,b,c,d,g)){b=new
Image;var
e=google.lc,f=google.li;e[f]=b;b.onerror=b.onload=b.onabort=function(){delete
e[f]};google.vel&&google.vel.lu&&google.vel.lu(a);b.src=a;google.li=f+1}};google.logUrl=function(a,b,c,d,g){var
e="",f=google.ls||"";c||-1!=b.search("&ei=")||(e="&ei="+google.getEI(d),-1==b.search("&lei=")&&(d=google.getLEI(d))&&(e+="&lei="+d));d="";!c&&google.cached&&-1==b.search("&cached=")&&(d="&cached="+google.cached);a=c||"/"+(g||"gen_204")+"?atyp=i&ct="+a+"&cad="+b+e+f+"&zx="+google.time()+d;/^http:/i.test(a)&&google.https()&&(google.ml(Error("a"),!1,{src:a,glmm:1}),a="");return
a};google.y={};google.x=function(a,b){if(a)var c=a.id;else{do
c=Math.random();while(google.y[c])}google.y[c]=[a,b];return!1};google.lq=[];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=function(a,b){google.lq.push([a,b])};}).call(this);google.f={};var
a=window.location,b=a.href.indexOf("#");if(0<=b){var
c=a.href.substring(b+1);/(^|&)q=/.test(c)&&-1==c.indexOf("#")&&a.replace("/search?"+c.replace(/(^|&)fp=[^&]*/g,"")+"&cad=h")};</script><style>#gbar,#guser{font-size:13px;padding-top:1px
!important;}#gbar{height:22px}#guser{padding-bottom:7px
!important;text-align:right}.gbh,.gbd{border-top:1px solid
#c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media
all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline
!important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27
!important}.gbf .gb4{color:#900 !important}
</style><style>body,td,a,p,.h{font-family:arial,sans-serif}body{margin:0;overflow-y:scroll}#gog{padding:3px
8px 0}td{line-height:.8em}.gac_m
td{line-height:17px}form{margin-bottom:20px}.h{color:#36c}.q{color:#00c}.ts
td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px
arial,sans-serif}.gsfs{font:17px
arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0
4px;margin-left:4px}input{font-family:inherit}a.gb1,a.gb2,a.gb3,a.gb4{color:#11c
!important}body{background:#fff;color:black}a{color:#11c;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl
a{color:#36c}a:visited{color:#551a8b}a.gb1,a.gb4{text-decoration:underline}a.gb3:hover{text-decoration:none}#ghead
a.gb2:hover{color:#fff !important}.sblc{padding-top:5px}.sblc
a{display:block;margin:2px
0;margin-left:13px;font-size:11px}.lsbb{background:#eee;border:solid
1px;border-color:#ccc #999 #999 #ccc;height:30px}.lsbb{display:block}.ftl,#fll
a{display:inline-block;margin:0
12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px
repeat-x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font:15px
arial,sans-serif;vertical-align:top}.lsb:active{background:#ccc}.lst:focus{outline:none}</style><script>(function(){window.google.erd={sp:'hp',jsr:1,bv:218,cs:false};var
f=0,g,h=google.erd,k=h.jsr,l;google.jsmp=!0;google.ml=function(a,b,d,e){google.dl&&google.dl(a,d,b);if(google._epc(a,b,d,e))return
null;a=google._gld(a,"/gen_204?atyp=i",d||{},!1);e||google.log(0,"",a);return
a};google._epc=function(a,b,d,e){var
c=google.erd.jsr;if(0>c){window.console&&console.error(a,d);if(-2==c)throw
a;return!0}if(!a||!a.message||"Error loading
script"==a.message||!(n()&&1>f||e))return!0;f++;b&&(g=a&&a.message);return!1};google._gld=function(a,b,d,e){var
c=encodeURIComponent;b=b+"&ei="+c(google.kEI)+(google.kEXPI?"&jexpid="+c(google.kEXPI):"")+"&srcpg="+c(h.sp)+"&jsr="+google.erd.jsr+"&bver="+c(h.bv);for(var
m in d)b+="&",b+=c(m),b+="=",b+=c(d[m]);b=b+"&emsg="+c(a.name+":
"+a.message);b=b+"&jsst="+c(a.stack||"N/A");!e&&2E3<=b.length&&(b=b.substr(0,2E3));return
b};function n(){if(!h.cs)return!0;var a=google.erd.jsr;void
0==l&&(l=0>a||1==a||1==Math.ceil(Math.random()*a));return l}
google.ojsr=function(a){google.erd.jsr=a;l=void
0};google.rjsr=function(){google.erd.jsr=k;l=void
0};window.onerror=function(a,b,d,e,c){g!==a&&google.ml(c instanceof
Error?c:Error(a),!1);g=null;n()&&1>f||(window.onerror=null)};})();</script><link
href="/images/branding/product/ico/googleg_lodp.ico" rel="shortcut
icon"></head><body bgcolor="#fff"><script>(function(){var
src='/images/nav_logo229.png';var iesg=false;document.body.onload =
function(){window.n && window.n();if (document.images){new Image().src=src;}
if
(!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus();}
}
})();</script><div id="mngb"> <div id=gbar><nobr><b class=gb1>Search</b> <a
class=gb1 href="http://www.google.com/imghp?hl=en&tab=wi">Images</a> <a
class=gb1 href="http://maps.google.com/maps?hl=en&tab=wl">Maps</a> <a
class=gb1 href="https://play.google.com/?hl=en&tab=w8">Play</a> <a class=gb1
href="http://www.youtube.com/?tab=w1">YouTube</a> <a class=gb1
href="http://news.google.com/nwshp?hl=en&tab=wn">News</a> <a class=gb1
href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a class=gb1
href="https://drive.google.com/?tab=wo">Drive</a> <a class=gb1
style="text-decoration:none"
href="https://www.google.com/intl/en/options/"><u>More</u>
&raquo;</a></nobr></div><div id=guser width=100%><nobr><span id=gbn
class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a
href="http://www.google.com/history/optout?hl=en" class=gb4>Web History</a> |
<a href="/preferences?hl=en" class=gb4>Settings</a> | <a target=_top id=gb_70
href="https://accounts.google.com/ServiceLogin?hl=en&passive=true&continue=http://www.google.com/"
class=gb4>Sign in</a></nobr></div><div class=gbh style=left:0></div><div
class=gbh style=right:0></div> </div><center><br clear="all" id="lgpd"><div
id="lga"><img alt="Google" height="92"
src="/images/branding/googlelogo/1x/googlelogo_white_background_color_272x92dp.png"
style="padding:28px 0 14px" width="272" id="hplogo"
onload="window.lol&&lol()"><br><br></div><form action="/search"
name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td
width="25%">&nbsp;</td><td align="center" nowrap=""><input name="ie"
value="ISO-8859-1" type="hidden"><input value="en" name="hl"
type="hidden"><input name="source" type="hidden" value="hp"><input name="biw"
type="hidden"><input name="bih" type="hidden"><div class="ds"
style="height:32px;margin:4px 0"><input style="color:#000;margin:0;padding:5px
8px 0 6px;vertical-align:top" autocomplete="off" class="lst" value=""
title="Google Search" maxlength="2048" name="q" size="57"></div><br
style="line-height:0"><span class="ds"><span class="lsbb"><input class="lsb"
value="Google Search" name="btnG" type="submit"></span></span><span
class="ds"><span class="lsbb"><input class="lsb" value="I'm Feeling Lucky"
name="btnI" onclick="if(this.form.q.value)this.checked=1; else
top.location='/doodles/'" type="submit"></span></span></td><td class="fl sblc"
align="left" nowrap="" width="25%"><a
href="/advanced_search?hl=en&amp;authuser=0">Advanced search</a><a
href="/language_tools?hl=en&amp;authuser=0">Language
tools</a></td></tr></table><input id="gbv" name="gbv" type="hidden"
value="1"></form><div id="gac_scont"></div><div
style="font-size:83%;min-height:3.5em"><br></div><span id="footer"><div
style="font-size:10pt"><div style="margin:19px auto;text-align:center"
id="fll"><a href="/intl/en/ads/">Advertising|Programs</a><a
href="/services/">Business Solutions</a><a
href="https://plus.google.com/116899029375914044550"
rel="publisher">+Google</a><a href="/intl/en/about.html">About
Google</a></div></div><p style="color:#767676;font-size:8pt">&copy; 2017 - <a
href="/intl/en/policies/privacy/">Privacy</a> - <a
href="/intl/en/policies/terms/">Terms</a></p></span></center><script>(function(){window.google.cdo={height:0,width:0};(function(){var
a=window.innerWidth,b=window.innerHeight;if(!a||!b){var
c=window.document,d="CSS1Compat"==c.compatMode?c.documentElement:c.body;a=d.clientWidth;b=d.clientHeight}a&&b&&(a!=google.cdo.width||b!=google.cdo.height)&&google.log("","","/client_204?&atyp=i&biw="+a+"&bih="+b+"&ei="+google.kEI);}).call(this);})();</script><div
id="xjsd"></div><div id="xjsi"><script>(function(){function
c(b){window.setTimeout(function(){var
a=document.createElement("script");a.src=b;document.getElementById("xjsd").appendChild(a)},0)}google.dljp=function(b,a){google.xjsu=b;c(a)};google.dlj=c;}).call(this);(function(){window.google.xjsrm=[];})();if(google.y)google.y.first=[];if(!google.xjs){window._=window._||{};window._DumpException=window._._DumpException=function(e){throw
e};if(google.timers&&google.timers.load.t){google.timers.load.t.xjsls=new
Date().getTime();}google.dljp('/xjs/_/js/k\x3dxjs.hp.en_US.dE1M89AKXDg.O/m\x3dsb_he,d/am\x3dABg/rt\x3dj/d\x3d1/t\x3dzcms/rs\x3dACT90oEXJfi3k3RNfhhgqPQcMtK0gvFvRw','/xjs/_/js/k\x3dxjs.hp.en_US.dE1M89AKXDg.O/m\x3dsb_he,d/am\x3dABg/rt\x3dj/d\x3d1/t\x3dzcms/rs\x3dACT90oEXJfi3k3RNfhhgqPQcMtK0gvFvRw');google.xjs=1;}google.pmc={"sb_he":{"agen":false,"cgen":false,"client":"heirloom-hp","dh":true,"dhqt":true,"ds":"","fl":true,"host":"google.com","isbh":28,"jam":0,"jsonp":true,"msgs":{"cibl":"Clear
Search","dym":"Did you mean:","lcky":"I\u0026#39;m Feeling Lucky","lml":"Learn
more","oskt":"Input tools","psrc":"This search was removed from your \u003Ca
href=\"/history\"\u003EWeb
History\u003C/a\u003E","psrl":"Remove","sbit":"Search by image","srch":"Google
Search"},"nds":true,"ovr":{},"pq":"","refpd":true,"rfs":[],"sbpl":24,"sbpr":24,"scd":10,"sce":5,"stok":"T7OZsCWzu9bdVBxVmBky1KjYmGY"},"d":{},"aWiv7g":{},"YFCs/g":{}};google.y.first.push(function(){if(google.med){google.med('init');google.initHistory();google.med('history');}});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);}
* STATE: PERFORM => DONE handle 0x600057970; line 1980 (connection #0)
* multi_done
* Connection #0 to host www.google.com left intact
* Expire cleared
</script></div></body></html>



I think the problem may be DNS related. After my machine gets into a bad
state, I seem to get at least a little further using an IP address, though the
output is still not what it is when using a DNS name when the DNS name is
working:



$ curl -v -L 216.58.192.174
* STATE: INIT => CONNECT handle 0x600057970; line 1410 (connection #-5000)
* Rebuilt URL to: 216.58.192.174/
* Added connection 0. The cache now contains 1 members
* Trying 216.58.192.174...
* TCP_NODELAY set
* STATE: CONNECT => WAITCONNECT handle 0x600057970; line 1462 (connection #0)
* Connected to 216.58.192.174 (216.58.192.174) port 80 (#0)
* STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x600057970; line 1579
(connection #0)
* Marked for [keep alive]: HTTP default
* STATE: SENDPROTOCONNECT => DO handle 0x600057970; line 1597 (connection #0)
GET / HTTP/1.1
Host: 216.58.192.174
User-Agent: curl/7.54.1
Accept: */*
* STATE: DO => DO_DONE handle 0x600057970; line 1676 (connection #0)
* STATE: DO_DONE => WAITPERFORM handle 0x600057970; line 1801 (connection #0)
* STATE: WAITPERFORM => PERFORM handle 0x600057970; line 1811 (connection #0)
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 301 Moved Permanently
< Location: http://www.google.com/
< Content-Type: text/html; charset=UTF-8
< Date: Tue, 08 Aug 2017 23:44:51 GMT
< Expires: Thu, 07 Sep 2017 23:44:51 GMT
< Cache-Control: public, max-age=2592000
* Server gws is not blacklisted
< Server: gws
< Content-Length: 219
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: SAMEORIGIN
<
* Ignoring the response-body
* multi_done
* Connection #0 to host 216.58.192.174 left intact
* Issue another request to this URL: 'http://www.google.com/'
* STATE: PERFORM => CONNECT handle 0x600057970; line 1961 (connection #-5000)
* Added connection 1. The cache now contains 2 members



All of that being said, if I reboot my machine in Safe Mode, then the curl
command seems to work consistently. This make me think the problem is due to
some interference from some other application that runs when I'm not in Safe
Mode. I know that Cygwin has a list of BLODA (Big List Of Dodgy Apps) that
are known to cause issues, so maybe that's what's going on with me. (Ref:
https://cygwin.com/faq/faq.html#faq.using.bloda). If anything I've
uninstalled a lot of apps recently and haven't really installed new apps, so
I'm not sure what that could be. I guess I may try selectively disabling
things at startup using msconfig to see where that leads unless someone has
some other ideas. I have the CYGWIN environment variable set to detect_bloda
but so far no debug info has turned up.

Hoping someone has some other ideas of things to try, but I guess selective
startup is at least something I can try to do that I haven't tried already.

I should also say that I have the curl standalone app for Windows installed
and that works fine. it's just the one running under Cygwin. Grrrr.

Below is some version info in case that's helpful.

$ curl -V
curl 7.54.1 (x86_64-unknown-cygwin) libcurl/7.54.1 OpenSSL/1.0.2k zlib/1.2.11
libidn2/2.0.2 libpsl/0.17.0 (+libidn2/0.11) libssh2/1.7.0 nghttp2/1.23.1
Release-Date: 2017-06-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 Metalink PSL

$ uname -r
2.8.2(0.313/5/3)

$ uname -m
x86_64

$ python -V
Python 2.7.13

Thanks in advance.
Ray Satiro via curl-users
2017-08-09 07:06:40 UTC
Permalink
Post by t***@thomsonreuters.com
I've been pulling my hair out over this. Hoping someone has some ideas.
Something must have changed on my machine because this used to work OK. I
have Cygwin 64-bit installed on Windows 7. The curl command in the Cygwin
shell has been working fine for me in the past, but lately it might work for a
short time after a fresh reboot, but then it'll stop working until I
completely reboot again. Here's' what the output looks like with the verbose
$ curl -v -L www.google.com
* STATE: INIT => CONNECT handle 0x600057970; line 1410 (connection #-5000)
* Rebuilt URL to: www.google.com/
* Added connection 0. The cache now contains 1 members
...
Post by t***@thomsonreuters.com
$ curl -V
curl 7.54.1 (x86_64-unknown-cygwin) libcurl/7.54.1 OpenSSL/1.0.2k zlib/1.2.11
libidn2/2.0.2 libpsl/0.17.0 (+libidn2/0.11) libssh2/1.7.0 nghttp2/1.23.1
Release-Date: 2017-06-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 Metalink PSL
I am running that same version in Windows 7 x64 and I haven't noticed a
problem like that. Try gdb curl (you'll need the cygwin gdb and
curl-debuginfo packages) then 'run args', then wait until it hangs and
CTRL+C, then 'thread apply all where'. Also try strace curl args.
Another thing you can do is let it hang 10 minutes to see if it
eventually exits on its own with an error.
t***@thomsonreuters.com
2017-08-09 14:49:43 UTC
Permalink
Thanks much for the reply, Ray. I should have clarified something in my
original post. When curl doesn't work, it doesn't actually hang. Sometimes
it might pause very briefly (less than a second), but usually it just
immediately ends after the "Added connection 0" line. I've tried the
--trace options too and didn't see anything more useful than just using the
-v option. I ran strace when curl was in a bad state and attached the
"strace google bad.txt" output file to this post. (I'm not sure whether
attachments come through OK on this user group - I guess I'll find out.)



I also ran gdb curl when curl was in a bad state. I'm not sure whether it's
working. After typing "gdb curl", I tried typing "run args" like you said
and I quickly got an exception. Realizing you probably meant for me to type
"run" followed by the actual arguments, I then typed "run -v -L
www.google.com". This time I saw the curl messages, followed by the same
exception as when I typed "run args". So maybe this is a clue? The full
gdb trace is below. Thanks again so much for your help on this.



$ gdb curl

GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1

Copyright (C) 2015 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law. Type "show copying"

and "show warranty" for details.

This GDB was configured as "x86_64-pc-cygwin".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>.

Find the GDB manual and other documentation resources online at:

<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".

Type "apropos word" to search for commands related to "word"...

Reading symbols from curl...Reading symbols from
/usr/lib/debug//usr/bin/curl.exe.dbg...done.

done.

(gdb) run args

Starting program: /usr/bin/curl args

[New Thread 12728.0x3664]

[New Thread 12728.0x3b90]

[New Thread 12728.0x3248]

[New Thread 12728.0x1614]

[New Thread 12728.0x3438]

[New Thread 12728.0x2768]

[Thread 12728.0x3248 exited with code 0]

[New Thread 12728.0x554]

[New Thread 12728.0x2458]

gdb: unknown target exception 0x80000001 at 0x772f470a



Program received signal ?, Unknown signal.

[Switching to Thread 12728.0x2458]

0x00000000772f470a in ntdll!LdrLoadAlternateResourceModule ()

from /cygdrive/c/Windows/SYSTEM32/ntdll.dll

(gdb) run -v -L www.google.com

The program being debugged has been started already.

Start it from the beginning? (y or n) y

Starting program: /usr/bin/curl -v -L www.google.com

[New Thread 8560.0x2b18]

[New Thread 8560.0xac8]

[New Thread 8560.0x3418]

[New Thread 8560.0x1e7c]

[New Thread 8560.0x35d4]

[New Thread 8560.0x241c]

[Thread 8560.0x3418 exited with code 0]

[New Thread 8560.0x15b4]

* STATE: INIT => CONNECT handle 0x60006b1f0; line 1410 (connection #-5000)

* Rebuilt URL to: www.google.com/

* Added connection 0. The cache now contains 1 members

[New Thread 8560.0x35cc]

gdb: unknown target exception 0x80000001 at 0x772f470a



Program received signal ?, Unknown signal.

[Switching to Thread 8560.0x35cc]

0x00000000772f470a in ntdll!LdrLoadAlternateResourceModule ()

from /cygdrive/c/Windows/SYSTEM32/ntdll.dll

(gdb)





From: curl-users [mailto:curl-users-***@cool.haxx.se] On Behalf Of Ray
Satiro via curl-users
Sent: Wednesday, August 09, 2017 2:07 AM
To: curl-***@cool.haxx.se
Cc: Ray Satiro
Subject: Re: Cygwin's curl is only working in Safe Mode on Windows 7



On 8/8/2017 7:56 PM, ***@thomsonreuters.com wrote:



I've been pulling my hair out over this. Hoping someone has some ideas.
Something must have changed on my machine because this used to work OK. I
have Cygwin 64-bit installed on Windows 7. The curl command in the Cygwin
shell has been working fine for me in the past, but lately it might work for
a
short time after a fresh reboot, but then it'll stop working until I
completely reboot again. Here's' what the output looks like with the
verbose
(-v) option:



$ curl -v -L www.google.com
<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.google.com&d=DwMD-g
&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=deLm_6XFc8tSOEbSavqRCPOgbc3
qbtBXIFrJKq0NguU&m=UzgAYlSdoKlXopygvvNedkQKXtKKacWiY_5LNYwxVSo&s=dh5zeR9AAxO
c4H6-vAcqXdkPTqilqq4cPvwEM0b4CY0&e=>
* STATE: INIT => CONNECT handle 0x600057970; line 1410 (connection #-5000)
* Rebuilt URL to: www.google.com/
<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.google.com_&d=DwMD-
g&c=4ZIZThykDLcoWk-GVjSLmy8-1Cr1I4FWIvbLFebwKgY&r=deLm_6XFc8tSOEbSavqRCPOgbc
3qbtBXIFrJKq0NguU&m=UzgAYlSdoKlXopygvvNedkQKXtKKacWiY_5LNYwxVSo&s=RMVrcdESb0
zVfVZkL6s_THXwyDXtFrJ0nWxeu3JjJ_Q&e=>
* Added connection 0. The cache now contains 1 members


...




$ curl -V
curl 7.54.1 (x86_64-unknown-cygwin) libcurl/7.54.1 OpenSSL/1.0.2k
zlib/1.2.11
libidn2/2.0.2 libpsl/0.17.0 (+libidn2/0.11) libssh2/1.7.0 nghttp2/1.23.1
Release-Date: 2017-06-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 Metalink PSL


I am running that same version in Windows 7 x64 and I haven't noticed a
problem like that. Try gdb curl (you'll need the cygwin gdb and
curl-debuginfo packages) then 'run args', then wait until it hangs and
CTRL+C, then 'thread apply all where'. Also try strace curl args. Another
thing you can do is let it hang 10 minutes to see if it eventually exits on
its own with an error.
Bill Mercer
2017-08-09 14:48:13 UTC
Permalink
My first guess would be that some sort of security suite on your computer is interfering with things.
If you have such a thing, try temporarily disabling it and see if the problem goes away.
-----Original Message-----
Sent: Tuesday, August 08, 2017 19:57 PM
Subject: Cygwin's curl is only working in Safe Mode on Windows 7
I've been pulling my hair out over this. Hoping someone has some ideas.
Something must have changed on my machine because this used to work
OK. I have Cygwin 64-bit installed on Windows 7. The curl command in the
Cygwin shell has been working fine for me in the past, but lately it might
work for a short time after a fresh reboot, but then it'll stop working until I
completely reboot again. Here's' what the output looks like with the verbose
$ curl -v -L www.google.com
* STATE: INIT => CONNECT handle 0x600057970; line 1410 (connection #-
5000)
* Rebuilt URL to: www.google.com/
* Added connection 0. The cache now contains 1 members
$ curl -v -L www.google.com
* STATE: INIT => CONNECT handle 0x600057970; line 1410 (connection #-
5000)
* Rebuilt URL to: www.google.com/
* Added connection 0. The cache now contains 1 members
* STATE: CONNECT => WAITRESOLVE handle 0x600057970; line 1446
(connection #0)
* Trying 172.217.0.132...
* TCP_NODELAY set
* STATE: WAITRESOLVE => WAITCONNECT handle 0x600057970; line 1527 (connection
#0)
* Connected to www.google.com (172.217.0.132) port 80 (#0)
* STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x600057970; line
1579 (connection #0)
* Marked for [keep alive]: HTTP default
* STATE: SENDPROTOCONNECT => DO handle 0x600057970; line 1597
(connection #0)
GET / HTTP/1.1
Host: www.google.com
User-Agent: curl/7.54.1
Accept: */*
* STATE: DO => DO_DONE handle 0x600057970; line 1676 (connection #0)
* STATE: DO_DONE => WAITPERFORM handle 0x600057970; line 1801
(connection #0)
* STATE: WAITPERFORM => PERFORM handle 0x600057970; line 1811
(connection #0)
* HTTP 1.1 or later with persistent connection, pipelining supported <
HTTP/1.1 200 OK < Date: Tue, 08 Aug 2017 22:47:30 GMT < Expires: -1 <
Cache-Control: private, max-age=0 < Content-Type: text/html; charset=ISO-
8859-1 < P3P: CP="This is not a P3P policy! See
https://www.google.com/support/accounts/answer/151657?hl=en for more info."
* Server gws is not blacklisted
< Server: gws
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: SAMEORIGIN
NID=109=qUfNKGtmpC18E2B31Mpbx2GFa5vPk481r3jaDu7Onuoj1f3gvigD_s
QEGdag8SqNp-
eVFhjmMT3O4TNXgYJLAZGIknpKqcWfmD_fAGo5C2gBRe5ieqgECh252Vze9Y
mi;
expires=Wed, 07-Feb-2018 22:47:30 GMT; path=/; domain=.google.com;
HttpOnly < Accept-Ranges: none < Vary: Accept-Encoding < Transfer-
Encoding: chunked < <!doctype html><html itemscope=""
itemtype="http://schema.org/WebPage"
lang="en"><head><meta content="Search the world's information, including
webpages, images, videos and more. Google has many special features to
help you find exactly what you're looking for." name="description"><meta
content="noodp" name="robots"><meta content="text/html; charset=UTF-
8"
http-equiv="Content-Type"><meta
content="/images/branding/googleg/1x/googleg_standard_color_128dp.pn
g"
itemprop="image"><title>Google</title><script>(function(){window.google
={kEI:'gj-
KWce3Gc78mQHDgpB4',kEXPI:'1353383,1354276,1354296,1354514,1354625,13
54750,1354838,3700062,3700254,3700347,3700433,3700442,4029815,4031109,4
043492,4045841,4048347,4063220,4072776,4076999,4078430,4081039,4081164,
4094544,4095910,4096834,4097153,4097470,4097922,4097929,4097951,409872
1,4098728,4098752,4102239,4102827,4103469,4103475,4103861,4104258,41046
58,4105085,4105115,4105128,4105786,4106084,4107555,4108511,4109041,4109
316,4109489,4109528,4110259,4110656,4112160,4113148,4113217,4113495,411
4597,4114975,4115112,4115287,4115697,4116724,4116731,4116875,4116926,41
16927,4116935,4117980,4118102,4118226,4118457,4118626,4118798,4119032,4
119034,4119036,4119272,4119621,4119626,4119655,4120004,4120332,4120767,
4120880,4120916,4120974,4120988,4121035,4121175,4121513,4121787,412202
7,4122035,4122177,4122185,4122379,4122723,4123381,4123647,4123829,41238
37,4124286,4124338,4124417,4125399,4125468,4125478,4125878,41!
25880,4125882,4126055,4126137,10200083,10200095,10201957,19002949,1900
2955,19002971,19002985',authuser:0,kscs:'c9c918f0_24'};google.kHL='en';})();
(function(){google.lc=[];google.li=0;google.getEI=function(a){for(var
b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return
b||google.kEI};google.getLEI=function(a){for(var
b=null;a&&(!a.getAttribute||!(b=a.getAttribute("leid")));)a=a.parentNode;r
eturn
b};google.https=function(){return"https:"==window.location.protocol};googl
e.ml=function(){return
null};google.wl=function(a,b){try{google.ml(Error(a),!1,b)}catch(c){}};google.
time=function(){return(new
Date).getTime()};google.log=function(a,b,c,d,g){if(a=google.logUrl(a,b,c,d,g)
){b=new
Image;var
e=google.lc,f=google.li;e[f]=b;b.onerror=b.onload=b.onabort=function(){del
ete
e[f]};google.vel&&google.vel.lu&&google.vel.lu(a);b.src=a;google.li=f+1}};go
ogle.logUrl=function(a,b,c,d,g){var
e="",f=google.ls||"";c||-1!=b.search("&ei=")||(e="&ei="+google.getEI(d),-
1==b.search("&lei=")&&(d=google.getLEI(d))&&(e+="&lei="+d));d="";!c&&g
oogle.cached&&-
1==b.search("&cached=")&&(d="&cached="+google.cached);a=c||"/"+(g||"
gen_204")+"?atyp=i&ct="+a+"&cad="+b+e+f+"&zx="+google.time()+d;/^htt
p:/i.test(a)&&google.https()&&(google.ml(Error("a"),!1,{src:a,glmm:1}),a="")
;return
a};google.y={};google.x=function(a,b){if(a)var c=a.id;else{do
c=Math.random();while(google.y[c])}google.y[c]=[a,b];return!1};google.lq=[
];google.load=function(a,b,c){google.lq.push([[a],b,c])};google.loadAll=functi
on(a,b){google.lq.push([a,b])};}).call(this);google.f={};var
a=window.location,b=a.href.indexOf("#");if(0<=b){var
c=a.href.substring(b+1);/(^|&)q=/.test(c)&&-
1==c.indexOf("#")&&a.replace("/search?"+c.replace(/(^|&)fp=[^&]*/g,"")+
"&cad=h")};</script><style>#gbar,#guser{font-size:13px;padding-top:1px
!important;}#gbar{height:22px}#guser{padding-bottom:7px
!important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-
all{.gb1{height:22px;margin-right:.5em;vertical-
align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline
!important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27
!important}.gbf .gb4{color:#900 !important}
</style><style>body,td,a,p,.h{font-family:arial,sans-
serif}body{margin:0;overflow-y:scroll}#gog{padding:3px
8px 0}td{line-height:.8em}.gac_m
td{line-height:17px}form{margin-
bottom:20px}.h{color:#36c}.q{color:#00c}.ts
td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-
style:normal}.lst{height:25px;width:496px}.gsfi,.lst{font:18px
arial,sans-serif}.gsfs{font:17px
arial,sans-serif}.ds{display:inline-box;display:inline-block;margin:3px 0
4px;margin-left:4px}input{font-
family:inherit}a.gb1,a.gb2,a.gb3,a.gb4{color:#11c
!important}body{background:#fff;color:black}a{color:#11c;text-
decoration:none}a:hover,a:active{text-decoration:underline}.fl
a{color:#36c}a:visited{color:#551a8b}a.gb1,a.gb4{text-
decoration:underline}a.gb3:hover{text-decoration:none}#ghead
a.gb2:hover{color:#fff !important}.sblc{padding-top:5px}.sblc
a{display:block;margin:2px
0;margin-left:13px;font-size:11px}.lsbb{background:#eee;border:solid
1px;border-color:#ccc #999 #999 #ccc;height:30px}.lsbb{display:block}.ftl,#fll
a{display:inline-block;margin:0
12px}.lsb{background:url(/images/nav_logo229.png) 0 -261px repeat-
x;border:none;color:#000;cursor:pointer;height:30px;margin:0;outline:0;font
:15px
arial,sans-serif;vertical-
align:top}.lsb:active{background:#ccc}.lst:focus{outline:none}</style><script
(function(){window.google.erd={sp:'hp',jsr:1,bv:218,cs:false};var
f=0,g,h=google.erd,k=h.jsr,l;google.jsmp=!0;google.ml=function(a,b,d,e){go
ogle.dl&&google.dl(a,d,b);if(google._epc(a,b,d,e))return
null;a=google._gld(a,"/gen_204?atyp=i",d||{},!1);e||google.log(0,"",a);retur
n
a};google._epc=function(a,b,d,e){var
c=google.erd.jsr;if(0>c){window.console&&console.error(a,d);if(-
2==c)throw
a;return!0}if(!a||!a.message||"Error loading
script"==a.message||!(n()&&1>f||e))return!0;f++;b&&(g=a&&a.message);r
eturn!1};google._gld=function(a,b,d,e){var
c=encodeURIComponent;b=b+"&ei="+c(google.kEI)+(google.kEXPI?"&jexpi
d="+c(google.kEXPI):"")+"&srcpg="+c(h.sp)+"&jsr="+google.erd.jsr+"&bver
="+c(h.bv);for(var
"+a.message);b=b+"&jsst="+c(a.stack||"N/A");!e&&2E3<=b.length&&(b=b.
substr(0,2E3));return
b};function n(){if(!h.cs)return!0;var a=google.erd.jsr;void
0==l&&(l=0>a||1==a||1==Math.ceil(Math.random()*a));return l}
google.ojsr=function(a){google.erd.jsr=a;l=void
0};google.rjsr=function(){google.erd.jsr=k;l=void
0};window.onerror=function(a,b,d,e,c){g!==a&&google.ml(c instanceof
Error?c:Error(a),!1);g=null;n()&&1>f||(window.onerror=null)};})();</script><
link
href="/images/branding/product/ico/googleg_lodp.ico" rel="shortcut
icon"></head><body bgcolor="#fff"><script>(function(){var
src='/images/nav_logo229.png';var iesg=false;document.body.onload =
function(){window.n && window.n();if (document.images){new
Image().src=src;} if
(!iesg){document.f&&document.f.q.focus();document.gbqf&&document.gb
qf.q.focus();}
}
})();</script><div id="mngb"> <div id=gbar><nobr><b class=gb1>Search</b> <a
class=gb1
href="http://www.google.com/imghp?hl=en&tab=wi">Images</a> <a
class=gb1 href="http://maps.google.com/maps?hl=en&tab=wl">Maps</a> <a
class=gb1 href="https://play.google.com/?hl=en&tab=w8">Play</a> <a
class=gb1 href="http://www.youtube.com/?tab=w1">YouTube</a> <a
class=gb1
href="http://news.google.com/nwshp?hl=en&tab=wn">News</a> <a
class=gb1 href="https://mail.google.com/mail/?tab=wm">Gmail</a> <a
class=gb1 href="https://drive.google.com/?tab=wo">Drive</a> <a class=gb1
style="text-decoration:none"
href="https://www.google.com/intl/en/options/"><u>More</u>
&raquo;</a></nobr></div><div id=guser width=100%><nobr><span id=gbn
class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a
href="http://www.google.com/history/optout?hl=en" class=gb4>Web
History</a> | <a href="/preferences?hl=en" class=gb4>Settings</a> | <a
target=_top id=gb_70
href="https://accounts.google.com/ServiceLogin?hl=en&passive=true&conti
nue=http://www.google.com/"
class=gb4>Sign in</a></nobr></div><div class=gbh style=left:0></div><div
class=gbh style=right:0></div> </div><center><br clear="all" id="lgpd"><div
id="lga"><img alt="Google" height="92"
src="/images/branding/googlelogo/1x/googlelogo_white_background_color
_272x92dp.png"
style="padding:28px 0 14px" width="272" id="hplogo"
onload="window.lol&&lol()"><br><br></div><form action="/search"
name="f"><table cellpadding="0" cellspacing="0"><tr valign="top"><td
width="25%">&nbsp;</td><td align="center" nowrap=""><input name="ie"
value="ISO-8859-1" type="hidden"><input value="en" name="hl"
type="hidden"><input name="source" type="hidden" value="hp"><input name="biw"
type="hidden"><input name="bih" type="hidden"><div class="ds"
style="height:32px;margin:4px 0"><input
style="color:#000;margin:0;padding:5px
8px 0 6px;vertical-align:top" autocomplete="off" class="lst" value=""
title="Google Search" maxlength="2048" name="q" size="57"></div><br
style="line-height:0"><span class="ds"><span class="lsbb"><input class="lsb"
value="Google Search" name="btnG" type="submit"></span></span><span
class="ds"><span class="lsbb"><input class="lsb" value="I'm Feeling Lucky"
name="btnI" onclick="if(this.form.q.value)this.checked=1; else
top.location='/doodles/'" type="submit"></span></span></td><td class="fl sblc"
align="left" nowrap="" width="25%"><a
href="/advanced_search?hl=en&amp;authuser=0">Advanced search</a><a
href="/language_tools?hl=en&amp;authuser=0">Language
tools</a></td></tr></table><input id="gbv" name="gbv" type="hidden"
value="1"></form><div id="gac_scont"></div><div style="font-
size:83%;min-height:3.5em"><br></div><span id="footer"><div style="font-
size:10pt"><div style="margin:19px auto;text-align:center"
id="fll"><a href="/intl/en/ads/">Advertising|Programs</a><a
href="/services/">Business Solutions</a><a
href="https://plus.google.com/116899029375914044550"
rel="publisher">+Google</a><a href="/intl/en/about.html">About
Google</a></div></div><p style="color:#767676;font-size:8pt">&copy; 2017
- <a href="/intl/en/policies/privacy/">Privacy</a> - <a
href="/intl/en/policies/terms/">Terms</a></p></span></center><script>(f
unction(){window.google.cdo={height:0,width:0};(function(){var
a=window.innerWidth,b=window.innerHeight;if(!a||!b){var
c=window.document,d="CSS1Compat"==c.compatMode?c.documentEleme
nt:c.body;a=d.clientWidth;b=d.clientHeight}a&&b&&(a!=google.cdo.width||
b!=google.cdo.height)&&google.log("","","/client_204?&atyp=i&biw="+a+"&
bih="+b+"&ei="+google.kEI);}).call(this);})();</script><div
id="xjsd"></div><div id="xjsi"><script>(function(){function
c(b){window.setTimeout(function(){var
a=document.createElement("script");a.src=b;document.getElementById("xj
sd").appendChild(a)},0)}google.dljp=function(b,a){google.xjsu=b;c(a)};googl
e.dlj=c;}).call(this);(function(){window.google.xjsrm=[];})();if(google.y)googl
e.y.first=[];if(!google.xjs){window._=window._||{};window._DumpExceptio
n=window._._DumpException=function(e){throw
e};if(google.timers&&google.timers.load.t){google.timers.load.t.xjsls=new
Date().getTime();}google.dljp('/xjs/_/js/k\x3dxjs.hp.en_US.dE1M89AKXDg.
O/m\x3dsb_he,d/am\x3dABg/rt\x3dj/d\x3d1/t\x3dzcms/rs\x3dACT90oEXJfi
3k3RNfhhgqPQcMtK0gvFvRw','/xjs/_/js/k\x3dxjs.hp.en_US.dE1M89AKXDg.
O/m\x3dsb_he,d/am\x3dABg/rt\x3dj/d\x3d1/t\x3dzcms/rs\x3dACT90oEXJfi
false,"cgen":false,"client":"heirloom-
hp","dh":true,"dhqt":true,"ds":"","fl":true,"host":"google.com","isbh":28,"ja
m":0,"jsonp":true,"msgs":{"cibl":"Clear
Search","dym":"Did you mean:","lcky":"I\u0026#39;m Feeling
Lucky","lml":"Learn more","oskt":"Input tools","psrc":"This search was
removed from your \u003Ca href=\"/history\"\u003EWeb
History\u003C/a\u003E","psrl":"Remove","sbit":"Search by
image","srch":"Google
Search"},"nds":true,"ovr":{},"pq":"","refpd":true,"rfs":[],"sbpl":24,"sbpr":24,
"scd":10,"sce":5,"stok":"T7OZsCWzu9bdVBxVmBky1KjYmGY"},"d":{},"aWiv7g
":{},"YFCs/g":{}};google.y.first.push(function(){if(google.med){google.med('i
nit');google.initHistory();google.med('history');}});if(google.j&&google.j.en&
&google.j.xi){window.setTimeout(google.j.xi,0);}
* STATE: PERFORM => DONE handle 0x600057970; line 1980 (connection #0)
* multi_done
* Connection #0 to host www.google.com left intact
* Expire cleared
</script></div></body></html>
I think the problem may be DNS related. After my machine gets into a bad
state, I seem to get at least a little further using an IP address, though the
output is still not what it is when using a DNS name when the DNS name is
$ curl -v -L 216.58.192.174
* STATE: INIT => CONNECT handle 0x600057970; line 1410 (connection #-
5000)
* Rebuilt URL to: 216.58.192.174/
* Added connection 0. The cache now contains 1 members
* Trying 216.58.192.174...
* TCP_NODELAY set
* STATE: CONNECT => WAITCONNECT handle 0x600057970; line 1462
(connection #0)
* Connected to 216.58.192.174 (216.58.192.174) port 80 (#0)
* STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x600057970; line
1579 (connection #0)
* Marked for [keep alive]: HTTP default
* STATE: SENDPROTOCONNECT => DO handle 0x600057970; line 1597
(connection #0)
GET / HTTP/1.1
Host: 216.58.192.174
User-Agent: curl/7.54.1
Accept: */*
* STATE: DO => DO_DONE handle 0x600057970; line 1676 (connection #0)
* STATE: DO_DONE => WAITPERFORM handle 0x600057970; line 1801
(connection #0)
* STATE: WAITPERFORM => PERFORM handle 0x600057970; line 1811
(connection #0)
* HTTP 1.1 or later with persistent connection, pipelining supported <
HTTP/1.1 301 Moved Permanently < Location: http://www.google.com/ <
Content-Type: text/html; charset=UTF-8 < Date: Tue, 08 Aug 2017 23:44:51
GMT < Expires: Thu, 07 Sep 2017 23:44:51 GMT < Cache-Control: public, max-
age=2592000
* Server gws is not blacklisted
< Server: gws
< Content-Length: 219
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: SAMEORIGIN
<
* Ignoring the response-body
* multi_done
* Connection #0 to host 216.58.192.174 left intact
* Issue another request to this URL: 'http://www.google.com/'
* STATE: PERFORM => CONNECT handle 0x600057970; line 1961 (connection #-5000)
* Added connection 1. The cache now contains 2 members
All of that being said, if I reboot my machine in Safe Mode, then the curl
command seems to work consistently. This make me think the problem is
due to some interference from some other application that runs when I'm
not in Safe Mode. I know that Cygwin has a list of BLODA (Big List Of Dodgy
Apps) that are known to cause issues, so maybe that's what's going on with
https://cygwin.com/faq/faq.html#faq.using.bloda). If anything I've
uninstalled a lot of apps recently and haven't really installed new apps, so I'm
not sure what that could be. I guess I may try selectively disabling things at
startup using msconfig to see where that leads unless someone has some
other ideas. I have the CYGWIN environment variable set to detect_bloda
but so far no debug info has turned up.
Hoping someone has some other ideas of things to try, but I guess selective
startup is at least something I can try to do that I haven't tried already.
I should also say that I have the curl standalone app for Windows installed
and that works fine. it's just the one running under Cygwin. Grrrr.
Below is some version info in case that's helpful.
$ curl -V
curl 7.54.1 (x86_64-unknown-cygwin) libcurl/7.54.1 OpenSSL/1.0.2k zlib/1.2.11
libidn2/2.0.2 libpsl/0.17.0 (+libidn2/0.11) libssh2/1.7.0 nghttp2/1.23.1
Release-Date: 2017-06-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 Metalink
PSL
$ uname -r
2.8.2(0.313/5/3)
$ uname -m
x86_64
$ python -V
Python 2.7.13
Thanks in advance.
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https:
t***@thomsonreuters.com
2017-08-09 15:19:41 UTC
Permalink
-----Original Message-----
From: curl-users [mailto:curl-users-***@cool.haxx.se] On Behalf Of Bill
Mercer
Sent: Wednesday, August 09, 2017 9:48 AM
To: curl-***@cool.haxx.se
Subject: RE: Cygwin's curl is only working in Safe Mode on Windows 7

My first guess would be that some sort of security suite on your computer is
interfering with things.
If you have such a thing, try temporarily disabling it and see if the problem
goes away.

...

Thanks for the reply, Bill. I'm thinking along those lines as well, though I
haven't had issues while running the AV software we have here in the past.
Might be something new. I'll try to narrow this down by disabling things in
any case.

(I just realized that I "top-posted" in my previous reply to Ray Satiro.
Sorry about that -- I'll try to avoid that practice going forward.)
t***@thomsonreuters.com
2017-08-09 22:41:36 UTC
Permalink
I seem to have narrowed the problem down to OfficeScan Common Client Solution Framework (TmCCSF.exe). With that service disabled, curl consistently runs fine. As soon as I start that service, I immediately see the problem. I have to disable it and then reboot once this service has been started. (Presumably the service has some sort of protection that doesn’t allow it to be stopped once it has been started.) I have three other Trend services running that don’t seem to cause problems – OfficeScan NT RealTime Scan, Trend Micro Unauthorized Change Prevention Service, and OfficeScan NT Listener. The weird thing is that I’m pretty sure that I’ve had OfficeScan Common Client Solution Framework running before with no problems, even with the versions of Cygwin and curl that I currently have installed. I also have a coworker with slightly older versions of Cygwin and curl installed and with the OfficeScan Common Client Solution Framework service running who isn’t having any problems with curl. What’s unique about my environment is anybody’s guess. Not sure yet what I’ll do about the gap in AV protection on my machine with that service disabled, but I’m at least glad to have narrowed this probably down. I guess I’m considering this case closed unless anyone has any additional parting thoughts. Thanks again to Ray and Bill for the help in tracking this problem down.
Ray Satiro via curl-users
2017-08-10 06:04:56 UTC
Permalink
Post by t***@thomsonreuters.com
I seem to have narrowed the problem down to OfficeScan Common Client
Solution Framework (TmCCSF.exe). With that service disabled, curl
consistently runs fine. As soon as I start that service, I
immediately see the problem. I have to disable it and then reboot
once this service has been started. (Presumably the service has some
sort of protection that doesn’t allow it to be stopped once it has
been started.) I have three other Trend services running that don’t
seem to cause problems – OfficeScan NT RealTime Scan, Trend Micro
Unauthorized Change Prevention Service, and OfficeScan NT Listener.
The weird thing is that I’m pretty sure that I’ve had OfficeScan
Common Client Solution Framework running before with no problems, even
with the versions of Cygwin and curl that I currently have installed.
I also have a coworker with slightly older versions of Cygwin and curl
installed and with the OfficeScan Common Client Solution Framework
service running who isn’t having any problems with curl. What’s
unique about my environment is anybody’s guess. Not sure yet what
I’ll do about the gap in AV protection on my machine with that service
disabled, but I’m at least glad to have narrowed this probably down.
I guess I’m considering this case closed unless anyone has any
additional parting thoughts. Thanks again to Ray and Bill for the
help in tracking this problem down.
I suggest reporting it to Trend Micro. Their AV software shouldn't cause
programs to crash.
t***@thomsonreuters.com
2017-08-10 14:28:12 UTC
Permalink
From: curl-users [mailto:curl-users-***@cool.haxx.se] On Behalf Of Ray
Satiro via curl-users
Sent: Thursday, August 10, 2017 1:05 AM
To: curl-***@cool.haxx.se
Cc: Ray Satiro
Subject: Re: Cygwin's curl is only working in Safe Mode on Windows 7
Post by Ray Satiro via curl-users
I suggest reporting it to Trend Micro. Their AV software shouldn't cause
programs to crash.
Agreed. I was just in the process of doing that. Thanks again.

Loading...