Microsoft KB Archive/811576

= Program May Stop Working If It Uses RPC with a UNIX Server =

Article ID: 811576

Article Last Modified on 8/29/2007

-

APPLIES TO


 * Microsoft Windows XP Professional
 * Microsoft Windows XP Home Edition

-



SYMPTOMS
A client program that uses Remote Procedure Call (RPC) and is running on Microsoft Windows XP may randomly experience access violations when the program is communicating with an RPC server that is running on a UNIX server.



CAUSE
This problem is caused by an incorrect buffer in the RPC run-time DLL (Rpcrt4.dll). The buffer overrun occurs only if a client makes an outgoing RPC call to a UNIX server after the client has been idle for between 40 and 60 seconds, and if the RPC call expects a large response. The overrun buffer corrupts the memory block that follows the buffer that is used by RPC, and may cause random access violations in the client program.



Service pack information
To resolve this problem, obtain the latest service pack for Microsoft Windows XP. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

322389 How to obtain the latest Windows XP service pack

Hotfix information
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

  Date         Time   Version        Size     File name --  23-Dec-2002  09:31  5.1.2600.1154  505,856  Rpcrt4.dll



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section. This problem was first corrected in Microsoft Windows XP Service Pack 2.



MORE INFORMATION
Some RPC servers may request that a client program end its idle connections to reduce resource usage. This is done by sending a shutdown Protocol Data Unit (PDU) to the client. On the client, RPC checks its receive buffer only when it is making an outgoing call to the RPC server. Some UNIX servers send shutdown PDUs after every 20 seconds of idle time. If the client is idle long enough for the server to send 2 consecutive shutdown PDUs, RPC on the client coalesces the PDUs in its receive buffer. If the client decides to make an outgoing call at this time, it tries to process the two coalesced PDUs in its receive buffer first. During processing, the coalescing causes the receive buffer to be reallocated. However, buffer-size information is not tracked correctly. This can result in a buffer that is reported to be larger than it really is. The outgoing call is then made. If the response is larger than the real (not the reported) size of the reallocated receive buffer, an access violation occurs.

If the client is idle long enough for the server to send three shutdown PDUs, RPC closes the connection. A new connection is then created to run the outgoing call. In this case, the problem does not occur. Therefore, the problem is likely to occur after the client program is idle for more than 40 seconds, but less than 60 seconds. However, this depends on how long the UNIX server waits before sending a shutdown PDU.

Keywords: kbhotfixserver kbqfe kbwinxpsp2fix kbenv kberrmsg kbqfe kbwinxppresp2fix kbfix kbbug KB811576

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.