reaping fd's and flushing buffers

John Meacham john@repetae.net
Fri, 3 Jan 2003 03:06:48 -0800


perhaps this is related to these errors i get after my program runs for
a while (about 2 days):

I am guessing the no such protocol entry is because it cant open the
/etc/protocols file due to a lack of fds. it is almost as if file
descriptors are not being closed and leaking over time...

ConnectionError ugcs.caltech.edu gale.ugcs.caltech.edu
ugcs.caltech.edu.gale.org. (retrying in 5.0s):
    does not exist
    Action: getProtocolByName
    Reason: no such protocol entry
ConnectionError ugcs.caltech.edu gale.ugcs.caltech.edu
ugcs.caltech.edu.gale.org. (retrying in 5.0s):
    does not exist
    Action: getProtocolByName
    Reason: no such protocol entry
ConnectionError ugcs.caltech.edu gale.ugcs.caltech.edu
ugcs.caltech.edu.gale.org. (retrying in 5.0s):
    does not exist
    Action: getProtocolByName
    Reason: no such protocol entry
ConnectionError ugcs.caltech.edu gale.ugcs.caltech.edu
ugcs.caltech.edu.gale.org. (retrying in 5.0s):
    does not exist
    Action: getProtocolByName
    Reason: no such protocol entry
ConnectionError ugcs.caltech.edu gale.ugcs.caltech.edu
ugcs.caltech.edu.gale.org. (retrying in 5.0s):
    does not exist
    Action: getProtocolByName
    Reason: no such protocol entry
ConnectionError ugcs.caltech.edu gale.ugcs.caltech.edu
ugcs.caltech.edu.gale.org. (retrying in 5.0s):
    does not exist
    Action: getProtocolByName
    Reason: no such protocol entry
attempt ExceptionCaught
    resource exhausted
    Action: openFile
    Reason: Too many open files
    File:
/home/john/.gale/ginsu.pufflog.momenergy.repetae.net.4925.1041460077.1299


On Thu, Jan 02, 2003 at 11:15:28PM -0800, William Lee Irwin III wrote:
> Sure enough, after I say that all my fd reaping issues are solved at
> the Haskell level, I've been bitten by issues that look like the RTS
> doing things behind my back wrt. reaping fd's etc. etc.
> 
> Basically, while I used socketToHandle the fd's got closed prematurely,
> and once I eliminated all uses of it, the socket fd's appeared to leak
> despite attempts to explicitly close them.
> 
> Also, there were some very strange goings-on with respect to attempts
> to flush buffers after the fd's they were being flushed to were closed.
> 
> So, what are the semantics here?
> 
> 
> Bill
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
> 

-- 
---------------------------------------------------------------------------
John Meacham - California Institute of Technology, Alum. - john@foo.net
---------------------------------------------------------------------------