https://bugs.winehq.org/show_bug.cgi?id=52585
Bug ID: 52585 Summary: NtQueryDirectoryObject multiple entries not implemented, breaks shells on Cygwin Product: Wine Version: 7.2 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: megastallman@gmail.com Distribution: ---
When I try running any command(not builtin) in Cygwin bash or sh, I get no output and no results in Wineconsole. Though, among usual harmless LDAP-related errors, Wineconsole outputs the following to terminal:
0180:fixme:sync:NtQueryDirectoryObject multiple entries not implemented 0180:fixme:sync:NtQueryDirectoryObject multiple entries not implemented 0180:fixme:sync:NtQueryDirectoryObject multiple entries not implemented
even after Enter is pressed. Builtin commands work fine, but no external command works at all.
Reproducing steps: - cd /cygwin/path/bin - Run "wineconsole" from terminal. There you'll see NtQueryDirectoryObject error. - Run "uname" in Wineconsole. Despite FAST_CWD error, it works. - Run "sh" in Wineconsole. - Run "ls", or just press Enter, or run any other non-builtin command and see those 3 NtQueryDirectoryObject errors. Command itself will not just output anything, it won't work at all, just silently release the terminal.
https://bugs.winehq.org/show_bug.cgi?id=52585
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #1 from Zebediah Figura z.figura12@gmail.com --- I have some patches for this.
https://bugs.winehq.org/show_bug.cgi?id=52585
--- Comment #2 from megastallman megastallman@gmail.com --- Cool! Zebediah, may I try those?
https://bugs.winehq.org/show_bug.cgi?id=52585
--- Comment #3 from Zebediah Figura z.figura12@gmail.com --- Created attachment 71922 --> https://bugs.winehq.org/attachment.cgi?id=71922 concatenated patch series
Yes, sorry, attaching them here.
https://bugs.winehq.org/show_bug.cgi?id=52585
megastallman megastallman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|7.2 |7.4
https://bugs.winehq.org/show_bug.cgi?id=52585
--- Comment #4 from megastallman megastallman@gmail.com --- Hi Zebediah! Probably this patch is not complete, at least - we lack of some structures:
In file included from dlls/ntdll/unix/sync.c:64: dlls/ntdll/unix/sync.c: In function 'NtQueryDirectoryObject': dlls/ntdll/unix/sync.c:1110:23: error: 'union generic_request' has no member named 'get_directory_entries_request'; did you mean 'get_directory_entry_request'? 1110 | SERVER_START_REQ( get_directory_entries ) | ^~~~~~~~~~~~~~~~~~~~~ include/wine/server.h:127:58: note: in definition of macro 'SERVER_START_REQ' 127 | struct type##_request * const req = &__req.u.req.type##_request; \ | ^~~~ dlls/ntdll/unix/sync.c:1110:23: error: 'union generic_reply' has no member named 'get_directory_entries_reply'; did you mean 'get_directory_entry_reply'? 1110 | SERVER_START_REQ( get_directory_entries ) | ^~~~~~~~~~~~~~~~~~~~~ include/wine/server.h:128:66: note: in definition of macro 'SERVER_START_REQ' 128 | const struct type##_reply * const reply = &__req.u.reply.type##_reply; \ | ^~~~ include/wine/server.h:130:42: error: 'REQ_get_directory_entries' undeclared (first use in this function); did you mean 'REQ_get_directory_entry'? 130 | __req.u.req.request_header.req = REQ_##type; \ | ^~~~ dlls/ntdll/unix/sync.c:1110:5: note: in expansion of macro 'SERVER_START_REQ' 1110 | SERVER_START_REQ( get_directory_entries ) | ^~~~~~~~~~~~~~~~ include/wine/server.h:130:42: note: each undeclared identifier is reported only once for each function it appears in 130 | __req.u.req.request_header.req = REQ_##type; \ | ^~~~ dlls/ntdll/unix/sync.c:1110:5: note: in expansion of macro 'SERVER_START_REQ' 1110 | SERVER_START_REQ( get_directory_entries ) | ^~~~~~~~~~~~~~~~ dlls/ntdll/unix/sync.c:1112:12: error: dereferencing pointer to incomplete type 'struct get_directory_entries_request' 1112 | req->handle = wine_server_obj_handle( handle ); | ^~ dlls/ntdll/unix/sync.c:1117:22: error: dereferencing pointer to incomplete type 'const struct get_directory_entries_reply' 1117 | count = reply->count; | ^~ dlls/ntdll/unix/sync.c:1141:56: error: dereferencing pointer to incomplete type 'const struct directory_entry' 1141 | unsigned int entry_size = sizeof(*info) + entry->name_len + entry->type_len + 2 * sizeof(WCHAR); | ^~ dlls/ntdll/unix/sync.c:1165:27: error: invalid use of undefined type 'struct directory_entry' 1165 | memcpy( p, (entry + 1), entry->name_len ); | ^ dlls/ntdll/unix/sync.c:1172:35: error: invalid use of undefined type 'struct directory_entry' 1172 | memcpy( p, (char *)(entry + 1) + entry->name_len, entry->type_len ); | ^ make: *** [Makefile:92807: dlls/ntdll/unix/sync.o] Error 1
https://bugs.winehq.org/show_bug.cgi?id=52585
--- Comment #5 from Zebediah Figura z.figura12@gmail.com --- Yes, the patch is missing some generated files. You'll need to run ./tools/make_requests in the source tree before compiling.
https://bugs.winehq.org/show_bug.cgi?id=52585
--- Comment #6 from megastallman megastallman@gmail.com --- Interesting! That patch fixes the "0180:fixme:sync:NtQueryDirectoryObject multiple entries not implemented", thus there are other problems that break the shell, but this error doesn't show up any more.
https://bugs.winehq.org/show_bug.cgi?id=52585
Ker noa blue-t@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |blue-t@web.de
https://bugs.winehq.org/show_bug.cgi?id=52585
megastallman megastallman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|NtQueryDirectoryObject |NtQueryDirectoryObject |multiple entries not |multiple entries not |implemented, breaks shells |implemented. |on Cygwin |
https://bugs.winehq.org/show_bug.cgi?id=52585
--- Comment #7 from megastallman megastallman@gmail.com --- Hi Zebediah! I've renamed this bugreport so that it closer reflects the bug. Are you going to upstream your patch? At least it fixes "0180:fixme:sync:NtQueryDirectoryObject multiple entries not implemented" error.
https://bugs.winehq.org/show_bug.cgi?id=52585
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://web.archive.org/web | |/20210308073313/https://dow | |nload.sysinternals.com/file | |s/WinObj.zip Component|-unknown |ntdll Keywords| |download Summary|NtQueryDirectoryObject |Multiple applications need |multiple entries not |NtQueryDirectoryObject to |implemented. |return multiple entries | |(Cygwin shells, WinObj | |3.01)
https://bugs.winehq.org/show_bug.cgi?id=52585
--- Comment #8 from Ker noa blue-t@web.de --- (In reply to megastallman from comment #7)
Some parts of the patch series are already upstream so that the posted patch series no longer applies cleanly and needs to be rebased. When you look at https://source.winehq.org/patches/ the testbot didn't like the patch as it throws an error.
I am sure this hasn't been forgotten and just requires some additional work.
https://bugs.winehq.org/show_bug.cgi?id=52585
Joel Holdsworth joel@airwebreathe.org.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |joel@airwebreathe.org.uk
https://bugs.winehq.org/show_bug.cgi?id=52585
themainliner themainliner@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |themainliner@hotmail.com
--- Comment #9 from themainliner themainliner@hotmail.com --- (In reply to Ker noa from comment #8)
I think it's possible this has been forgotten. World of Warcraft is still subject to error free dropouts.
https://bugs.winehq.org/show_bug.cgi?id=52585
--- Comment #10 from Ker noa blue-t@web.de --- yepp, still a problem after the 8.0 release.
https://bugs.winehq.org/show_bug.cgi?id=52585
Bernhard Übelacker bernhardu@mailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bernhardu@mailbox.org
--- Comment #11 from Bernhard Übelacker bernhardu@mailbox.org --- Still visible in wine-9.0-rc2.
https://bugs.winehq.org/show_bug.cgi?id=52585
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #12 from Fabian Maurer dark.shadow4@web.de --- Would you mind providing an updated version of those patches?
https://bugs.winehq.org/show_bug.cgi?id=52585
--- Comment #13 from Ker noa blue-t@web.de --- https://gitlab.winehq.org/wine/wine/-/merge_requests/4424 just needs to be rebased which i suspect will happen after the 9.0 release is tagged.
https://bugs.winehq.org/show_bug.cgi?id=52585
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |af4f252ac4426c3da773904df9a | |c8e64322b5c8f Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED CC| |infyquest@gmail.com
--- Comment #14 from Vijay Kamuju infyquest@gmail.com --- Fix merged - https://source.winehq.org/git/wine.git/commitdiff/af4f252ac4426c3da773904df9...
https://bugs.winehq.org/show_bug.cgi?id=52585
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.11.