https://bugs.winehq.org/show_bug.cgi?id=55203
Bug ID: 55203 Summary: ws2_32:sock - test_AcceptEx() sometimes gets WSAEWOULDBLOCK and times out on Windows 10 Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: winsock Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
ws2_32:sock - test_AcceptEx() sometimes gets WSAEWOULDBLOCK and times out on Windows 10:
sock.c:8704: Test failed: failed to accept, error 10035 sock.c:8716: Test failed: got 0xc0000023 sock.c:8751: Test failed: got 00000000 sock.c:8765: Test failed: AcceptEx on too small remote address size returned 0 + errno 10022 sock.c:8785: Test failed: AcceptEx returned 0 + errno 10022 sock.c:8805: Test failed: got error 10056 ws2_32:sock:13d4 done (258) in 120s 488B
See https://test.winehq.org/data/patterns.html#ws2_32:sock
Where: 10022 == WSAEINVAL 10035 == WSAEWOULDBLOCK 10056 == WSAEISCONN 0xC0000023 == STATUS_BUFFER_TOO_SMALL
This happened 6 times in the past 8 months, all on Windows 10: * 2023-02-07 win22H2_fgtb-w10pro64-64 * 2023-03-23 win21H1_newtb-w10pro64-zh-CN-64 * 2023-03-31 win2004_newtb-w10pro64v2004-64 * 2023-05-30 win1909_newtb-w1064v1909-64 * 2023-06-23 win21H1_newtb-w10pro64-ja-64 * 2023-07-06 win21H1_newtb-w10pro64-de-64
https://bugs.winehq.org/show_bug.cgi?id=55203
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase
https://bugs.winehq.org/show_bug.cgi?id=55203
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #1 from Zeb Figura z.figura12@gmail.com --- This is very strange; I can't figure out any reasonable reason for this to fail.
The test queues an asynchronous accept with an incorrect size. On Windows this results in the accept being successfully queued. When a connection request comes in the socket will try to fill that async, realize that the size is too small, and instead return failure from the async, with the connection request remaining in the queue for the next accept.
What's odd is that that "next" accept—the one we do just to prove that the connection is still queued—fails to complete synchronously. This doesn't make any sense. There has to be a connection request queued, otherwise the invalid accept wouldn't return. Why would the valid accept fail to complete synchronously?
I thought it might be because the invalid accept doesn't actually wait for a valid connection to come in, but a quick test shows that's not the case.