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

Last reviewed: October 17, 1995
Article ID: Q138267
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) for Windows 95 version 4.0

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:

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


Additional reference words: 4.00
KBCategory: kbnetwork kbtshoot kbbuglist
KBSubcategory: NtwkWinsock


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 17, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.