https://bugs.winehq.org/show_bug.cgi?id=37669
--- Comment #4 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Sebastian Lackner from comment #2)
If I understand you correctly we already have a patch for that: https://github.com/wine-compholio/wine-staging/blob/master/patches/ws2_32- WriteWatches/0001-ws2_32-Avoid-race-conditions-of-async-WSARecv-operat.patch
This approach may lead to infinite retries if recvmsg will legitimately fail for an invalid buffer due to not write watch related activities in another thread.