cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

select() returned with errno = 9 (EBADF), msg = Bad file descriptor

From: Stefan Krause <stefan.krause_at_gmx.net>
Date: Wed, 11 Nov 2009 20:51:32 +0100

Hello friends of libCurl,

for the first time, I observed the following trace with an select() error:

    15045:259 About to connect() to proxy XXX.XXX.XXX.XXX port YYYY (#0)
    15045:260 Trying XXX.XXX.XXX.XXX...
    15045:277 curlSelect(): errno = 9, msg = Bad file descriptor
   
            curlSelect(): errno = 9, msg = Bad file descriptor [repeated
300 times]
   
    15046:125 curlSelect(): errno = 9, msg = Bad file descriptor
    15046:136 Connected to XXX.XXX.XXX.XXX (XXX.XXX.XXX.XXX) port
YYYY (#0)
    15046:136 Proxy auth using Basic with user 'XXX'
    15046:144 GET http://XYZ HTTP/1.1
    15046:144 Proxy-Authorization: Basic XYZ
    15046:144 Host: X.Y.Z
    15046:144 Accept: */*
    15046:144 Proxy-Connection: Keep-Alive
    15046:144 Accept-Encodig: gzip
    15046:145 Content-Range: bytes 0-10239/*
    15049:015 HTTP/1.1 206 Partial Content
    15049:016 Date: Tue, 10 Nov 2009 18:58:35 GMT
    15049:016 Server: XYZ
    15049:017 Accept-Ranges: bytes
    15049:017 Content-MD5: t1NQPaP/cLh3J/zL48iteA==
    15049:017 Content-Range: bytes 0-4433/4434
    15049:021 Content-length: 4434
    15049:021 Proxy-Connection: Keep-Alive
    15049:031 Connection: Keep-Alive
    15049:032 Content-Encoding: gzip

OS was QNX 6.3.2. libCurl version=7.19.3.
The select error occured during an endurance test.
The timestamps left are of format seconds:milliseconds.

select() returned -1 and the errno was 9 / EBADF / "Bad file descriptor"

    15045:277 curlSelect(): errno = 9, msg = Bad file descriptor
   
            curlSelect(): errno = 9, msg = Bad file descriptor [repeated
300 times]
   
    15046:125 curlSelect(): errno = 9, msg = Bad file descriptor

For ~0,85 seconds the select() call returned that error. select() was
called ~300 times during that time.
After that, the HTTP 206 response has been received. So, at first sight,
the transfer has not been disturbed
by the select() error. I have not checked whether the data has not been
corrupted in some way.

What might be the reason for that error ?
Maybe it is a problem of the OS and has nothing to do with libCurl ?
Does anybody has also observed that kind of problem ?
How severe is that problem in general? Can it destabilize the whole
system (->crash) ?

Kind regards,

   Stefan

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-11

These mail archives are generated by hypermail.

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET