http://bugs.winehq.org/show_bug.cgi?id=58689
Bug ID: 58689 Summary: Full sockets are blocking even with FIONBIO=1, and leak server resources if terminated Product: Wine Version: 10.14 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winsock Assignee: wine-bugs@winehq.org Reporter: blubban@gmail.com Distribution: ---
Created attachment 79286 --> http://bugs.winehq.org/attachment.cgi?id=79286 reproducer
Compile and run the attached program; -lws2_32, no other flags needed.
Expected (as seen on win10):
sent 16384 (total 16384) sent 16384 (total 32768) [...] sent 16384 (total 2752512) sent -1 (total 2752512) read 16384 (total 16384) [...] read 16384 (total 2752512) read -1 (total 2752512)
Actual:
sent 16384 (total 16384) [...] sent 16384 (total 2703360)
and then stops doing anything, despite setting FIONBIO=1. That's problem 1.
If ^C'd, it prints ^C0120:fixme:console:default_ctrl_handler Terminating process 20 on event 0
$ 0x563a4329ca30:1: Async thread=0x563a4325a9c0 0x563a4330d470:2: I/O status block 0x563a4330f620:1: Event manual=1 signaled=0 0x563a4330f4f0:1: Fd unix_fd=318 user=0x563a4330f2f0 options=00000020 0x563a4330f2f0:1: Socket fd=0x563a4330f4f0, state=3, mask=0, pending=50, reported=50 0x563a4330eb00:1: Event manual=1 signaled=0 0x563a43286610:1: Event manual=1 signaled=0 0x563a4325add0:1: Event manual=1 signaled=1 0x563a4325a9c0:1: Thread id=0024 unix pid=474049 unix tid=474049 state=1 0x563a4325a1f0:1: Token id=0.1001 primary=1 impersonation level=-1 0x563a4325a0d0:1: Event manual=1 signaled=1 0x563a430f20e0:1: Process id=0020 handles=(nil)
which, according to #winehackers, means wineserver leaked some resources. That's problem 2.
I don't know if those problems are two bugs, or one bug with two symptoms.