cURL / Mailing Lists / curl-users / Single Mail

curl-users

[ curl-Bugs-491311 ] Linux: HTTP/1.1 downloads hang at 100%

From: <noreply_at_sourceforge.net>
Date: Mon, 10 Dec 2001 13:10:37 -0800

Bugs item #491311, was opened at 2001-12-10 13:10
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=491311&group_id=976

Category: http
Group: bad behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Matthias Andree (m-a)
Assigned to: Daniel Stenberg (bagder)
Summary: Linux: HTTP/1.1 downloads hang at 100%

Initial Comment:
I am trying
curl -O
http://www.akhphd.au.dk/~bertho/cvsgraph/release/cvsgraph-
1.1.3.tar.gz
and the download never finishes, it's stuck at
100%. wget 1.7 and 1.8 are fine (same machine, same file, same
proxy).

When I use tcpdump, the server never sends a FIN packet
(probably OK with HTTP/1.1).

This happens on Linux 2.4.14
(didn't check other cURL versions than 7.8.1 and 7.9.1). When I
run strace against curl, I see a lot of recv calls which return all
multiples of 1400, and one with a returned length of 398 which
gives a hint that the server is done sending (in fact, I see PSH TCP
packets around that), but I'm not sure what cURL waits for, EOF
maybe? It loops on select (times out) and updating the CPS
reading.

I'm using a SuSE-packaged Squid-2.3STABLE4 here
(includes some bug fixes), but the behaviour also shows up when I
unset HTTP_PROXY and pull directly from the server, so I suspect
it's an incompatibility between cURL and Linux.

I will provide
strace logs when so desired.

When I add the -0 ("dash-zero")
option (force HTTP/1.0), the problems go away on 7.9.1 (did not
check this workaround on 7.8.1).

I can reproduce all this on a
couple of machines, with cURL 7.9.1 and cURL
7.8.1.

Affected:
curl 7.9.1 (i686-suse-linux) libcurl 7.9.1
(OpenSSL 0.9.6b) (ipv6 enabled)
curl 7.8.1 (i686-pc-linux-gnu)
libcurl 7.8.1 (SSL 0.9.5) (ipv6 enabled)

The problem does
_NOT_ show on FreeBSD 4.4:
curl 7.9.1 (i386--freebsd4.4) libcurl
7.9.1 (OpenSSL 0.9.6a) (ipv6 enabled)

So I fear some Linux-
specific select(2) peculiarities may meddle.

I will help to
track and fix this, and I will also try experimental patches or CVS
version. I can use strace/ktrace/gdb, and know C and C++, so just
go ahead asking questions, pointing me to code sections that
attaching gdb to is worthwhile, whatever.

Thanks a lot in
advance.

----------------------------------------------------------------------

You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=100976&aid=491311&group_id=976
Received on 2001-12-10