FD_READ Event Is Not Signaled on Connected Socket If Data Arrives Right After an Accept() on SAN (289232)



The information in this article applies to:

  • Microsoft Windows 2000 Server SP1
  • Microsoft Windows 2000 Advanced Server SP1
  • Microsoft Windows 2000 Professional SP1

This article was previously published under Q289232

SYMPTOMS

On a system area network (SAN) connection, when a program that uses EventSelect calls on a listening socket and then data arrives right after an accept, the program may wait indefinitely for notification of the FD_READ event on the connected socket.

In addition, another race condition may result under the following conditions:
  • The available listening backlog has become zero.
  • The server side calls an accept, which increments the available backlog by one.
  • A connection is attempted before the increment takes place.
This race condition causes the server to refuse the connection.

CAUSE

This behavior occurs because the Windows 2000 Afd.sys driver contains incorrect settings.

RESOLUTION

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

260910 How to Obtain the Latest Windows 2000 Service Pack

STATUS

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

This problem was first corrected in Windows 2000 Service Pack 2.

MORE INFORMATION

Many programs use WSAEventSelect and WSAEnumNetworkEvents/WaitForSingleObject calls to be notified of the network events that happen on a socket. Any program that waits for an FD_READ event on a connected socket can run into this problem, which causes that program thread to wait indefinitely for FD_READ notification.

Modification Type:MajorLast Reviewed:11/19/2003
Keywords:kbbug kbfix kbnetwork KB289232