[Haskell-cafe] sendfile leaking descriptors on Linux?

Bardur Arantsson spam at scientician.net
Thu Feb 4 14:43:30 EST 2010


Hi all,

I've been using the sendfile package off Hackage, but it seems to be 
leaking file descriptors when using the Linux-native build.

What's happening in my specific case is the following:

    1) client requests a range of a file
    2) server starts sending the range
    3) client disconnects before receiving the whole file

This happens over and over with the client requesting different ranges 
of the file (so the client does make progress).

If I use the portable build of the sendfile package, everything works 
fine for hours and hours of this happening.

If I use the Linux-native build of the sendfile package, the server
will eventually run out of file descriptors. According to "lsof" the 
files that are being kept open are the data files being sent in 2) above.

This is on GHC 6.10.x (Ubuntu).

Is anyone else seeing this? Anyone got any idea what's going on?

Cheers,



More information about the Haskell-Cafe mailing list