cURL / Mailing Lists / curl-library / Single Mail

curl-library

poll & Mac OS X 10.4

From: Grigory Entin <Grigory.Entin_at_arcadia.spb.ru>
Date: Fri, 13 May 2005 20:57:02 +0400

Hello all,

Sorry, I do know almost nothing about "poll", but I *guess* there's a
problem related to poll call (?) in curl (particularly in select.c)
and Mac OS X 10.4.

As far as I understand, older versions of Mac OS X (e.g. 10.3) do have
"bad" poll behavior, that results in HAVE_FINE_POLL undefined by
configure. However, under 10.4 the configure test is passed and
HAVE_FINE_POLL is defined.

Now, the problem: when it's built under 10.4, for some URLs,
e.g. http://www.rambler.ru/ (that's just one of many), curl loops
"forever" (i.e. it doesn't hang - it updates progress indicators and
etc. but simply doesn't "stop at the end of data") (and spends most
time in poll call mentioned). (Curl loops for at least 5 or so minutes
- I have to terminate it at the end.)

According to "curl -v <url>", it gets all the page content (up to the
end), but then waits for "something". When built under 10.3 or even
under 10.4 with HAVE_FINE_POLL (manually) undefined, it downloads the
page content and "closes" the connection normally.

Does anyone experience that? May I help somehow? I can run it in gdb
and see all the values and etc.. Actually I tried that, but at first
glance I haven't found anything else that it loops in Transfer and
doesn't exit from there..

Below is a backtrace for curl-7.13.1:

>>>
(gdb) bt
#0 0x900c2f20 in poll ()
#1 0x00225b44 in Curl_select (readfd=1, writefd=0, timeout_ms=1000)
at select.c:90
#2 0x0021ef58 in Transfer (conn=0x1802c00) at transfer.c:1570
#3 0x0021f9e4 in Curl_perform (data=0x3e000) at transfer.c:2157
>>>

Just in case, I can reproduce the above with curl 7.13.1/7.13.2 and
Mac OS X 10.3.5 / 10.4.

The strange thing is that Mac OS X "built-in" curl (7.13.1) works
fine. According to curl-config it's indistinguishable from the version
that I build manually, but apparently it is..

Regards,
Grigory
Received on 2005-05-13