https://bugs.winehq.org/show_bug.cgi?id=55396
Bug ID: 55396 Summary: advapi32:registry breaks test_registerOIDFunction() in crypt32:oid on w8adm Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: crypt32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
advapi32:registry breaks test_registerOIDFunction() in crypt32:oid on w8adm:
oid.c:297: Test failed: CryptUnregisterOIDFunction failed: 2 oid.c:303: Test failed: CryptUnregisterOIDFunction failed: 2 oid.c:305: Test failed: Could not delete bogus key oid.c:314: Test failed: CryptUnregisterOIDFunction failed: 2 oid.c:321: Test failed: CryptUnregisterOIDFunction failed: 2 oid.c:325: Test failed: Could not delete CryptDllEncodeObject key oid.c:336: Test failed: CryptUnregisterOIDFunction failed: 2 oid.c:340: Test failed: Could not delete CryptDllEncodeObject key oid.c:343: Test failed: Could not delete 'EncodingType 3' key oid.c:377: Test failed: Expected ERROR_FILE_EXISTS, got 00000000 oid.c:382: Test failed: Expected ERROR_FILE_EXISTS, got 00000000 oid.c:390: Test failed: Expected key to exist, RegOpenKeyA failed: 2 oid.c:412: Test failed: CryptUnregisterDefaultOIDFunction failed: 00000002 oid.c:416: Test failed: CryptUnregisterDefaultOIDFunction failed: 00000002 oid.c:430: Test failed: CryptUnregisterDefaultOIDFunction failed
See https://test.winehq.org/data/patterns.html#crypt32:oid
More precisely these failures only happen if running advapi32:registry before crypt32:oid. Furthermore the failures started on 2023-07-27 which is when the w8 VM's memory was increased to 4GB, and older WineTest builds still produce the failures. So the 2023-07-27 VM change is the cause of these failures but it's not clear why.
https://bugs.winehq.org/show_bug.cgi?id=55396
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |fgouget@codeweavers.com Keywords| |source, testcase
https://bugs.winehq.org/show_bug.cgi?id=55396
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|advapi32:registry breaks |advapi32:registry breaks |test_registerOIDFunction() |crypt32:oid and crypt32:sip |in crypt32:oid on w8adm |on w8adm
--- Comment #1 from François Gouget fgouget@codeweavers.com --- advapi32:registry also breaks crypt32:sip and the failure started at the same time:
sip.c:113: Test failed: CryptSIPRemoveProvider should have succeeded, last error 2
See https://test.winehq.org/data/patterns.html#crypt32:sip
https://bugs.winehq.org/show_bug.cgi?id=55396
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|advapi32:registry breaks |advapi32:registry breaks |crypt32:oid and crypt32:sip |crypt32:oid, crypt32:sip |on w8adm |and sti:sti on w8adm
--- Comment #2 from François Gouget fgouget@codeweavers.com --- advapi32:registry also breaks sti:sti, the failure started at the same time and it also only happens on w8adm:
sti.c:252: Test failed: could not unregister launch application, error 0x80070002
See https://test.winehq.org/data/patterns.html#sti:sti
https://bugs.winehq.org/show_bug.cgi?id=55396
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|advapi32:registry breaks |advapi32:registry breaks |crypt32:oid, crypt32:sip |crypt32:oid, crypt32:sip, |and sti:sti on w8adm |crypt32:store and sti:sti | |on w8adm
--- Comment #3 from François Gouget fgouget@codeweavers.com --- advapi32:registry also causes crypt32:store to crash and this started at the same time:
store.c:2042: Test failed: Opening just registered store at 00040000 failed, last error 2 0c24:store: unhandled exception c0000005 at 7580025E
See https://test.winehq.org/data/patterns.html#crypt32:store
Note that crypt32:store was already crashing randomly before due to heap corruption (STATUS_HEAP_CORRUPTION) but the crashes are now a simple access violation and systematic, specifically on w8adm.
https://bugs.winehq.org/show_bug.cgi?id=55396
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|advapi32:registry breaks |advapi32:registry breaks |crypt32:oid, crypt32:sip, |crypt32:oid, crypt32:sip, |crypt32:store and sti:sti |crypt32:store, msi:msi and |on w8adm |sti:sti on w8adm
--- Comment #4 from François Gouget fgouget@codeweavers.com --- advapi32:registry also breaks msi:msi, the failure started at the same time and it also only happens on w8adm:
msi.c:1764: Test failed: Expected INSTALLSTATE_BADCONFIG, got 1 msi.c:1841: Test failed: Expected INSTALLSTATE_LOCAL, got 1 msi.c:1851: Test failed: Expected INSTALLSTATE_SOURCE, got 1 msi.c:1861: Test failed: Expected INSTALLSTATE_LOCAL, got 1 msi.c:1871: Test failed: Expected INSTALLSTATE_SOURCE, got 1 msi.c:1881: Test failed: Expected INSTALLSTATE_LOCAL, got 1 msi.c:1915: Test failed: Expected INSTALLSTATE_ADVERTISED, got -1 msi.c:1928: Test failed: Expected INSTALLSTATE_ADVERTISED, got -1 msi.c:1934: Test failed: Expected INSTALLSTATE_BADCONFIG, got -1 msi.c:1940: Test failed: Expected INSTALLSTATE_ADVERTISED, got -1 [...900+ other failures...]
See https://test.winehq.org/data/patterns.html#msi:msi
https://bugs.winehq.org/show_bug.cgi?id=55396
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|advapi32:registry breaks |advapi32:registry breaks |crypt32:oid, crypt32:sip, |crypt32:oid, crypt32:sip, |crypt32:store, msi:msi and |crypt32:store, msi:msi, |sti:sti on w8adm |msi:source and sti:sti on | |w8adm
--- Comment #5 from François Gouget fgouget@codeweavers.com --- advapi32:registry also breaks msi:source, the failures started at the same time and it also only happens on w8adm:
source.c:692: Tests skipped: process is limited source.c:1443: Test failed: Expected ERROR_BAD_CONFIGURATION, got 1605 source.c:1456: Test failed: Expected ERROR_NO_MORE_ITEMS, got 1605 source.c:1469: Test failed: Expected ERROR_NO_MORE_ITEMS, got 1605 source.c:1482: Test failed: Expected ERROR_SUCCESS, got 1605 source.c:1483: Test failed: Expected "first", got aaa source.c:1484: Test failed: Expected 5, got 260 source.c:1492: Test failed: Expected ERROR_SUCCESS, got 1605 source.c:1493: Test failed: Expected "first", got aaa source.c:1494: Test failed: Expected 5, got 260 source.c:1506: Test failed: Expected ERROR_NO_MORE_ITEMS, got 1605 source.c:1519: Test failed: Expected ERROR_NO_MORE_ITEMS, got 1605 source.c:1532: Test failed: Expected ERROR_SUCCESS, got 1605 source.c:1533: Test failed: Expected "first", got aaa source.c:1534: Test failed: Expected 5, got 260 source.c:1706: Tests skipped: process is limited source.c:2142: Tests skipped: process is limited source.c:3101: Test failed: Expected ERROR_BAD_CONFIGURATION, got 1605 source.c:3116: Test failed: Expected ERROR_NO_MORE_ITEMS, got 1605 source.c:3136: Test failed: Expected ERROR_NO_MORE_ITEMS, got 1605 source.c:3156: Test failed: Expected ERROR_SUCCESS, got 1605 source.c:3157: Test failed: Expected 2, got 0 source.c:3158: Test failed: Expected "label", got "aaa" source.c:3159: Test failed: Expected 5, got 260 source.c:3160: Test failed: Expected "prompt", got "bbb" source.c:3161: Test failed: Expected 6, got 260 source.c:3298: Tests skipped: process is limited
See https://test.winehq.org/data/patterns.html#msi:source
https://bugs.winehq.org/show_bug.cgi?id=55396
--- Comment #6 from François Gouget fgouget@codeweavers.com --- Created attachment 74973 --> https://bugs.winehq.org/attachment.cgi?id=74973 Minimal advapi32:registry to break the other tests
* Looking at the w8adm test configuration I don't see anything wrong: Windows update is disabled, there is no process that should not be running, etc. * I also restored the VM from backup but the tests fail in the same way even with the old amount of memory (but note the live snapshot is always rebuilt by the TestBot). * I also verified that before the update the tests were running without elevated privileges. The old logs on test.winehq.org have the right set of skips indicating that this was the case. The current logs have the same set of skips too (particularly in advapi32:registry). * So now I'm thinking these tests should have failed all along and we somehow got lucky.
Then I hacked advapi32:registry to find which part causes the other tests to fail. This shows that the line below in test_reg_open_key() is sufficient to cause the other tests to crash (see the attached patch).
ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software\Wine", 0, NULL, 0, KEY_WOW64_32KEY | KEY_ALL_ACCESS, NULL, &hkRoot32, NULL);
Also this call is preceded by a check for the presence of IsWow64Process which does not skip: w8adm is 32-bit only but the WoW APIs are present regardless. Maybe the fix is to tweak that check to skip in the non-elevated privileges case? Or maybe testing WoW-stuff on a non-WoW configuration is just wrong even though it does not seem to break things in the w8 (elevated privileges) configuration.
https://bugs.winehq.org/show_bug.cgi?id=55396
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|crypt32 |advapi32 Assignee|fgouget@codeweavers.com |wine-bugs@winehq.org
https://bugs.winehq.org/show_bug.cgi?id=55396
--- Comment #7 from François Gouget fgouget@codeweavers.com --- Note: The memory change seems to also have broken msi:package independently from advapi32:registry (see bug 55410). So it is still possible something changed on the MSI side.