https://bugs.winehq.org/show_bug.cgi?id=55014
Bug ID: 55014 Summary: kernel32:comm crashes in WoW64 mode on Linux Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
kernel32:comm crashes in WoW64 mode on Linux:
comm.c:708: Found Com port COM1. Connected devices may disturb results Unhandled exception: page fault on read access to 0x0000000000000000 in 64-bit code (0x007f47b448083c). [...] =>0 0x007f47b448083c wait_for_event+0x1c(arg=<internal error>) [/home/winetest/tools/testbot/var/wine-wow64/../wine/dlls/ntdll/unix/serial.c:945] in ntdll.so (0000000000000000) 0x007f47b448083c wait_for_event+0x1c [/home/winetest/tools/testbot/var/wine-wow64/../wine/dlls/ntdll/unix/serial.c:945] in ntdll.so: mov (%rdi), %rdi 945 if (!server_get_unix_fd( commio->hDevice, FILE_READ_DATA | FILE_WRITE_DATA, &fd, &needs_close, NULL, NULL ))
See https://test.winehq.org/data/patterns.html#kernel32:comm
The failure seems to only happen on the TestBot VMs, maybe because of QEmu, particularly because it does not set the baud rate correctly.
A bisect shows that this failure started with the commit below:
commit b337c5b1a1757b2abbc90a7c6955d64242861ab9 Author: Alexandre Julliard julliard@winehq.org Date: Fri Jun 2 09:35:29 2023 +0200
ntdll: Use the default ABI for all functions on the Unix side.
https://bugs.winehq.org/show_bug.cgi?id=55014
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |b337c5b1a1757b2abbc90a7c695 | |5d64242861ab9 Keywords| |regression, source, | |testcase
https://bugs.winehq.org/show_bug.cgi?id=55014
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@gmail.com
--- Comment #1 from Eric Pouech eric.pouech@gmail.com --- Created attachment 74791 --> https://bugs.winehq.org/attachment.cgi?id=74791 hacky patch
this is not directly because of QEMU... it's rather that the QEMU VMs are likely the last to have a proper serial line setup <g>, and we only get the failure on these
the commit from #1 removed all function calling convention in unix .so part of DLLs, but serial.c: wait_for_event() is supposed to be a thread entry point, hence requires a ms_abi calling convention
using the attached hack make it work again
not sure however it's the best way forward: there's a FIXME in serial.c hinting at getting rid of the thread and use async io instead (but this may require server evolution); but is it worth putting lots of energy in serial code support ?
https://bugs.winehq.org/show_bug.cgi?id=55014
brunoaiss+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |brunoaiss+winebugs@gmail.co | |m
https://bugs.winehq.org/show_bug.cgi?id=55014
--- Comment #2 from Eric Pouech eric.pouech@gmail.com --- Tried the patch in #2 as a simple MR, but got rejected as the proper fix has to use asynchronous I/O.
https://bugs.winehq.org/show_bug.cgi?id=55014
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|eric.pouech@gmail.com |
https://bugs.winehq.org/show_bug.cgi?id=55014
zmtong1988@gmail.com zmtong1988@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zmtong1988@gmail.com
--- Comment #3 from zmtong1988@gmail.com zmtong1988@gmail.com --- https://bugs.winehq.org/show_bug.cgi?id=55947
https://bugs.winehq.org/show_bug.cgi?id=55014
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|NEW |RESOLVED
--- Comment #4 from Hans Leidekker hans@meelstraat.net --- Duplicate.
*** This bug has been marked as a duplicate of bug 55947 ***
https://bugs.winehq.org/show_bug.cgi?id=55014
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing duplicate.