[KLUG Programming] Socket read problem

Alan Mink amink at nist.gov
Mon Nov 1 17:48:28 EST 2004


I'm getting a strange error msg from the socket RECV fct, its:

    "Resource temporarily unavailable"

I have Googled this msg and the various entries imply that its an "OS" prob,
but there are different views as to the cause. I remove all "malloc" ops,
which was said to be a cause. I've been running under Linux 2.4.18,
but have tried it also under a Linux 2.6 version, hoping that whatever the
cause it may have been corrected in the newer Linux versions. We are using
std ethernet boards, and have tried it with GigE board as well as more
common 10/100 board.

This application runs as root and spawns a variable number of threads and
uses one socket per thread, in addition to a few other sockets. Sometime it
can run forever (a week or 2 and then I stop it) and sometime this error 
can
occur within the 1st few seconds and then other times days later it will 
fail.

If you have any insight as to the cause (or even the source of the msg) and
any potential solutions, I would appreciate hearing from you.

Thanks,
Alan



More information about the Programming mailing list