Re: WSAENOBUFS on winsock client application



I analyzed winsock sources (XP SP2), and the error WSAENOBUFS is returned
usually when allocation of memory failes (RtlHeapAllocate(...)) or
equivalents:

What is your OS?

--
V.
This posting is provided "AS IS" with no warranties, and confers no
rights.
"FriedhelmEichin" <FriedhelmEichin@xxxxxxxxxxxxxxxx> wrote in message
news:FB4F7278-628C-4AF1-A22A-278509CE667B@xxxxxxxxxxxxxxxx
Hello,

I've developed a C++ stream socket client/server application. The
client-side is implemented using winsock 2 overlapped I/O. For each
connection there is a separate thread (there is a maximum of 40
connection being handled). The normal behaviour is quite fine, no
problems. But in some environment where a connection is being broken
from time to time due to a bad dsl connection or something similar I
get the error WSAENOBUFS when calling WSARecv for the first time after
the following connection has been estabilished. I'm sure that the
previous connections are closed well and all pending requests are
terminated, so that there should be no more resources used by the
application.

What may cause this problem ?

The other parts of the application (client winsock threads) continue
working without problems.

The thread that causes the error is not able to connect to
the server any more (while other established connections are working
fine)
The connection-attempt is being retried every minute but for that
thread the behaviour is always the same after the first occurance of
this error. It just repeats forever.

What kind of (winsock-) leak may be left after shutting down the
socket as documented by MS, waiting for any I/O operation to terminate
and calling closesocket ?

I've done a lot of stress testing, but the problem only occurs at the
customer side, so I cannot reproduce it here.
It seems to me that the network is not very steady there..., even
though the application should not hang.

Any help appreciated !
--
best regards
friedhelm


.



Relevant Pages

  • WSAENOBUFS on winsock client application
    ... I've developed a C++ stream socket client/server application. ... client-side is implemented using winsock 2 overlapped I/O. ... connection there is a separate thread (there is a maximum of 40 ... The other parts of the application (client winsock threads) continue ...
    (microsoft.public.win32.programmer.networks)
  • Re: Win Sock
    ... Something That Is Not a Socket" message. ... Then, instead of running NETSH to reset TCP/IP, he suggested reinstalling ... Open the properties window of the network connection (Local Area ... WinSock Fix ...
    (microsoft.public.windowsxp.newusers)
  • Re: Winsock Catalog
    ... a period of about 15 minutes, intially vey good and then the connection ... info Error attmpting to validate the Winsock base providers: ... Network Adapter Diagnostic ... When you used the various winsock and lsp fixes, did you use them methodically, ...
    (microsoft.public.windowsxp.network_web)
  • Re: Winsock provider catalog (summary of previous post)
    ... "Windows has detected a problem with the Winsock provider catalog on this ... info Using home Internet connection ... info Network connection: Name=Local Area Connection 3, ... PING: ...
    (microsoft.public.windowsxp.general)
  • Re: Winsock provider catalog (summary of previous post)
    ... "Windows has detected a problem with the Winsock provider catalog on this ... info Using home Internet connection ... info Network connection: Name=Local Area Connection 3, ... PING: ...
    (microsoft.public.windowsxp.general)