https://bugs.winehq.org/show_bug.cgi?id=40528
Bug ID: 40528 Summary: Cygwin installs (with errors) but doesn't work at all Product: Wine Version: 1.9.8 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: winehq@lam.pl Distribution: ---
Cygwin was installed with "setup.exe version 2.873 (64 bit)".
When installing, many packages' post-install scripts returned exit code -1073741819. They also repeatedly said on the console: running: C:\cygwin64\bin\bash.exe --norc --noprofile "/etc/postinstall/mintty.sh" error: Unable to redirect output to '/var/log/setup.log.runXa00041'; using console fixme:ntdll:NtSetInformationToken unimplemented class 4 fixme:ntdll:NtQueryInformationProcess (process=0xffffffffffffffff) Unimplemented information class: ProcessSessionInformation fixme:advapi:LsaOpenPolicy ((null),0x180309f00,0x00000001,0xffffc2f8) stub fixme:advapi:LsaClose (0xcafe) stub fixme:netapi32:NetUserGetInfo Level 3 is not implemented err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x7bc9b52c error: Unable to remove temporary file '/var/log/setup.log.runXa00041' abnormal exit: exit code=-1073741819
setup.exe says "cygwin" was installed as 2.5.1-1 version.
And now, "wine whatever.exe" in $HOME.wine/drive_c/cygwin64/bin (and that includes "wine bash -i --login", but I've tried all others, literally anything like "wine less.exe") says:
fixme:winediag:start_process Wine Staging 1.9.8 is a testing version containing experimental patches. fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org. err:winedevice:ServiceMain driver L"Null" failed to load fixme:ntdll:NtSetInformationToken unimplemented class 4 fixme:ntdll:NtQueryInformationProcess (process=0xffffffffffffffff) Unimplemented information class: ProcessSessionInformation fixme:advapi:LsaOpenPolicy ((null),0x180309f00,0x00000001,0xffffc2f8) stub fixme:advapi:LsaClose (0xcafe) stub fixme:netapi32:NetUserGetInfo Level 3 is not implemented Cygwin WARNING: Couldn't compute FAST_CWD pointer. This typically occurs if you're using an older Cygwin version on a newer Windows. Please update to the latest available Cygwin version from https://cygwin.com/. If the problem persists, please see https://cygwin.com/problems.html
err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x7bc9b52c
https://bugs.winehq.org/show_bug.cgi?id=40528
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #1 from winetest@luukku.com --- Are you able to test wine-staging version of wine? It contains patches that are not in wine yet and it has patches for this specific program.
https://bugs.winehq.org/show_bug.cgi?id=40528
--- Comment #2 from winetest@luukku.com --- I thought this would work with wine-staging, but it could be that it 64 version never worked or winxp-->win7 version chage caused this
AddAccessAllowedAceEx(, group) failed: 1337 running: C:\cygwin64\bin\dash.exe "/etc/postinstall/0p_000_autorebase.dash" fixme:ntdll:NtSetInformationToken unimplemented class 4 fixme:ntdll:NtQueryInformationProcess (process=0xffffffffffffffff) Unimplemented information class: ProcessSessionInformation fixme:advapi:LsaOpenPolicy ((null),0x1802d2f20,0x00000001,0xffffc2f8) stub fixme:advapi:LsaClose (0xcafe) stub fixme:netapi32:NetUserGetInfo Level 3 is not implemented wine: Unhandled page fault on read access to 0x00000020 at address 0x7bc498e0 (thread 003d), starting debugger...
Seems similar than you have.
wine-staging 2.2. cygwin 2.877.
e27551bd924c9d12d1057c6ac67245ee60fe0f1e setup-x86_64.exe
https://bugs.winehq.org/show_bug.cgi?id=40528
Richard Z. rz@linux-m68k.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rz@linux-m68k.org
--- Comment #3 from Richard Z. rz@linux-m68k.org --- the same results here with an older version of wine, setup.exe 2.880, 32bit. Setup works with some workarounds, all postinstall scripts fail with page exceptions and nothing seems to work.
https://www.mail-archive.com/cygwin@cygwin.com/msg153401.html
Similar with yet another version of wine, 64bit and some debugging info attached: https://www.mail-archive.com/cygwin@cygwin.com/msg153408.html
https://bugs.winehq.org/show_bug.cgi?id=40528
Angus Gratton gus@projectgus.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gus@projectgus.com
--- Comment #4 from Angus Gratton gus@projectgus.com --- Found this issue while trying to run MSYS2 (which uses Cygwin) on wine-staging 2.15.
There's a matching MSYS2 bug here: https://github.com/Alexpux/MSYS2-packages/issues/682
From reading through that, I understand the problem to be:
- Cygwin 2.6 removed support for Windows XP. - That included a patch which removed pre-Vista fallback behaviour for computing a FAST_CWD structure[1]. - On Wine, Cygwin happened to be using that fallback behaviour for FAST_CWD, as Cygwin's find_fast_cwd_pointer() seems to always fail[2] under wine.
So, currently Wine can't run Cygwin 2.6 or newer.
[1] https://cygwin.com/ml/cygwin-cvs/2016-q2/msg00099.html [2] https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=winsup/cy...
https://bugs.winehq.org/show_bug.cgi?id=40528
--- Comment #5 from Nikolay Sivov bunglehead@gmail.com --- (In reply to Angus Gratton from comment #4)
Found this issue while trying to run MSYS2 (which uses Cygwin) on wine-staging 2.15.
There's a matching MSYS2 bug here: https://github.com/Alexpux/MSYS2-packages/issues/682
From reading through that, I understand the problem to be:
- Cygwin 2.6 removed support for Windows XP.
- That included a patch which removed pre-Vista fallback behaviour for
computing a FAST_CWD structure[1].
- On Wine, Cygwin happened to be using that fallback behaviour for FAST_CWD,
as Cygwin's find_fast_cwd_pointer() seems to always fail[2] under wine.
So, currently Wine can't run Cygwin 2.6 or newer.
[1] https://cygwin.com/ml/cygwin-cvs/2016-q2/msg00099.html [2] https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=winsup/ cygwin/path.cc;h=475c99599a19689bd67f8b81f91ce70f79d7666e;hb=HEAD#l4277
It's not surprising it doesn't work as they are expecting exact opcode sequence for some ntdll exports. We can't do that, maybe someone interested could convince them to add back fallback logic if only for Wine.
https://bugs.winehq.org/show_bug.cgi?id=40528
--- Comment #6 from Angus Gratton gus@projectgus.com ---
It's not surprising it doesn't work as they are expecting exact opcode sequence for some ntdll exports. We can't do that, maybe someone interested could convince them to add back fallback logic if only for Wine.
Yes, sorry - I posted that comment and then read find_fast_fwd_pointer()'s source and realised the same.
There is actually some existing fallback logic if that fails: https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=winsup/cy...
I think the current crash may happen when Cygwin calls RtlEnterCriticalSection (peb.FastPebLock);, as wine doesn't set this field and calls RtlAcquirePebLock() instead (which uses a static variable). I don't know if that's the only thing that's different, though...
https://bugs.winehq.org/show_bug.cgi?id=40528
Andrey andrey.gursky@e-mail.ua changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andrey.gursky@e-mail.ua
https://bugs.winehq.org/show_bug.cgi?id=40528
--- Comment #7 from Nikolay Sivov bunglehead@gmail.com --- (In reply to Angus Gratton from comment #6)
I think the current crash may happen when Cygwin calls RtlEnterCriticalSection (peb.FastPebLock);, as wine doesn't set this field and calls RtlAcquirePebLock() instead (which uses a static variable). I don't know if that's the only thing that's different, though...
Please retest with wine 2.16, looks like commit b31583770f074ca343e00f6c2be19b831d6ad90e is relevant.
https://bugs.winehq.org/show_bug.cgi?id=40528
Vladimir Panteleev wine@thecybershadow.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine@thecybershadow.net
--- Comment #8 from Vladimir Panteleev wine@thecybershadow.net --- (In reply to Nikolay Sivov from comment #7)
Please retest with wine 2.16, looks like commit b31583770f074ca343e00f6c2be19b831d6ad90e is relevant.
On wine 2.19 (as well as wine-staging 2.19) I am getting a page fault after a long delay when any cygwin executable is ran (which also occurs as the final stage of the initial setup):
Unhandled exception: page fault on read access to 0x00000001 in 32-bit code (0x610a38c2).
Full log: https://dump.thecybershadow.net/1f269ed24a3aff544c04e09ff2f2fbc8/backtrace.t...
https://bugs.winehq.org/show_bug.cgi?id=40528
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |badkins79@msn.com
--- Comment #9 from Zebediah Figura z.figura12@gmail.com --- *** Bug 40309 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=40528
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kai.extern+winehq@gmail.com
--- Comment #10 from Zebediah Figura z.figura12@gmail.com --- *** Bug 41824 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=40528
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #11 from Zebediah Figura z.figura12@gmail.com --- Created attachment 60628 --> https://bugs.winehq.org/attachment.cgi?id=60628 ugly hack
I've attached a rather ugly hack that prevents this first crash, after which the crash from the original report seems to show up.
https://bugs.winehq.org/show_bug.cgi?id=40528
Paul "TBBle" Hampson Paul.Hampson@Pobox.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Paul.Hampson@Pobox.com
--- Comment #12 from Paul "TBBle" Hampson Paul.Hampson@Pobox.com --- I've been looking into this from the MSYS2 side, which also uses Cygwin, and it appears to be a Cygwin bug, making assumptions about an internal data structure dubbed FAST_CWD, which Wine does not use.
My analysis is at https://github.com/Alexpux/MSYS2-packages/issues/682#issuecomment-384215617 and the Cygwin fixes are patches 0025 and 0026 at https://github.com/TBBle/MSYS2-packages/tree/msys2-runtime-wine-cwd-support/....
However, the Cygwin-based system hit other issues that may or may not be related, after the crash/error reported here was resolved.
A different issue has arising in the meantime somewhere between Wine 2.4 and Wine 3.6 which breaks even the otherwise-working (old) Cygwin release, as mentioned in the 'fourth edit' of https://github.com/Alexpux/MSYS2-packages/issues/682#issuecomment-385144098.
*That* one is probably a Wine issue to be fixed, but should be ticketed separately as I suspect it will reproduce with a more-minimal test than Cygwin.
https://bugs.winehq.org/show_bug.cgi?id=40528
--- Comment #13 from Paul "TBBle" Hampson Paul.Hampson@Pobox.com --- I logged the current error with post-2.4.0 Wine Staging as bug 45081. I suspect there are other Cygwin or Wine problems to be fixed, but I don't have a vanilla Wine setup handy (working off Docker containers on Windows), so I'm basically blocked on researching/resolving those by not knowing if I'm bouncing off since-fixed issues.
https://bugs.winehq.org/show_bug.cgi?id=40528
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |NOTOURBUG Status|UNCONFIRMED |RESOLVED
--- Comment #14 from Zebediah Figura z.figura12@gmail.com --- (In reply to Paul "TBBle" Hampson from comment #12)
I've been looking into this from the MSYS2 side, which also uses Cygwin, and it appears to be a Cygwin bug, making assumptions about an internal data structure dubbed FAST_CWD, which Wine does not use.
My analysis is at https://github.com/Alexpux/MSYS2-packages/issues/682#issuecomment-384215617 and the Cygwin fixes are patches 0025 and 0026 at https://github.com/TBBle/MSYS2-packages/tree/msys2-runtime-wine-cwd-support/ msys2-runtime.
Thanks for the work. I'm resolving this as upstream; please keep us posted.
https://bugs.winehq.org/show_bug.cgi?id=40528
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #15 from Austin English austinenglish@gmail.com --- Closing.
https://bugs.winehq.org/show_bug.cgi?id=40528
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |RESOLVED
--- Comment #16 from Austin English austinenglish@gmail.com --- This was inadvertently caught up in my unclosed bugs filter. NOTOURBUG should only be closed when fixed upstream.
Setting back to RESOLVED NOTOURBUG.
Sorry for the spam.
https://bugs.winehq.org/show_bug.cgi?id=40528
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Cygwin installs (with |Cygwin and MSYS2 fail to |errors) but doesn't work at |install (page fault on read |all |access to 0x00000001; use | |of Windows internal | |FAST_CWD structure)
https://bugs.winehq.org/show_bug.cgi?id=40528
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |megastallman@gmail.com
--- Comment #17 from Zebediah Figura z.figura12@gmail.com --- *** Bug 48882 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=40528
Roman Pišl rpisl@seznam.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rpisl@seznam.cz
https://bugs.winehq.org/show_bug.cgi?id=40528
--- Comment #18 from megastallman megastallman@gmail.com --- Hi guys!
Been able to reproduce the bug with Cygwin, Msys2 and Git-bash. All are Cygwin-based.
002b:fixme:netapi32:NetUserGetInfo Only implemented for local computer, but remote serverL"\\@" was requested. Cygwin WARNING: Couldn't compute FAST_CWD pointer. This typically occurs if you're using an older Cygwin version on a newer Windows. Please update to the latest available Cygwin version from https://cygwin.com/. If the problem persists, please see https://cygwin.com/problems.html
and
Running wine-5.5. Trying to run: wine .wine/drive_c/cygwin/bin/bash.exe getting: Cygwin WARNING: Couldn't compute FAST_CWD pointer. This typically occurs if you're using an older Cygwin version on a newer Windows. Please update to the latest available Cygwin version from https://cygwin.com/. If the problem persists, please see https://cygwin.com/problems.html
And nothing works. No shell, terminal hangs and needs "reset". The Cygwin version - is the latest.
As I see, the staff is broken again in new versions of Cygwin.
https://bugs.winehq.org/show_bug.cgi?id=40528
AlexDeLorenzo.dev rare_energy@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rare_energy@protonmail.com
--- Comment #19 from AlexDeLorenzo.dev rare_energy@protonmail.com --- Like Lam, I run into this error trying to run any Cygwin binary with Wine 64bit in Windows 10 mode. I've tried Ubuntu Focal's wine-stable, wine-staging, and wine-development. I also tried packages from WineHQ's repos without success.
$ wine wc.exe Cygwin WARNING: Couldn't compute FAST_CWD pointer. This typically occurs if you're using an older Cygwin version on a newer Windows. Please update to the latest available Cygwin version from https://cygwin.com/. If the problem persists, please see https://cygwin.com/problems.html
/usr/bin/wc: failed to set file descriptor text/binary mode: Bad file descriptor
https://bugs.winehq.org/show_bug.cgi?id=40528
--- Comment #20 from megastallman megastallman@gmail.com --- Hi Alex De Lorenzo!
Please take a look here: https://bugs.winehq.org/show_bug.cgi?id=48891
You can use Dmitry's patch for the latest Wine_Stable. It is not upstreamed yet. Only Cygwin with a patched Wine Stable work. None of other combinations do.
Wine Staging just breaks, MinGW2 has different errors.
https://bugs.winehq.org/show_bug.cgi?id=40528
--- Comment #21 from AlexDeLorenzo.dev rare_energy@protonmail.com --- (In reply to megastallman from comment #20)
Hi Alex De Lorenzo!
Please take a look here: https://bugs.winehq.org/show_bug.cgi?id=48891
You can use Dmitry's patch for the latest Wine_Stable. It is not upstreamed yet. Only Cygwin with a patched Wine Stable work. None of other combinations do.
Wine Staging just breaks, MinGW2 has different errors.
Thanks for the help! I'll give the patch a try.
https://bugs.winehq.org/show_bug.cgi?id=40528
Jinoh Kang jinoh.kang.kr@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jinoh.kang.kr@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=40528
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #22 from Fabian Maurer dark.shadow4@web.de --- Any news / workarounds on this? AFAIK, nothing has changed in Cygwin/MSYS2.
https://bugs.winehq.org/show_bug.cgi?id=40528
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |virtualreal@gmail.com
--- Comment #23 from Fabian Maurer dark.shadow4@web.de --- *** Bug 51605 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=40528
Joel Holdsworth joel@airwebreathe.org.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |joel@airwebreathe.org.uk
https://bugs.winehq.org/show_bug.cgi?id=40528
Yonggang Luo luoyonggang@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |luoyonggang@gmail.com
--- Comment #24 from Yonggang Luo luoyonggang@gmail.com --- With wine-8.9, the issue still present, I think this should not mark as NOTOURBUG
https://bugs.winehq.org/show_bug.cgi?id=40528
--- Comment #25 from Paul "TBBle" Hampson Paul.Hampson@Pobox.com --- NOTOURBUG makes sense to me. I don't think the Wine Windows API implementation can be reasonably expected to offer random internal windows structures for direct manipulation.
Last time I looked, Cygwin was correctly, but noisily, detecting that it can't find such a structure, which is fine. However, its fallback code was also assuming such a structure existed, and using an even-more-Windows-internal method of trying to get the structure to exist, which happened to crash because it the directly accessed another Windows-internal structure (that Wine doesn't populate) instead of going through the relevant API call.
The warning including "New Windows releases might break this" is a good sign that it's a Cygwin-side thing.
https://bugs.winehq.org/show_bug.cgi?id=40528
--- Comment #26 from Yonggang Luo luoyonggang@gmail.com --- But I can not running pacman in msys2
``` wine ./msys64/usr/bin/pacman.exe -S mingw-w64-x86_64-winpthreads-git 0024:fixme:ntdll:NtSetInformationToken unimplemented class 4 0024:fixme:virtual:get_extended_params Not supported requirements LowestStartingAddress 0x600000000, Alignment 0x100000. 0024:fixme:security:GetWindowsAccountDomainSid (000000007FCFC2A0 000000000033A428 000000007FCFC29C): semi-stub 0024:fixme:netapi32:DsEnumerateDomainTrustsW ((null), 0x0023, 000000007FCFC368, 000000007FCFC354): stub 004c:fixme:wldap32:ldap_set_optionA Unsupported option: 0x95 004c:fixme:wldap32:ldap_set_optionA Unsupported option: 0x96 0024:fixme:netapi32:NetUserGetInfo Only implemented for local computer, but remote serverL"\\@" was requested. Cygwin WARNING: Couldn't compute FAST_CWD pointer. This typically occurs if you're using an older Cygwin version on a newer Windows. Please update to the latest available Cygwin version from https://cygwin.com/. If the problem persists, please see https://cygwin.com/problems.html
0024:fixme:netapi32:NetLocalGroupGetInfo ((null) L"Administrators" 1 000000007FCFC3E0) semi-stub! 0024:fixme:netapi32:NetLocalGroupGetInfo ((null) L"Users" 1 000000007FCFC3E0) semi-stub! 0054:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002 0054:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002 0054:err:ole:apartment_get_local_server_stream Failed: 0x80004002 warning: Public keyring not found; have you run 'pacman-key --init'? 004c:fixme:sync:NtQueryDirectoryObject multiple entries not implemented 004c:fixme:sync:NtQueryDirectoryObject multiple entries not implemented 004c:fixme:sync:NtQueryDirectoryObject multiple entries not implemented 004c:fixme:sync:NtQueryDirectoryObject multiple entries not implemented 004c:fixme:sync:NtQueryDirectoryObject multiple entries not implemented 004c:fixme:sync:NtQueryDirectoryObject multiple entries not implemented 004c:fixme:sync:NtQueryDirectoryObject multiple entries not implemented 004c:fixme:sync:NtQueryDirectoryObject multiple entries not implemented ``` How to deal with this issue :(
https://bugs.winehq.org/show_bug.cgi?id=40528
--- Comment #27 from Joel Holdsworth joel@airwebreathe.org.uk --- That issue is being tracker here:
https://bugs.winehq.org/show_bug.cgi?id=52585
There is still a variety of problems affecting Msys2 which I and Bernhard Übelacker have been occasionally working on over the past 12-months. Bernhard has a branch collecting all the patches together here:
https://gitlab.winehq.org/bernhardu/wine/-/commits/msys-dev