[Bug 50905] New: Wine fails to execute native binaries
https://bugs.winehq.org/show_bug.cgi?id=50905 Bug ID: 50905 Summary: Wine fails to execute native binaries Product: Wine Version: 6.5 Hardware: x86-64 OS: Linux Status: NEW Keywords: regression Severity: major Priority: P2 Component: ntdll Assignee: wine-bugs(a)winehq.org Reporter: dmitry(a)baikal.ru CC: julliard(a)winehq.org Regression SHA1: 42de71c38780931c510ada6d7ee8681c99bbc60b Distribution: --- Today's winehq.git fails to run pretty much everything from existing Wine prefixes where a Wine stub placeholder DLL is missing. The regression is caused by 42de71c38780931c510ada6d7ee8681c99bbc60b is the first bad commit commit 42de71c38780931c510ada6d7ee8681c99bbc60b Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 31 10:19:10 2021 +0200 ntdll: Fail to load non-existent dlls, except during prefix bootstrap. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> dlls/kernel32/tests/module.c | 6 +++--- dlls/ntdll/loader.c | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) -- 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=50905 --- Comment #1 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- Updating such a prefix is also impossible: $ WINEPREFIX=~/.wine-old wine wineboot --update 002c:err:module:import_dll Library sechost.dll (which is needed by L"C:\\windows\\system32\\advapi32.dll") not found 002c:err:module:import_dll Library advapi32.dll (which is needed by L"C:\\windows\\system32\\wineboot.exe") not found 002c:err:module:LdrInitializeThunk Importing dlls for L"C:\\windows\\system32\\wineboot.exe" failed, status c0000135 -- 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=50905 Dmitry Timoshkov <dmitry(a)baikal.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Wine fails to execute |Wine fails to execute |native binaries |binaries if a dependent | |placeholder DLL in | |C:\windows\system32 is | |missing -- 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=50905 --- Comment #2 from Alexandre Julliard <julliard(a)winehq.org> --- You can remove the ntdll placeholder to force a prefix update. Ultimately the goal is to make builtin behave more like native, so removing dlls will break things, just like on Windows. -- 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=50905 --- Comment #3 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- (In reply to Alexandre Julliard from comment #2)
You can remove the ntdll placeholder to force a prefix update. Ultimately the goal is to make builtin behave more like native, so removing dlls will break things, just like on Windows.
I'm afraid that's not always possible for existing prefixes, especially on a client site in a production environment. -- 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=50905 --- Comment #4 from Alexandre Julliard <julliard(a)winehq.org> --- The heuristic could be tweaked to check for missing sechost.dll, since that was added recently. -- 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=50905 --- Comment #5 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- (In reply to Alexandre Julliard from comment #4)
The heuristic could be tweaked to check for missing sechost.dll, since that was added recently.
Why not always try a built-in if the placeholder is missing? -- 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=50905 --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> --- Because we don't want to pretend that files exist when they don't. Some apps don't expect missing files to magically load, or to not find the backing file for a loaded dll. It also revealed quite a few bugs in Wine itself. -- 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=50905 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download -- 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=50905 --- Comment #7 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- Probably I should also note, that this commit breaks for instance 'winetricks vcrun2015' because winetricks removes c:\windows\system32\ucrtbase.dll before running the installer, which also completely obliterates the whole Wine prefix, leading to inability to run anything from it. The only "cure" is to remove ntdll.dll pretending that the prefix is "new", however after that the prefix won't update itself, and ntdll.dll is not gets re-created. -- 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=50905 --- Comment #8 from Alexandre Julliard <julliard(a)winehq.org> --- This is now done through a WINEBOOTSTRAPMODE environment variable. It's set when running wineboot, but it can also be set manually if necessary. This should solve the issue with old prefixes. It's still possible to break a prefix by removing core dlls, but hopefully this will make it easier to recover. -- 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=50905 Dmitry Timoshkov <dmitry(a)baikal.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Fixed by SHA1| |446f7e3aa8a906c9213d92f1572 | |e8373286c543a Resolution|--- |FIXED --- Comment #9 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- (In reply to Alexandre Julliard from comment #8)
This is now done through a WINEBOOTSTRAPMODE environment variable. It's set when running wineboot, but it can also be set manually if necessary. This should solve the issue with old prefixes. It's still possible to break a prefix by removing core dlls, but hopefully this will make it easier to recover.
Thanks Alexandre, let's mark this bug as resolved then. When other issues arise (especially with winetricks) they could be opened as separate bug reports. -- 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=50905 --- Comment #10 from Gijs Vermeulen <gijsvrm(a)gmail.com> --- (In reply to Dmitry Timoshkov from comment #7)
Probably I should also note, that this commit breaks for instance 'winetricks vcrun2015' because winetricks removes c:\windows\system32\ucrtbase.dll before running the installer, which also completely obliterates the whole Wine prefix, leading to inability to run anything from it. The only "cure" is to remove ntdll.dll pretending that the prefix is "new", however after that the prefix won't update itself, and ntdll.dll is not gets re-created.
Just as an aside, I worked around this by manually extracting ucrtbase from the installer instead of removing it. [1] [1] https://github.com/Winetricks/winetricks/commit/9cf961c468676bfb58408dd63544... -- 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=50905 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #11 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 6.6. -- 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=50905 Vitaly Lipatov <lav(a)etersoft.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lav(a)etersoft.ru -- 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 (1)
-
WineHQ Bugzilla