ReceiveAny Thread Generates "RPC_S_OUT_OF_MEMORY" Error

Article translations Article translations
Article ID: 297534 - View products that this article applies to.
This article was previously published under Q297534
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all


When a program uses RPC for socket communication, it may stop working for no apparent reason. If you quit and start the program again, it works correctly, but may stop working again. If you check the output of the netstat -n command, Netstat reports many open connections in a CLOSE_WAIT state with the port that the program is using. This is a sample of the output from the netstat -n command:
Active Connections

  Proto  Local Address          Foreign Address        State
  TCP          CLOSE_WAIT
  TCP          CLOSE_WAIT
  TCP          CLOSE_WAIT


This problem occurs because RPC uses a socket that is called a SyncSocket to optimize data communication. If the Syncsocket is closed incorrectly by the program that loaded the RPC transport, RPC enters an error loop that it cannot return from. RPC always assumes that the SyncSocket will always be a valid socket, and does not have any recovery mechanism to handle situations in which another function closes the SyncSocket.


A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix should have the following file attributes or later:
   Date        Time    Size     File name     Platform
   05/17/2001  04:54p  37,648   Rpcltscm.dll  Intel
   05/17/2001  04:50p  60,176   Rpcltscm.dll  Alpha
NOTE: Because of file dependencies, this hotfix requires Microsoft Windows NT 4.0 Service Pack 6a.


To work around this problem, restart the program that is using RPC.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.


Article ID: 297534 - Last Review: February 27, 2014 - Revision: 1.4
  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows NT 4.0 Service Pack 1
  • Microsoft Windows NT 4.0 Service Pack 2
  • Microsoft Windows NT 4.0 Service Pack 3
  • Microsoft Windows NT 4.0 Service Pack 4
  • Microsoft Windows NT 4.0 Service Pack 5
  • Microsoft Windows NT 4.0 Service Pack 6
  • Microsoft Windows NT 4.0 Service Pack 6a
kbnosurvey kbarchive kbhotfixserver kbqfe kbbug kbfix kbqfe KB297534

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from