https://bugs.winehq.org/show_bug.cgi?id=43193
Bug ID: 43193 Summary: MinGW-w64 GUI installer fails 66 per cent through its file-installation page. Product: Wine-staging Version: 2.10 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: critical Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: irwin@beluga.phys.uvic.ca CC: erich.e.hoover@wine-staging.com, michael@fds-team.de, sebastian@fds-team.de Distribution: ---
My platform is Debian Jessie, and I am using the WineHQ repository for that distro following the advice at https://wine-staging.com/installation.html. I installed the latest version (2.10) of winehq-staging and set the environment variables
export WINEVERSION=2.10_jessie_wine_staging export WINEPREFIX=/home/wine/wine_staging/.wine-$WINEVERSION export WINEDEBUG='fixme-all'
and ran
winecfg
taking defaults for everything. Then
wine@raven> wine --version wine-2.10 (Staging)
wineserver -p
nice -19 wine msys2-x86_64-20161025.exe
Welcome screen, set prefix (added date string to default location), start menu shortcuts left as they were, then install page went to the 66 per cent level and then generated a Program Error GUI box with the message
The program bash.exe has encountered a serious error and needs to close. We are sorry for the inconvenience.
Program error details page on GUI was empty.
stderr (or stdout) had the following messages on the konsole instance I was running:
err:ole:CoCreateInstanceEx apartment not initialised err:ole:CoCreateInstanceEx apartment not initialised err:ole:CoCreateInstanceEx apartment not initialised wine: Unhandled page fault on read access to 0x00000020 at address 0x7bc4b478 (thread 0045), starting debugger...
The installer GUI details showed the install failed (at the ~66 per cent mark) while installing nansi.sys. This is definitely a wine-staging bug because the equivalent experiment with vanilla wine-2.10 (obtained by purging winehq-staging and installing winehq-devel) had no troubles with that install page of the GUI (although the above "apartment" warnings were produced), but failed in other ways on the final page of that GUI. Note it is likely this current wine-staging bug with the initial file installation has been introduced in the past year since https://github.com/TeaCI/tea-ci/wiki/Msys2-on-Wine implies MSYS2 works on Wine-staging, and that page was last updated in July last year.
However, introduction of this wine-staging bug is not extremely recent because I replicated this bug also for wine-staging 2.4 (the earliest version [released March 2017] currently available for the winehq Debian Jessie repository.
https://bugs.winehq.org/show_bug.cgi?id=43193
--- Comment #1 from Alan W. Irwin irwin@beluga.phys.uvic.ca --- I should have added, you can obtain msys2-x86_64-20161025.exe, the 64-bit GUI installer for MSYS2 by following the 64-bit link at https://github.com/msys2/msys2/wiki/MSYS2-installation.
https://bugs.winehq.org/show_bug.cgi?id=43193
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |normal Keywords| |download
--- Comment #2 from Austin English austinenglish@gmail.com --- Not critical. Please attach the output and backtrace without setting WINEDEBUG
https://bugs.winehq.org/show_bug.cgi?id=43193
--- Comment #3 from Alan W. Irwin irwin@beluga.phys.uvic.ca --- As requested I dropped setting WINDEBUG, and I reran the example as follows: wine@raven> wineserver -k wine@raven> wineserver -p wine@raven> wine64 msys2-x86_64-20161025.exe fixme:winediag:start_process Wine Staging 2.10 is a testing version containing experimental patches. fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org. fixme:toolhelp:CreateToolhelp32Snapshot Unimplemented: heap list snapshot fixme:toolhelp:Heap32ListFirst : stub fixme:nls:get_dummy_preferred_ui_language (0x8 0x32ee08 0x32ee40 0x32ee0c) returning a dummy value (current locale) fixme:file:FindFirstFileExW flags not implemented 0x00000002 fixme:explorerframe:taskbar_list_SetProgressValue iface 0x5d520, hwnd 0x10076, ullCompleted 64, ullTotal 64 stub! fixme:explorerframe:taskbar_list_SetProgressState iface 0x5d520, hwnd 0x10076, flags 0 stub! fixme:explorerframe:taskbar_list_SetOverlayIcon iface 0x5d520, hwnd 0x10076, hIcon (nil), pszDescription (null) stub! fixme:nls:get_dummy_preferred_ui_language (0x8 0x329748 0x329780 0x32974c) returning a dummy value (current locale) fixme:nls:get_dummy_preferred_ui_language (0x8 0x329748 0x329780 0x32974c) returning a dummy value (current locale) fixme:explorerframe:taskbar_list_SetOverlayIcon iface 0x58f50, hwnd 0x10076, hIcon (nil), pszDescription (null) stub! err:ole:CoCreateInstanceEx apartment not initialised fixme:shell:IShellLinkW_fnGetPath (0x927e0): WIN32_FIND_DATA is not yet filled. err:ole:CoCreateInstanceEx apartment not initialised fixme:shell:IShellLinkW_fnGetPath (0x927b0): WIN32_FIND_DATA is not yet filled. err:ole:CoCreateInstanceEx apartment not initialised fixme:shell:IShellLinkW_fnGetPath (0x927b0): WIN32_FIND_DATA is not yet filled. fixme:ntdll:NtSetInformationToken unimplemented class 4 fixme:ntdll:NtQueryInformationProcess (process=0xffffffffffffffff) Unimplemented information class: ProcessSessionInformation fixme:netapi32:NetUserGetInfo Level 3 is not implemented fixme:thread:create_user_shared_data_thread Creating user shared data update thread. wine: Unhandled page fault on read access to 0x00000020 at address 0x7bc4b478 (thread 0047), starting debugger... fixme:wscript:set_host_properties ignored L"nologo" switch fixme:wscript:set_host_properties ignored L"nologo" switch fixme:vbscript:VBScript_SetScriptState unimplemented SCRIPTSTATE_INITIALIZED fixme:vbscript:VBScript_SetScriptState unimplemented SCRIPTSTATE_INITIALIZED fixme:scrrun:filesys_MoveFile 0x7f018a1ce8b8 L"C:\msys64_20170619_a\maintenancetool.dat.new" L"C:\msys64_20170619_a\maintenancetool.dat" fixme:scrrun:filesys_MoveFile 0x7fd8d28e38b8 L"C:\msys64_20170619_a\maintenancetool.exe.new" L"C:\msys64_20170619_a\maintenancetool.exe"
After that "starting debug" message, I got the bash.exe popup as previously described. When I closed that popup GUI (the only option it gave me) bash.exe appeared to be hung (I let it run for ~10 minutes without any further download progress). After I killed that bash.exe from Linux, the GUI immediately finished the download page and immediately went to the final page (which presumably left 33 per cent of the files not installed). After that I unchecked the "run msys2" box and exited normally from the GUI. I have not attached a backtrace because I don't know how to generate one for the bash.exe instance which generated that popup and which is the primary cause of this wine-staging issue with the MinGW-w64/MSYS2 installer GUI page wnich downloads and installs files.
https://bugs.winehq.org/show_bug.cgi?id=43193
--- Comment #4 from Alan W. Irwin irwin@beluga.phys.uvic.ca --- Correction to the following statement in my initial report: "This is definitely a wine-staging bug because the equivalent experiment with vanilla wine-2.10 (obtained by purging winehq-staging and installing winehq-devel) had no troubles with that install page of the GUI (although the above "apartment" warnings were produced), but failed in other ways on the final page of that GUI."
Since making that statement I investigated further with vanilla wine-2.10 and at the 66 per cent mark on the download page of the GUI, there is a stack overflow error, and immediately on that error the GUI moves to the final page which generates additional stack overflow errors unless you uncheck the "launch msys2" box there. So the revised conclusion is that both vanilla wine and wine-staging encounter the same error at the 66 per mark, report that error in different ways, but the effect is the same if you respond to the staging error by killing bash.exe.
https://bugs.winehq.org/show_bug.cgi?id=43193
Andrey andrey.gursky@e-mail.ua changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andrey.gursky@e-mail.ua
https://bugs.winehq.org/show_bug.cgi?id=43193
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #5 from Dan Kegel dank@kegel.com --- Running msys2-x86_64-20180531.exe on ubuntu 18.04 with winehq-staging 4.7~bionic, winehq-devel 4.7, or winehq-stable 4.0~bionic in a clean .wine directory hangs while installing terminfo entry for nansi.sys.
Because it now happens in plain wine, the product should probably be changed to Wine.
There's no error dialog. The hang is at 66%; just as the hang is about to happen, the following messages show up on the log:
0071:err:ole:CoCreateInstanceEx apartment not initialised 0071:err:ole:CoCreateInstanceEx apartment not initialised 0071:err:ole:CoCreateInstanceEx apartment not initialised 0081:fixme:ntdll:NtSetInformationToken unimplemented class 4 0081:fixme:advapi:LsaOpenPolicy ((null),0x1802caf80,0x00000001,0xffffc198) stub 0081:fixme:advapi:GetWindowsAccountDomainSid (0xffffc0d0 0x643a8 0xffffc0c8): semi-stub 0081:fixme:advapi:LsaClose (0xcafe) stub 0081:fixme:netapi32:DsEnumerateDomainTrustsW ((null), 0x0023, 0xffffc228, 0xffffc214): stub 0084:fixme:wldap32:ldap_set_optionA Unsupported option: 0x95 ... 0084:fixme:wldap32:ldap_set_optionA Unsupported option: 0x96 0081:fixme:netapi32:NetLocalGroupGetInfo ((null) L"Administrators" 1 0xffffc470) semi-stub! 0081:fixme:advapi:LsaOpenPolicy ((null),0x1802caf80,0x00000800,0xffffc958) stub 0081:fixme:advapi:LsaClose (0xcafe) stub 0081:fixme:netapi32:NetLocalGroupGetInfo ((null) L"Users" 1 0xffffc390) semi-stub! 0081:err:seh:setup_exception stack overflow 2640 bytes in thread 0081 eip 000000007bc99559 esp 00000000ffe00bc0 stack 0xffe00000-0xffe01000-0x100000000
Amusingly, nansi.sys is an ms-dos device driver I wrote circa 1986 :-)
https://bugs.winehq.org/show_bug.cgi?id=43193
--- Comment #6 from Dan Kegel dank@kegel.com --- +relay shows it's trying to do something with pipes.
grep CreateFile on the +relay log shows
0030:Call KERNEL32.CreateFileW(071997c0 L"C:/msys64/usr/share/terminfo/6e/nansi.sys",40000000,00000000,00000000,00000003,00000080,00000000) ret=00526812 0030:Ret KERNEL32.CreateFileW() retval=0000013c ret=00526812 002b:Call KERNEL32.CreateFileW(07182e48 L"\\.\pipe\{864f5d44-2139-4170-b7e6-2d379d479040}",c0000000,00000000,00000000,7f8400000003,40000000,00000000) ret=010304d0 002b:Ret KERNEL32.CreateFileW() retval=ffffffffffffffff ret=010304d0 002f:Call KERNEL32.CreateFileW(07183018 L"\\?\C:\users\dank\Start Menu\Programs\MSYS2 64bit\MSYS2 MinGW 32-bit.lnk",80000000,00000001,00000000,00000003,00000000,00000000) ret=7f84ada81fc5 002f:Ret KERNEL32.CreateFileW() retval=00000130 ret=7f84ada81fc5 ... 003d:Call KERNEL32.CreateFileW(0023d640 L"C:\msys64\msys2_shell.cmd",80000000,00000003,00000000,00000003,00000000,00000000) ret=7f2856508fc5 003d:Ret KERNEL32.CreateFileW() retval=00000054 ret=7f2856508fc5 003f:Call KERNEL32.CreateFileW(600010038 L"\\.\pipe\msys-dd50a72ab4668b33-lpc",c0000000,00000003,180275ec0,100000003,2020202000020000,00000000) ret=180165330 003f:Ret KERNEL32.CreateFileW() retval=ffffffffffffffff ret=180165330 ... 003f:Call KERNEL32.CreateFileA(ffffb810 "\\.\pipe\msys-dd50a72ab4668b33-62-pipe-0x1",40000080,00000000,180275f20,00000003,7f3440000000,00000000) ret=1800eff49 003f:Ret KERNEL32.CreateFileA() retval=00000110 ret=1800eff49 002b:Call KERNEL32.CreateFileW(07180378 L"\\.\pipe\{864f5d44-2139-4170-b7e6-2d379d479040}",c0000000,00000000,00000000,7f8400000003,40000000,00000000) ret=010304d0 002b:Ret KERNEL32.CreateFileW() retval=ffffffffffffffff ret=010304d0 002b:Call KERNEL32.CreateFileW(07180378 L"\\.\pipe\{864f5d44-2139-4170-b7e6-2d379d479040}",c0000000,00000000,00000000,7f8400000003,40000000,00000000) ret=010304d0 002b:Ret KERNEL32.CreateFileW() retval=ffffffffffffffff ret=010304d0 ...
Looks like it's in their fork of cygwin.
https://bugs.winehq.org/show_bug.cgi?id=43193
--- Comment #7 from Austin English austinenglish@gmail.com --- (In reply to Dan Kegel from comment #5)
Amusingly, nansi.sys is an ms-dos device driver I wrote circa 1986 :-)
And you have the source available: http://www.kegel.com/nansi/
https://bugs.winehq.org/show_bug.cgi?id=43193
--- Comment #8 from Dan Kegel dank@kegel.com --- That I do. They're not installing nansi, though, just the terminfo entry for it (though it's hard to imagine anyone but freedos still uses nansi).
https://bugs.winehq.org/show_bug.cgi?id=43193
Andrew awkravchuk@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |awkravchuk@gmail.com
--- Comment #9 from Andrew awkravchuk@gmail.com --- I'm also affected by this bug on vanilla Wine 4.0.1 on Gentoo Linux. After 66% the latest version of MSYS2 installer (msys2-x86_64-20190524.exe) puts in log
006b:err:seh:setup_exception stack overflow 2544 bytes in thread 006b eip 000000007bc9fff1 esp 00000000ffe00c20 stack 0xffe00000-0xffe01000-0x100000000
and stucks.
https://bugs.winehq.org/show_bug.cgi?id=43193
Joel Holdsworth joel@airwebreathe.org.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |joel@airwebreathe.org.uk
https://bugs.winehq.org/show_bug.cgi?id=43193
--- Comment #10 from Joel Holdsworth joel@airwebreathe.org.uk --- This issue is caused by at least 3 other bugs: #47808, #52105 and #52105. I have collected together and rebased the hacks and patches from these bug reports here:
https://github.com/jhol/wine/commits/msys2-hacks
If we run the installer in CLI mode:
$ wine64 msys2-x86_64-20220603.exe in com.msys2.root -t 'c:\msys64' --am
...the log contains the following:
---------------------------------------------- [213] Installation space required: "527.19 MB" Temporary space required: "256.00 MB" Local repository size: "0.00 bytes" 0058:fixme:mountmgr:harddisk_query_volume Unsupported volume query 3 0058:fixme:mountmgr:harddisk_query_volume Unsupported volume query 3 0058:fixme:mountmgr:harddisk_query_volume Unsupported volume query 3 0058:fixme:mountmgr:harddisk_query_volume Unsupported volume query 3 0058:fixme:mountmgr:harddisk_query_volume Unsupported volume query 3 0058:fixme:mountmgr:harddisk_query_volume Unsupported volume query 3 [285] Cannot determine available space on device. Volume descriptor: "\\?\Volume{00000000-0000-0000-0000-000000000043}\", Mount path: "C:\". Contin ue silently. [353] [356] Do you want to continue? [369] Yes|No ----------------------------------------------
There is a problem querying disk space. We must type "yes" to dismiss the warning.
Now we can see the packages files unpacked correctly, but it gets stuck running the post-install commands - specifically "C:/msys64\usr\bin\bash.exe --login -c exit" gets stuck.
When running bash.exe directly we get a seg-fault. This is a manifestation of #47808, and can be avoided with Bernhard Übelacker's hacks:
* https://github.com/jhol/wine/commit/c9b9fe7d8949fae91b6a5696bf256d0e01c0a17d * https://github.com/jhol/wine/commit/dba30c1c440351a01c5a805a3b7f1babf6236aa2
With these patches applied, bash.exe hangs due to #52105 and can be avoided with these hacks:
* https://github.com/jhol/wine/commit/4bcf28f39f58a0da2e1d7fbf978785ddfeb0d8be * https://github.com/jhol/wine/commit/7fb64f1029d96497b8dfa781253b52cdd7d550cb
The bash commands now runs as intended - it runs through the varous scripts in "C:\msys64\etc\post-install", but just at the point of completion this message is emitted:
0024:fixme:sync:NtQueryDirectoryObject multiple entries not implemented
This is a manifestation of #52105, and causes the installer to get stuck, and can be patched with these patches:
* https://github.com/jhol/wine/commit/fe909e83de89d3e8dcab3b153382c1b5b2d88707 * https://github.com/jhol/wine/commit/13bd80a6d31b51aa236e8844e2e0fe56ae0790f5
The installer now completes both in CLI mode, and we can start using bash.exe interactively.
Unfortunately, there is still a crash bug which prevents GUI mode from installing correctly.
https://bugs.winehq.org/show_bug.cgi?id=43193
--- Comment #11 from Joel Holdsworth joel@airwebreathe.org.uk --- Just retested on wine-7.15-110-g2abb2f70aa1, with the patches rebased: https://github.com/jhol/wine/commits/msys2-hacks-2
The impact of issues relating to #47808 seems to have changed. If we exclude Bernhard Übelacker's hacks, we don't get a seg-fault any more, but the bash command now fails gracefully causing the installer to retry in an infinite loop.
https://bugs.winehq.org/show_bug.cgi?id=43193
--- Comment #12 from Joel Holdsworth joel@airwebreathe.org.uk --- Here is a new hacks branch rebased on master:
https://github.com/jhol/wine/tree/msys2-hacks-4
The branch contains all the above mentioned patches from Jacek Caban, Bernhard Übelacker, Zebediah Figura, Jinoh Kang, and now includes fixes from myself, which addresses an issue with NT-style GUID volume paths: https://bugs.winehq.org/show_bug.cgi?id=53547
With all these patches applied, the installer is able to complete in either GUI or CLI modes.