https://bugs.winehq.org/show_bug.cgi?id=54115
Bug ID: 54115 Summary: wine client error:68: write: Bad file descriptor Product: Wine Version: 8.0-rc1 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: aros@gmx.com Distribution: ---
This is starting to happen in Wine 8.0-rc1, however I didn't have version 7.22 installed, so I cannot say when it regressed exactly.
After exiting any application you can see:
wine client error:68: write: Bad file descriptor wine client error:b4: write: Bad file descriptor wine client error:11c: write: Bad file descriptor
Full log for notepad:
$ notepad 002c:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0) 0048:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0) 0050:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0) 0050:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002 0050:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002 0050:err:ole:apartment_get_local_server_stream Failed: 0x80004002 0050:err:ole:start_rpcss Failed to open RpcSs service 0048:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002 0048:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002 0048:err:ole:apartment_get_local_server_stream Failed: 0x80004002 0048:fixme:imm:ImeSetActiveContext (0001002E, 0): stub 0048:fixme:imm:ImmReleaseContext (00010020, 0001002E): stub 002c:fixme:imm:ImeSetActiveContext (0001004E, 1): stub 002c:fixme:imm:ImmReleaseContext (0001004C, 0001004E): stub 008c:err:setupapi:SetupDefaultQueueCallbackW copy error 1812 L"@C:\windows\system32\drivers\wineusb.sys,-1" -> L"C:\windows\inf\wineusb.inf" 00e8:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 00e8:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 00e8:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 00e8:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 wine: configuration in L"/home/birdie/.wine" has been updated. 010c:fixme:imm:ImeSetActiveContext (00030062, 1): stub 010c:fixme:imm:ImmReleaseContext (00030048, 00030062): stub
Exit it, a few seconds later:
wine client error:68: write: Bad file descriptor wine client error:b4: write: Bad file descriptor wine client error:11c: write: Bad file descriptor
This doesn't look very appealing.
I'm not using mingw, it's a classic i686 GCC build under Fedora 37.
https://bugs.winehq.org/show_bug.cgi?id=54115
Artem S. Tashkinov aros@gmx.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression, source
https://bugs.winehq.org/show_bug.cgi?id=54115
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@gmail.com
--- Comment #1 from Eric Pouech eric.pouech@gmail.com --- Hi Artem,
can't reproduce here.
configured with: configure --without-mingw
(tested from within builtin tree, and install tree; both close notepad without additional messages)
the messages seem to imply wineserver terminated before the applications; which shouldn't be the case
could you try two (separate things): - do ./wine notepad on a first terminal; from a second terminal, get wineserver pid and attach gdb to it (gdb wineserver <pid>). then close notepad. if wineserver internally dies, you'll get a backtrace - post a WINEDEBUG=+server log (must be the first instance running)
eric:~/work/output-wine/wineelf32]$ LC_ALL=C gcc --version gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4) Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
https://bugs.winehq.org/show_bug.cgi?id=54115
--- Comment #2 from Artem S. Tashkinov aros@gmx.com --- (In reply to Eric Pouech from comment #1)
Hi Artem,
Thing one didn't work:
1st terminal:
$ notepad 002c:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0) 0048:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0) 0050:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.Windows.Common-Controls" (6.0.0.0) 0050:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002 0050:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002 0050:err:ole:apartment_get_local_server_stream Failed: 0x80004002 0050:err:ole:start_rpcss Failed to open RpcSs service 0048:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002 0048:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002 0048:err:ole:apartment_get_local_server_stream Failed: 0x80004002 0048:fixme:imm:ImeSetActiveContext (0001002E, 0): stub 0048:fixme:imm:ImmReleaseContext (00010020, 0001002E): stub 002c:fixme:imm:ImeSetActiveContext (00010056, 1): stub 002c:fixme:imm:ImmReleaseContext (00010054, 00010056): stub 008c:err:setupapi:SetupDefaultQueueCallbackW copy error 1812 L"@C:\windows\system32\drivers\wineusb.sys,-1" -> L"C:\windows\inf\wineusb.inf" 00e8:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 00e8:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 00e8:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 00e8:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 wine: configuration in L"/home/birdie/.wine" has been updated. 010c:fixme:imm:ImeSetActiveContext (00030058, 1): stub 010c:fixme:imm:ImmReleaseContext (00030044, 00030058): stub [birdie@zen tmp]$ wine client error:68: write: Bad file descriptor wine client error:b4: write: Bad file descriptor wine client error:11c: write: Bad file descriptor
2nd terminal: $ gdb /opt/wine/bin/wineserver `pidof wineserver` Excess command line arguments ignored. (206788) GNU gdb (GDB) Fedora Linux 12.1-6.fc37 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.
For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /opt/wine/bin/wineserver...
This GDB supports auto-downloading debuginfo from the following URLs: https://debuginfod.fedoraproject.org/ Enable debuginfod for this session? (y or [n]) y Debuginfod has been enabled. To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit. (No debugging symbols found in /opt/wine/bin/wineserver) Attaching to program: /opt/wine/bin/wineserver, process 252182 Reading symbols from /lib/libc.so.6... Downloading 6.91 MB separate debug info for /lib/libc.so.6 Reading symbols from /var/tmp/xdgcache-birdie/debuginfod_client/8e6ec495f89f0a512ff3e329242b9222cdd35c26/debuginfo... Reading symbols from /lib/ld-linux.so.2... [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". 0xf7f38422 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 (gdb) cont Continuing.
[Inferior 1 (process 252182) exited normally] (gdb) The program is not being run. (gdb) The program is not being run. (gdb)
https://bugs.winehq.org/show_bug.cgi?id=54115
--- Comment #3 from Artem S. Tashkinov aros@gmx.com --- Created attachment 73749 --> https://bugs.winehq.org/attachment.cgi?id=73749 WINEDEBUG=+server notepad
WINEDEBUG=+server
https://bugs.winehq.org/show_bug.cgi?id=54115
--- Comment #4 from Eric Pouech eric.pouech@gmail.com ---
$ gdb /opt/wine/bin/wineserver `pidof wineserver` Excess command line arguments ignored. (206788)
this means two instances of wineserver were running. (gdb attached to first one and reported second). Did gdb pick up the right instance?
https://bugs.winehq.org/show_bug.cgi?id=54115
--- Comment #5 from Eric Pouech eric.pouech@gmail.com --- (In reply to Eric Pouech from comment #4)
$ gdb /opt/wine/bin/wineserver `pidof wineserver` Excess command line arguments ignored. (206788)
this means two instances of wineserver were running. (gdb attached to first one and reported second). Did gdb pick up the right instance?
no crash from log, so no need go further with gdb... need more perusing of the traces
https://bugs.winehq.org/show_bug.cgi?id=54115
--- Comment #6 from Artem S. Tashkinov aros@gmx.com --- (In reply to Eric Pouech from comment #4)
$ gdb /opt/wine/bin/wineserver `pidof wineserver` Excess command line arguments ignored. (206788)
this means two instances of wineserver were running. (gdb attached to first one and reported second). Did gdb pick up the right instance?
Let's try again.
$ gdb /opt/wine/bin/wineserver `pidof wineserver` GNU gdb (GDB) Fedora Linux 12.1-6.fc37
For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /opt/wine/bin/wineserver...
This GDB supports auto-downloading debuginfo from the following URLs: https://debuginfod.fedoraproject.org/ Enable debuginfod for this session? (y or [n]) y Debuginfod has been enabled. To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit. (No debugging symbols found in /opt/wine/bin/wineserver) Attaching to program: /opt/wine/bin/wineserver, process 1209784 Reading symbols from /lib/libc.so.6... Reading symbols from /var/tmp/xdgcache-birdie/debuginfod_client/8e6ec495f89f0a512ff3e329242b9222cdd35c26/debuginfo... Reading symbols from /lib/ld-linux.so.2... [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". 0xf7f5b422 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2 (gdb) cont Continuing. [Inferior 1 (process 1209784) exited normally] (gdb)
https://bugs.winehq.org/show_bug.cgi?id=54115
--- Comment #7 from Artem S. Tashkinov aros@gmx.com --- (In reply to Eric Pouech from comment #5)
(In reply to Eric Pouech from comment #4)
$ gdb /opt/wine/bin/wineserver `pidof wineserver` Excess command line arguments ignored. (206788)
this means two instances of wineserver were running. (gdb attached to first one and reported second). Did gdb pick up the right instance?
no crash from log, so no need go further with gdb... need more perusing of the traces
Oops, sorry, sorry again for the spam.
https://bugs.winehq.org/show_bug.cgi?id=54115
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |fgouget@codeweavers.com Status|UNCONFIRMED |NEW
--- Comment #8 from François Gouget fgouget@codeweavers.com --- I'm getting these errors when wineserver exits too (regular 32-bit ./configure && make built, i.e. using MinGW). I have not investigated yet since it happens on exit and thus is not blocking my regular work on Wine.
https://bugs.winehq.org/show_bug.cgi?id=54115
Artem S. Tashkinov aros@gmx.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |PuetzKevinA@JohnDeere.com
https://bugs.winehq.org/show_bug.cgi?id=54115
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu@mailbox.org
--- Comment #9 from Bernhard Übelacker bernhardu@mailbox.org --- Created attachment 74577 --> https://bugs.winehq.org/attachment.cgi?id=74577 backtrace of crash and fprintf in winedevice.exe
I received this message too.
My environment is a regular 64+32-bit mingw build. Inside a fresh prefix created with just WINEARCH=win32. And running on top of a current Debian testing. Starting just notepad or winecfg and a few seconds after closing it, probably when wineserver terminates it shows the message.
wine client error:e0: write: Bad file descriptor
When temporarily starting winedbg before closing notepad, the thread id from the message belongs to rpcss.exe.
When running inside rr-debugger it belongs to a winedevice.exe.
This might be a race when shutting down processes with multiple threads. In my example I saw they do execute signal_exit_thread, two receive a SIGQUIT signal.
Then thread 1 executes signal_exit_thread but crashes. Unfortunately handling this crash executes a NtCreateEvent, which needs a wineserver roundtrip, which seems no longer available at this time, therefore this message is written.
Attached are the backtrace of the crash and fprintf in winedevice.exe.
https://bugs.winehq.org/show_bug.cgi?id=54115
--- Comment #10 from François Gouget fgouget@codeweavers.com --- This error is also happening during WineTest runs.
For instance in this 32-bit GitLab CI WineTest run: https://gitlab.winehq.org/wine/wine/-/jobs/22517
wine: Assertion failed at address F7F4F559 (thread 04e4), starting debugger... wine client error:4e4: write: Bad file descriptor wine: Unhandled page fault on write access to 00000000 at address 6AB23C94 (thread 0518), starting debugger... wine client error:350: wine: Unhandled page fault on write access to 00000000 at address 6AB23C94 (thread 0188), starting debugger... wine: Unhandled page fault on write access to 00000000 at address 6AB1CF25 (thread 03bc), starting debugger... wine client error:2b4: write: Bad file descriptor
Given the proximity to unhandled exceptions this one may be related to bug 45070.
This also happens on the TestBot but apparently only in the Windows-on-Windows cases (whether new or old style, see the task.log files). Those are not always near unhandled exceptions and one can also get a "partial write" instead of a "bad descriptor":
wine client error:240: partial write 49152
https://bugs.winehq.org/show_bug.cgi?id=54115
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
--- Comment #11 from Ken Sharp imwellcushtymelike@gmail.com --- Indeed I see this in the console using Wine normally. It doesn't appear to be causing any other issue.
"regression" is in the tags but has anyone run a bisect?
https://bugs.winehq.org/show_bug.cgi?id=54115
--- Comment #12 from Artem S. Tashkinov aros@gmx.com --- (In reply to Ken Sharp from comment #11)
Indeed I see this in the console using Wine normally. It doesn't appear to be causing any other issue.
"regression" is in the tags but has anyone run a bisect?
It regressed between ~7.20 and 8.0-rc1. Sorry, can't do it currently.
https://bugs.winehq.org/show_bug.cgi?id=54115
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |o.dierick@piezo-forte.be
--- Comment #13 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- Hello,
I switched from Debian 8 to Debian 12 in July. I dual booted to Debian 12 to reproduce my building environment and assert that my Wine build was still working before completing the OS transition.
The last version I compiled on Debian 8 was Wine 8.11. I successfully compiled the same Wine 8.11 git tree with essentially identical build environment. The main difference is that on Debian 8, I had to add '-I/usr/local/lib' to the CFLAGS to use a more recent libpcap library (before that, I had to use --without-pcap). There is no need for that on Debian 12.
When I ran the newly compiled wine 8.11, I started to get the 'wine client error' message. I double-checked in Debian 8 and the error didn't show there. At that time, most of the windows applications that I was using worked fine regardless of that message and so I removed Debian 8 entirely.
On Debian 12, I tested all releases from 8.11 up to 8.14, compiled from git, and all are affected. I doubted about my new build environment so I installed the wine 8.0~repack-4 package from the Debian.org repository, it was not affected. Then I replaced it with the winehq-devel 8.14~bookworm-1 package from winehq.org and it's affected.
Regards.
https://bugs.winehq.org/show_bug.cgi?id=54115
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #14 from Alexandre Julliard julliard@winehq.org --- This should be fixed by the syscall unwinding fixes.
https://bugs.winehq.org/show_bug.cgi?id=54115
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #15 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.0-rc2.