BUG: Timimg Out on recvfrom() Causes Windows 95 to Quit

ID: Q138267


The information in this article applies to:


SYMPTOMS

If a Winsock application is continuosly doing a recvfrom() and has a timeout associated with the call, then after some time Windows 95 will either restart or hang (stop responding) as soon as it receives some data.


RESOLUTION

The application should use select() to determine if the socket is ready for reading before doing a recvfrom().


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are reasearching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


MORE INFORMATION

This problem is observed in this situation:

An application opens a UDP or IPX socket. It then binds to INADDR_ANY in case of UDP and to network number 0 and host number 0 in case of IPX. It then uses the setsockopt() call with the SO_RCVTIMEO option to set up a timeout of 1 second.

The application then does a recvfrom() in an infinite loop in such a way so that it can receive a packet from any host. After running for approximately 1000 seconds, if a server sends a UDP or IPX broadcast, either the operating system stops resonding or it restarts.

Note that it might be possible to observe the same behaviour with slight variations in circumstances such as different timeouts.


REFERENCES

For more information, please see the following article in the Microsoft Knowledge Base:

Q137914 BUG: Windows 95-Based Winsock App Can't Receive IPX Broadacast


Keywords          : kbnetwork kbAPI kbSDKPlatform kbWinOS95bug kbWinsock kbGrpNet 
Version           : 
Platform          : 
Issue type        : kbbug 

Last Reviewed: March 5, 1999