[Bug 45070] New: closing threads causes "wine client error" and kills process when run under winedbg --gdb
https://bugs.winehq.org/show_bug.cgi?id=45070 Bug ID: 45070 Summary: closing threads causes "wine client error" and kills process when run under winedbg --gdb Product: Wine Version: 3.6 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: winedbg Assignee: wine-bugs(a)winehq.org Reporter: z.figura12(a)gmail.com Distribution: --- Created attachment 61208 --> https://bugs.winehq.org/attachment.cgi?id=61208 test program showing problem When run under winedbg in gdb mode, closing a thread consistently causes 'wine client error:30: write: Bad file descriptor', aborting the program. The basic problem seems to be that gdb will inject breakpoints into dlopen() to allow hooking that function if desired. Normally this works fine, but this can also be triggered during thread teardown, i.e. inside of pthread_exit(). In this case we catch the SIGTRAP, but abort when we try to pass it along to wineserver, since we've already closed our file handle to the server pipe. The obvious solution seems to be to block SIGTRAP during thread shutdown. Attempting this makes the 'bad file descriptor' message go away, but the process still gets killed prematurely. I haven't figured out why. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=45070 --- Comment #1 from Zebediah Figura <z.figura12(a)gmail.com> --- Altering trap_handler to ignore all traps seems to work, in that Wine doesn't abort after hitting this trap (but it also doesn't trap anywhere else, leaving gdb useless). -- 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.
https://bugs.winehq.org/show_bug.cgi?id=45070 tokktokk <fdsfgs(a)krutt.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs(a)krutt.org -- 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.
https://bugs.winehq.org/show_bug.cgi?id=45070 Rémi Bernon <rbernon(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon(a)codeweavers.com --- Comment #2 from Rémi Bernon <rbernon(a)codeweavers.com> --- I think the recently upstreamed winedbg patches may have changed the way gdb frontend interacts with the target process, and it possibly solved this issue. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=45070 Jinoh Kang <jinoh.kang.kr(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jinoh.kang.kr(a)gmail.com --- Comment #3 from Jinoh Kang <jinoh.kang.kr(a)gmail.com> --- Can reproduce in wine 7.12 (staging) while debugging foobar2000.exe. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=45070 Eric Pouech <eric.pouech(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech(a)gmail.com --- Comment #4 from Eric Pouech <eric.pouech(a)gmail.com> --- just tested both test program from #1 and foobar2000 and couldn't reproduce the error of bad descriptor [eric:~/work/output-wine/bugzilla/bz45070]$ gdb --version GNU gdb (GDB) Fedora Linux 12.1-6.fc37 wine-8.0-rc2 foobar2000 1.6.14 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=45070 François Gouget <fgouget(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fgouget(a)codeweavers.com --- Comment #5 from François Gouget <fgouget(a)codeweavers.com> --- The same "wine client error" message also happen during WineTest runs. Those seem to be tied to Windows-on-Windows modes too. See bug 54115 for more details. -- 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 (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla