The information in this article applies to:
SYMPTOMSPackets between the TCP, UDP, and IP layers are lost. CAUSEThere appears to be a problem with a race condition between two threads that share a socket where one is closing a socket while the other tries to call recvfrom() on the same socket. This causes problems the next time a socket is bound to the same UDP port. RESOLUTIONThe vendor should implement a workaround within the application so that this race condition does not occur. STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATIONThis Sockets/UDP problem was discovered while testing the TX1000 NCPI driver for Windows NT. Here are some notes showing what appears to be happening:
Usually, events occur in sequence (1, 2, then 3). In this normal case, the
socket is cleared correctly, and everything works the next time the
application runs.
Shutdown Sequence that Causes Problems (on Last Packet)
In this case, the sequence is slightly different. The closesocket()
function from main thread starts, but does not complete, before thread 2
runs. While thread 1 is suspended awaiting completion of closesocket(),
thread 2 runs and posts next recvfrom() on same socket. The closesocket()
function completes successfully, and recvfrom() fails as in normal case.
But the next time the application runs and binds to the same UDP port, the
following occurs:
Additional query words:
Keywords : kbnetwork kbIP kbNTOS350 kbSDKPlatform kbWinsock kbGrpNet |
Last Reviewed: October 15, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |