https://bugs.winehq.org/show_bug.cgi?id=54094
Bug ID: 54094 Summary: kernel32:process - test_services_exe() sometimes fails due to an invalid buffer size in Windows Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
test_services_exe() sometimes fails due to an invalid buffer size in Windows:
process.c:4962: Test failed: got 0xc0000004
See https://test.winehq.org/data/patterns.html#kernel32:process
Where 0xc0000004 == STATUS_INFO_LENGTH_MISMATCH
This causes a little bit over one failure per month.
I think the failure simply happens when a process is started between the first call to NtQuerySystemInformation(), which returns the buffer size to hold the *array* of SYSTEM_PROCESS_INFORMATION structures, and the time we call it again with that size. Obviously we don't start new processes ourselves so it must be a scheduled task or some equivalent.
We should probably loop a couple of times to defend against that.
https://bugs.winehq.org/show_bug.cgi?id=54094
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase
--- Comment #1 from François Gouget fgouget@codeweavers.com --- test_services_exe() sometimes gets an extra failure:
process.c:4981: Test failed: got 0xc0000004 process.c:4999: Test failed: got services.exe SessionId 1
There are only 2 instances of this extra failure over a 6 months period: * 2022-08-28 on w1064-adm (21H2, 64-bit) * 2022-11-28 on w10pro64-ru (21H1, 64-bit)
Both times they happened together with the 0xc0000004 failure so I think they are tied.
I'm hoping we get a bad session id because we use uninitialized data from the buffer set up by the failed NtQuerySystemInformation() call. If so fixing the former failure will fix the latter.
https://bugs.winehq.org/show_bug.cgi?id=54094
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |508b793ec915bae900edb42e10d | |7bf8d659cd32a Status|NEW |RESOLVED
--- Comment #2 from François Gouget fgouget@codeweavers.com --- This got fixed by the commit below:
commit 508b793ec915bae900edb42e10d7bf8d659cd32a Author: François Gouget fgouget@codeweavers.com Date: Thu Dec 8 03:39:39 2022 +0100
kernel32/tests: Avoid failures when processes start during the process test.
On Windows processes sometimes start during test_services_exe() so that the size returned by the first NtQuerySystemInformation() is no longer sufficient for the second call.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54094
https://bugs.winehq.org/show_bug.cgi?id=54094
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.0-rc2.