cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: "ROCK Package for libcurl"

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 8 Mar 2002 15:02:08 +0100 (MET)

On Fri, 8 Mar 2002, Clifford Wolf wrote:

> On Fri, 8 Mar 2002, Daniel Stenberg wrote:
>
> > > < 229 Entering Extended Passive Mode (|||39858|).
> > > curl: (7) Failed to connect to IP number 2

> looks like there also is a problem in glibc. I only have coredumps with
> glibc-2.2.4. After rebuilding curl with glibc-2.2.5 it doesn't dump core
> anymore and I get the above error message.
>
> debugging with gdb showed that connect() returns error 115 (EINPROGRESS,
> Operation now in progress).

It *returns* that? connect() should return -1 and set errno to EINPROGRESS.
Was that what you meant?

Are your libcurl compiled as "ipv6 enabled"?

> So it is a curl bug - but might not be reproduceable on your side because
> you are running another kernel and/or another glibc.

I tried your URL on two different Linux machines using various curl configs,
and none of them had any problems:

curl 7.9.5 (i686-pc-linux-gnu) libcurl 7.9.5 (OpenSSL 0.9.6b) (ipv6 enabled)
curl 7.9.5 (i686-pc-linux-gnu) libcurl 7.9.5 (OpenSSL 0.9.6b)
on kernel 2.4.14 and glibc 2.2.4

curl 7.9.5 (i686-pc-linux-gnu) libcurl 7.9.5 (OpenSSL 0.9.5) (ipv6 enabled)
curl 7.9.5 (i686-pc-linux-gnu) libcurl 7.9.5
on kernel 2.4.16 and glibc 2.1.2

curl is supposed to deal with EINPROGRESS by calling waitconnect() and
select() there until it connects for real.

> The easiest solution would be to set the socket from non-blocking to
> blocking (see the connect() manpage).

It is not the easiest solution. We did the reversed conversion after 7.9.2
and lots of code in libcurl has been adjusted to work well with non-blocking
sockets. Just converting it back will disable several features and generally
make the library less good.

If there are any bugs in the connect code, we should fix them correctly
instead.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-03-08