[Bug 58526] New: GetQueuedFinishionStatus bug
http://bugs.winehq.org/show_bug.cgi?id=58526 Bug ID: 58526 Summary: GetQueuedFinishionStatus bug Product: Wine Version: 10.12 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs(a)winehq.org Reporter: hahamotor(a)126.com Distribution: --- The server program adopts Windows' completion port technology. When the remote client unexpectedly disconnects, on the native Windows operating system, the GetQueuedFinishionStatus function returns False. At this time, the error code indicating the remote connection has been disconnected can be queried through GetLastError. However, in the Wine 10.12 version, this function returns TRUE to indicate successful operation, causing the program to be unable to detect remote connection disconnections. Other versions have been tested and all have the same error. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 ethan li <hahamotor(a)126.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|GetQueuedFinishionStatus |GetQueuedCompletionStatus |bug |bug --- Comment #1 from ethan li <hahamotor(a)126.com> --- The server program adopts Windows' completion port technology. When the remote client unexpectedly disconnects, on the native Windows operating system, the GetQueuedCompletionStatus function returns False. At this time, the error code indicating the remote connection has been disconnected can be queried through GetLastError. However, in the Wine 10.12 version, this function returns TRUE to indicate successful operation, causing the program to be unable to detect remote connection disconnections. Other versions have been tested and all have the same error. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 --- Comment #2 from Ken Sharp <imwellcushtymelike(a)gmail.com> ---
The server program
What server program? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 Zeb Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12(a)gmail.com --- Comment #3 from Zeb Figura <z.figura12(a)gmail.com> ---
Other versions have been tested and all have the same error.
It doesn't really matter, but this isn't helpful when you don't actually mention which ones. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 --- Comment #4 from ethan li <hahamotor(a)126.com> --- (In reply to Ken Sharp from comment #2)
The server program
What server program?
My service program is implemented based on Windows API -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 --- Comment #5 from ethan li <hahamotor(a)126.com> --- (In reply to Zeb Figura from comment #3)
Other versions have been tested and all have the same error.
It doesn't really matter, but this isn't helpful when you don't actually mention which ones.
in the Wine 10.12 version -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 --- Comment #6 from ethan li <hahamotor(a)126.com> --- (In reply to Zeb Figura from comment #3)
Other versions have been tested and all have the same error.
It doesn't really matter, but this isn't helpful when you don't actually mention which ones. 10.12 10.7 10.8 version
-- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 Zeb Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|kernel32 |-unknown --- Comment #7 from Zeb Figura <z.figura12(a)gmail.com> --- If this is your own program, can you attach a binary that we can reproduce with, and ideally also source code? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 --- Comment #8 from ethan li <hahamotor(a)126.com> --- (In reply to Zeb Figura from comment #7)
If this is your own program, can you attach a binary that we can reproduce with, and ideally also source code? Sorry, this service program is a commercial program with intellectual property rights. I can write a demo program to expose the bug and send it to you after writing it,Thank you!
-- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 --- Comment #9 from ethan li <hahamotor(a)126.com> --- (In reply to ethan li from comment #8)
(In reply to Zeb Figura from comment #7)
If this is your own program, can you attach a binary that we can reproduce with, and ideally also source code? Sorry, this service program is a commercial program with intellectual property rights. I can write a demo program to expose the bug and send it to you after writing it,Thank you!
I have sent an email to your mailbox, please check it! -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 --- Comment #10 from Zeb Figura <z.figura12(a)gmail.com> --- (In reply to ethan li from comment #9)
(In reply to ethan li from comment #8)
(In reply to Zeb Figura from comment #7)
If this is your own program, can you attach a binary that we can reproduce with, and ideally also source code? Sorry, this service program is a commercial program with intellectual property rights. I can write a demo program to expose the bug and send it to you after writing it,Thank you!
I have sent an email to your mailbox, please check it!
I'm not seeing any email I'm afraid. It'd be better to attach the demo here if possible, though. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 --- Comment #11 from ethan li <hahamotor(a)126.com> --- Created attachment 79026 --> http://bugs.winehq.org/attachment.cgi?id=79026 Demo Program for Bug Reproduction (IOCP Server/Client) I'm writing to share a demo program I've developed for reproducing bugs in IOCP (Input/Output Completion Port) implementations. The program consists of two components: Iocpserver.exe Iocpclient.exe Technical Details: • Compiled with Visual Studio 2019 Attachments: The compressed package contains four screenshots: Windows 1 & 2: Native Windows platform execution Linux1 & 2: Results via Wine compatibility layer This should help demonstrate the platform-specific behaviors. The compressed package also includes the source code of the demo program. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 --- Comment #12 from ethan li <hahamotor(a)126.com> --- (In reply to Zeb Figura from comment #10)
(In reply to ethan li from comment #9)
(In reply to ethan li from comment #8)
(In reply to Zeb Figura from comment #7)
If this is your own program, can you attach a binary that we can reproduce with, and ideally also source code? Sorry, this service program is a commercial program with intellectual property rights. I can write a demo program to expose the bug and send it to you after writing it,Thank you!
I have sent an email to your mailbox, please check it!
I'm not seeing any email I'm afraid.
It'd be better to attach the demo here if possible, though.
The email I sent you was rejected by the mail server! I've attached it here. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 Zeb Figura <z.figura12(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Keywords| |download Summary|GetQueuedCompletionStatus |Hung up socket should |bug |terminate async recvs with | |an error Ever confirmed|0 |1 Component|-unknown |winsock --- Comment #13 from Zeb Figura <z.figura12(a)gmail.com> --- Okay, yeah, it has nothing to do with completion ports per se, it's that when the remote end of a socket is closed, recv() should terminate with an error, but we're terminating with success. I'm kind of baffled that this is neither tested nor has ever come up before. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 --- Comment #14 from ethan li <hahamotor(a)126.com> --- (In reply to Zeb Figura from comment #13)
Okay, yeah, it has nothing to do with completion ports per se, it's that when the remote end of a socket is closed, recv() should terminate with an error, but we're terminating with success. I'm kind of baffled that this is neither tested nor has ever come up before.
It's great to find this bug!Well done! -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 --- Comment #15 from Zeb Figura <z.figura12(a)gmail.com> --- (In reply to Zeb Figura from comment #13)
Okay, yeah, it has nothing to do with completion ports per se, it's that when the remote end of a socket is closed, recv() should terminate with an error, but we're terminating with success. I'm kind of baffled that this is neither tested nor has ever come up before.
No, I was right to be baffled. I can't find if we tested it before, but terminating asyncs with success is the right thing to do. There is actually a RST coming over the pipe here. It turns out that native will trigger RST under certain conditions that we don't, including: * WSACleanup() * orderly process termination without closing the socket * TerminateProcess() but not: * closesocket() * CloseHandle() That's kind of baffling, because I have no idea how the NT driver is supposed to be able to tell. It's not really a problem for us, we can communicate through side channels, but it's weird. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 --- Comment #16 from ethan li <hahamotor(a)126.com> --- It may involve sokcet implementation or network driver issues at different operating system levels, which is a tricky problem and may be difficult to achieve 100% compatibility. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=58526 --- Comment #17 from ethan li <hahamotor(a)126.com> ---
No, I was right to be baffled. I can't find if we tested it before, but terminating asyncs with success is the right thing to do.
There is actually a RST coming over the pipe here.
It turns out that native will trigger RST under certain conditions that we don't, including:
* WSACleanup() * orderly process termination without closing the socket * TerminateProcess()
but not:
* closesocket() * CloseHandle()
That's kind of baffling, because I have no idea how the NT driver is supposed to be able to tell. It's not really a problem for us, we can communicate through side channels, but it's weird.
It may involve sokcet implementation or network driver issues at different operating system levels, which is a tricky problem and may be difficult to achieve 100% compatibility. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla