[Bug 46266] New: tzres is constantly being loaded/ unloaded when TimeZone information is queried.
https://bugs.winehq.org/show_bug.cgi?id=46266 Bug ID: 46266 Summary: tzres is constantly being loaded/unloaded when TimeZone information is queried. Product: Wine Version: 4.0-rc1 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs(a)winehq.org Reporter: leslie_alistair(a)hotmail.com Distribution: --- Function GetDynamicTimeZoneInformation is causing tzres.dll to be loaded/unloaded multiple times. Cause by the registry lookup of MUI_Std, and MUT_Dlt Other functions are a affected kernel32.FileTimeToLocalFileTime msvcrt._ftime64 Removing the MUI_Std, and MUT_Dlt entries for my timezone, works around the issue. -- 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=46266 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Regression SHA1| |67574e4440ac4d9786e52a669b4 | |0197d2a4cb505 --- Comment #1 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> 2018-12-07 22:42:46 Parent: 1da7eebf84af26933404314e49d75f2f536b81a2 (tzres: Add time zone name resource DLL.) wine.inf: Add MUI time zone name settings. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> -- 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=46266 --- Comment #2 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- Technically this the commit that causes the issue but isn't noticeable until the registry entries were committed. Author: Akihiro Sagawa <sagawa.aki(a)gmail.com> 2018-12-07 02:33:26 kernel32: Resolve an MUI time zone name. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> -- 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=46266 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |focht(a)gmx.net --- Comment #3 from Anastasius Focht <focht(a)gmx.net> --- Hello folks, I can confirm that, seeing a large number of loads/unloads in debugger logs when debugging apps (Ollydbg 1,2, x64dbg/x32dbg etc.). Regards -- 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=46266 Sagawa <sagawa.aki+winebugs(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sagawa.aki+winebugs(a)gmail.c | |om --- Comment #4 from Sagawa <sagawa.aki+winebugs(a)gmail.com> --- Umm, it needs some cache feature in RegLoadMUIString like MUICache registry. I'll work on this. Thanks for reporting. -- 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=46266 --- Comment #5 from Sagawa <sagawa.aki+winebugs(a)gmail.com> --- I noticed RegLoadMUIStringW simply uses LoadLibraryW. Since we're in code freeze, I'll send a patch which uses LoadLibraryEx(LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE) instead. -- 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=46266 --- Comment #6 from Sagawa <sagawa.aki+winebugs(a)gmail.com> --- I sent a patch, https://source.winehq.org/patches/data/155857 -- 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=46266 --- Comment #7 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- (In reply to Sagawa from comment #6)
I sent a patch, https://source.winehq.org/patches/data/155857
Yes, this improved the load/unload messages. However, the there is still a massive slowdown because there isn't a cache of these values. -- 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=46266 張修銘 <cges30901(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cges30901(a)gmail.com --- Comment #8 from 張修銘 <cges30901(a)gmail.com> --- *** Bug 46288 has been marked as a duplicate of this bug. *** -- 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=46266 --- Comment #9 from Sagawa <sagawa.aki+winebugs(a)gmail.com> --- Created attachment 63004 --> https://bugs.winehq.org/attachment.cgi?id=63004 proposed patch Here is a proposed patch which caches MUI string. Could you try and/or review this patch before submitting? -- 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=46266 --- Comment #10 from Nikolay Sivov <bunglehead(a)gmail.com> --- Caching may be worth it in any way, but I wonder if we actually should return those strings in a first place. Other bug report had a list of affected API, and most of them should not care at all about timezone name. -- 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=46266 --- Comment #11 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- (In reply to Sagawa from comment #9)
Created attachment 63004 [details] proposed patch
Here is a proposed patch which caches MUI string. Could you try and/or review this patch before submitting?
Thanks, The cache makes it usable once again. -- 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=46266 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch -- 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=46266 --- Comment #12 from 張修銘 <cges30901(a)gmail.com> --- (In reply to Sagawa from comment #9)
Created attachment 63004 [details] proposed patch
Here is a proposed patch which caches MUI string. Could you try and/or review this patch before submitting?
Thank you for the patch. After applying the patch, although it is still a bit slower than before, the speed is much better now. -- 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=46266 --- Comment #13 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- Created attachment 63053 --> https://bugs.winehq.org/attachment.cgi?id=63053 Hack to make it work. There is a relay snippet of a call that doesn't need the MUI strings either. 0097:Call msvcr120._time32(00000000) ret=1f246d9d 0097:Call KERNEL32.GetTimeZoneInformation(09e291f4) ret=f69b47ad 0097:Call advapi32.RegLoadMUIStringW(00000b14,7b49ab70 L"MUI_Std",09e28fb4 L"@tzres.dll,-30368",00000040,00000000,00000000,00000000) ret=7b47a d88 0097:Ret advapi32.RegLoadMUIStringW() retval=00000000 ret=7b47ad88 0097:Call advapi32.RegLoadMUIStringW(00000b14,7b49ab60 L"MUI_Dlt",09e29008 L"@tzres.dll,-30369",00000040,00000000,00000000,00000000) ret=7b47ad88 0097:Ret advapi32.RegLoadMUIStringW() retval=00000000 ret=7b47ad88 0097:Ret KERNEL32.GetTimeZoneInformation() retval=00000002 ret=f69b47ad 0097:Call KERNEL32.GetSystemTimeAsFileTime(09e291ec) ret=f69b47c0 0097:Ret KERNEL32.GetSystemTimeAsFileTime() retval=01d4965d ret=f69b47c0 0097:Ret msvcr120._time32() retval=5c182cbc ret=1f246d9d That attached patch makes it work for me once again. This is a just a copy of the functions from ntdll. -- 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=46266 --- Comment #14 from Sagawa <sagawa.aki+winebugs(a)gmail.com> --- It seems that your application calls time32 and not ftime64 explicitly. Is it acceptable that implementing time32 without ftime64? -- 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=46266 --- Comment #15 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- (In reply to Sagawa from comment #14)
It seems that your application calls time32 and not ftime64 explicitly. Is it acceptable that implementing time32 without ftime64?
It doesn't make sense in just correcting time32, since all the time functions call MSVCRT__ftime64 anyway and aren't going to use the MUI strings. -- 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=46266 Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |b8bafa2c58f69043debe9c7a962 | |eb5f04dee0ca5 Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #16 from Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- Fixed by https://source.winehq.org/git/wine.git/?a=commit;h=b8bafa2c58f69043debe9c7a9... -- 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=46266 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #17 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 4.0-rc5. -- 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)
-
wine-bugs@winehq.org