windowsudpwinsocksendtorecvfrom

Reasons for rare sendto()/recvfrom() issues under Winsock?


We recently observe rare UDP communication issues that show the following symptoms:

  1. A socket sendto() call fails with error WSAENOBUFS (10055)
  2. A subsequent recvfrom() call on this socket does not receive anything, even though Wireshark shows that the network interface actually received the expected datagrams. This situation persists for approximately 8 seconds, afterwards new incoming datagrams can be received again from the socket.
  3. In Windows System Log, there appears a Kernel-General information entry at the time of the sendto() error: The access history in hive \??\C:\ProgramData\Microsoft\Provisioning\Microsoft-Desktop-Provisioning-Sequence.dat was cleared updating 0 keys and creating 0 modified pages.

The issue happens on a customer system running Microsoft Windows 10 Pro for Workstations, Version 10.0.17763 Build 17763.

On that system we were able to reproduce the issue with a simple test program written in C++ that echoes UDP datagrams. We verified that the thread receiving from the socket was actually responsive all the time, by specifying a timeout of 1 second using SO_RCVTIMEO, printing some “still alive” output and immediately calling recvfrom() again.

On our own test system, we were unable to observe the issue under the same circumstances as the customer. However, we were able to provoke similar effects when playing around with the network adapter settings while the test was running. Enabling Microsoft LLDP Protocol Driver showed the sendto() error and sometimes also resulted in the 8 second “silence” period, but without any Windows System Log entry.

Any hints are greatly appreciated.


Solution

  • The issue seems to be related to Microsoft Provisioning Tool since Windows 10 1809.

    Disabling it fixed the issue in our case:

    Open Task Scheduler, go to Microsoft/Windows/Manangement/Provisioning and disable Logon task.

    Source: Windows TenForums