https://bugs.winehq.org/show_bug.cgi?id=55232
Bug ID: 55232 Summary: Sierra Chart (All versions): Out of order overlapped network I/O receive buffers Product: Wine Version: 6.0.3 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: winsock Assignee: wine-bugs@winehq.org Reporter: sc@sierrachart.com Distribution: ---
Created attachment 74837 --> https://bugs.winehq.org/attachment.cgi?id=74837 Terminal output
We have a code which is working fine for years on Windows OS, but on Linux using Wine it produces an IO error. Investigation shows that IO Completion/Overlapped of Wine provides some buffers with received data out of order. Our code relies on correct order of the received buffers.
Our code provides to OS some minimum number of buffers available to receive a data. We expect the FIFO logic of the buffer processing: the first provided available buffer will first receive the data.
Invoke `WSARecv` with a buffer to receive data. The operation is overlapped using Completion Port. In a worker thread the function `GetQueuedCompletionStatus` is used to get the completion notification about received data in the buffer. At this point we observe a buffer, received out of order. Usually it is happened at beginning of handling buffers: we provide to OS some set of buffers (in common 16), handle all of them with received data, reuse available buffers again to OS to support the minimum set of buffers for OS and most probably the first (or close to first) reused buffer will be received out of the order. Also we observe the out-of-order buffer is returned in the same time slot as it was issued to OS.
Relevant WindowsOS functions used: CreateIoCompletionPort WSARecv GetQueuedCompletionStatus
Download link: https://www.sierrachart.com/downloads/ZipFiles/SierraChart2522.zip
https://bugs.winehq.org/show_bug.cgi?id=55232
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal URL| |https://www.sierrachart.com | |/downloads/ZipFiles/SierraC | |hart2522.zip Keywords| |download
--- Comment #1 from Ken Sharp imwellcushtymelike@gmail.com --- Please retry with Wine 8.12 or later.
https://bugs.winehq.org/show_bug.cgi?id=55232
Robert Griggs rtgriggs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rtgriggs@gmail.com
--- Comment #2 from Robert Griggs rtgriggs@gmail.com --- In Wine 8.13, this is still an issue. SierraChart has added a workaround for Wine to use a single buffer but this still results in significant performance degradation.
Post #27 here: The issue is always with Wine. Wine has very very very inefficient handling of socket receive buffers and probably send buffers as well.
The simple fact is even with a single buffer, Wines network I/O performance is below 50%, or even lower, of what Windows provides, at least with the network I/O model that Sierra Chart is using which utilizes overlapped I/O and I/O completion notifications. Wines performance is absolutely terrible in this area.
https://www.sierrachart.com/SupportBoard.php?ThreadID=85248