https://bugs.winehq.org/show_bug.cgi?id=53103
Bug ID: 53103 Summary: ie8 doesn't start (race condition) Product: Wine Version: 7.5 Hardware: x86-64 OS: Linux Status: NEW Keywords: download, regression Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: austinenglish@gmail.com CC: eric.pouech@orange.fr, jacek@codeweavers.com Regression SHA1: f034084d49b354811096524d472ae5172ac1cebf Distribution: Debian
Created attachment 72538 --> https://bugs.winehq.org/attachment.cgi?id=72538 terminal output
Regression, I *believe* introduced by: commit f034084d49b354811096524d472ae5172ac1cebf Author: Eric Pouech eric.pouech@gmail.com Date: Thu Mar 17 08:27:28 2022 +0100
kernelbase: Handle corner case in CreateProcess.
In CreateProcess, if: - parent isn't attached to a console - CreateProcess's flag isn't set with DETACHED_PROCESS nor CREATE_NEW_CONSOLE - child is a CUI program then a console must be allocated for the child.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52048 Signed-off-by: Eric Pouech eric.pouech@gmail.com Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
before this commit (i.e., with c7e87b536edb28bb48162690e0d42c9ba9ccb43c), installing/starting ie after `winetricks -q ie8` works without failure. After this commit, there's a race.
Of course, it's a race, so I can't be 100% sure, but I can run at c7e87b536edb28bb48162690e0d42c9ba9ccb43c 15 times in a row without failure, but fails most of the time at f034084d49b354811096524d472ae5172ac1cebf).
To reproduce: $ wineserver -k ; rm -rf ~/.wine ; winetricks -q ie8 ; wineserver -w ; wine 'C:\Program Files\Internet Explorer\iexplore.exe' http://example.org
if successful, IE will show its window. If it fails, no window will appear.
https://bugs.winehq.org/show_bug.cgi?id=53103
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://github.com/Winetric | |ks/winetricks/issues/1915
https://bugs.winehq.org/show_bug.cgi?id=53103
--- Comment #1 from Austin English austinenglish@gmail.com --- So this is the same commit as bug 52761 / bug 52771.
Need to do some more testing. I noticed it in newer wine versions, as well, but need to be more careful with *which* regression I'm looking for.
Will update when I have more info.
https://bugs.winehq.org/show_bug.cgi?id=53103
--- Comment #2 from Austin English austinenglish@gmail.com --- (In reply to Austin English from comment #1) With eff83cd4e00e8ccd4daad05bdd6d76e77664ddd1 (the fix to bug 52771), I see the same issue.
So either the regression test is wrong (possible), or the fix was incomplete.
Still reproducible for me in 7.10.
https://bugs.winehq.org/show_bug.cgi?id=53103
Eric Pouech eric.pouech@orange.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #3 from Eric Pouech eric.pouech@orange.fr --- looking a bit into it: - it seems that at installation, ie8 sets up a service (spupdsvc.exe). At first invocation of ie8 (but also at first invocation of any program), this service spawns a few more processes (reg.exe and regsvr32.exe) for further init - each of these process creations generate (now, with patch mentioned in #1) a couple of console creation, which make the runtime of spupdsvc.exe much longer - I didn't find simple sync mechanism between ie and this service (may be there are but they don't trigger) - at the end, ie8 terminates
Disabling (dirty hack) console creation when spawning a new CUI process from a running service makes ie8 run fine again. This likely confirms this bug is a side effect of f034084d49b354811096524d472ae5172ac1cebf (and further commits)
but this opens two areas of investigation:
1) CreateProcess() behaviour from a service ------------------------------------------- - it's likely that no console is created under windows in this case, especially with user app now running outside of session #0 (but that wine doesn't properly handle yet) - but it has also to be looked into if it's inherited from attributes of session 0 (no display...), or hard-wired in CreateProcess, or something else
2) the lack of effective synchronization ---------------------------------------- the lack of sync between ie8 and spupdsvc looks suspicious too. Is wine missing some bits (I didn't find simple stuff, but there may be). Or there are none (on windows, as services is started even before user logs in, it's likely there more time for doing the init - even it's likely there are more services)
All the processes to be run are listed in: - c:\windows\system32\spupdsvc.inf under the [ProcessesToRunAfterReboot] entry - the .inf file is erased when after first run of spupsvc.exe
until 1) & 2) are further analysed, I don't see simple fix at hand :-(
workaround: ========== We need to ensure that spupdsvc.exe finishes before starting ie8 (ie start any other program and wait for the whole session termination). For example:
./wine ping && ./server/wineserver -w
when back to prompt, running ie8 should work
(and this make debugging & testing painful as a new clean prefix + ie8 installation is needed each time, or clone the prefix after winetricks finishes but before launching any other program in the prefix)
https://bugs.winehq.org/show_bug.cgi?id=53103
--- Comment #4 from Austin English austinenglish@gmail.com --- (In reply to Eric Pouech from comment #3)
workaround:
We need to ensure that spupdsvc.exe finishes before starting ie8 (ie start any other program and wait for the whole session termination). For example:
./wine ping && ./server/wineserver -w
when back to prompt, running ie8 should work
Thanks for the analysis/workaround. I've added a workaround to winetricks: https://github.com/Winetricks/winetricks/commit/3351af82bfdf68e8ff9929751d24...
https://bugs.winehq.org/show_bug.cgi?id=53103
Dmitry windes@rambler.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |windes@rambler.ru
--- Comment #5 from Dmitry windes@rambler.ru --- (In reply to Austin English from comment #4)
(In reply to Eric Pouech from comment #3)
Thanks for the analysis/workaround. I've added a workaround to winetricks: https://github.com/Winetricks/winetricks/commit/ 3351af82bfdf68e8ff9929751d24ff8c1f9311b6
By the way, wine x64 7.9 till 7.12, (last) winetricks -q ie8 fails on extraction of browseui.dll:
Executing mv ~/.wine/dosdevices/c:/windows/syswow64/browseui.dll ~/.wine/dosdevices/c:/windows/syswow64/browseui.dll.bak Executing cabextract -q --directory=~/.wine/dosdevices/c:/windows/syswow64 ~/.cache/winetricks/ie8/IE8-WindowsXP-x86-ENU.exe -F browseui.dll ~/.cache/winetricks/ie8/IE8-WindowsXP-x86-ENU.exe: No such file or directory ------------------------------------------------------ warning: Important: command cabextract -q --directory=~/.wine/dosdevices/c:/windows/syswow64 ~/.cache/winetricks/ie8/IE8-WindowsXP-x86-ENU.exe -F browseui.dll return status 1. Abort.
https://bugs.winehq.org/show_bug.cgi?id=53103
Vitaly Lipatov lav@etersoft.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lav@etersoft.ru