cURL / Mailing Lists / curl-library / Single Mail

curl-library

bug in pycurl 7.15.4 / curl_multi_fdset ?

From: K.S.Sreeram <sreeram_at_tachyontech.net>
Date: Tue, 27 Jun 2006 20:32:07 +0530

[pycurl-7.15.4/curl-7.15.4/c-ares-1.3.1 winxp]

Note: I've also posted to curl-library & c-ares, because it could be
some internal bug in curl_multi_fdset.

When I run 'tests/test_multi4.py', I get the following error:

pycurl.error: (0, 'curl_multi_fdset() failed due to internal errors')

The culprit seems to be the following code in pycurl.c (line 2211)

    res = curl_multi_fdset(self->multi_handle, &self->read_fd_set,
                           &self->write_fd_set, &self->exc_fd_set,
                           &max_fd);
    if ((res != CURLM_OK) || (max_fd < 0)) {
        CURLERROR_MSG("curl_multi_fdset() failed due to internal
                        errors");
    }

In particular, curl_multi_fdset returning a max_fd of -1, is *not* an
error. It just indicates that the fdset is empty. Just removing the
check (max_fd < 0), fixes the problem.

But, this seems to indicate some deeper problem in libcurl/c-ares
itself. Why are there no sockets being returned by 'curl_multi_fdset'
when an operation is still in progress???

In fact the same code used to work curl 7.15.2 (and c-ares 1.3.0), but
only with the latest version i'm facing this issue.

Regards
Sreeram

Received on 2006-06-27