https://bugs.winehq.org/show_bug.cgi?id=54614
Bug ID: 54614 Summary: advapi32:eventlog - test_oldest() sometimes gets an RPC canceled error on Windows 10 2004 & 2009 Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: advapi32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
advapi32:eventlog - test_oldest() sometimes gets an RPC canceled error:
eventlog.c:287: Test failed: OpenEventLogA(Application) failed : 1818 eventlog.c:296: Test failed: Expected success : 6 eventlog.c:297: Test failed: Expected the number of the oldest record
See https://test.winehq.org/data/patterns.html#advapi32:eventlog
Where 1818 == RPC_S_CALL_CANCELLED 6 == ERROR_INVALID_HANDLE
These failures only happen on Windows 10 2004 and 2009, both in 32- and 64-bit tests, a bit over once per month.
The tests already expect to sometimes be unable to access the event logs but only when OpenEventLogA() returns ERROR_ACCESS_DENIED or RPC_S_SERVER_UNAVAILABLE. The commit adding these checks (ea7eb95682be) does not specify where they were needed but the corresponding skip messages are only present on these two platforms.
So it looks like that commit just missed one more possible error code.
https://bugs.winehq.org/show_bug.cgi?id=54614
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase
https://bugs.winehq.org/show_bug.cgi?id=54614
--- Comment #1 from François Gouget fgouget@codeweavers.com --- It is strange that opening the event log only fails on two test configurations.
So I did some tests on w10pro64v2004 and test_backup() crashes the event log service on that machine. Paradoxically, after a reboot (or if I wait long enough) I can even see an event telling me so:
Source : Service Control Manager Event ID : 7031
The Windows Event Log service terminated unexpectedly. It has done this 1 time(s). The following corrective action will be taken in 60000 milliseconds: Restart the service.
Specifically it's the call to make a backup of a backup that causes the crash:
/* Can we make a backup of a backup? */ handle = OpenBackupEventLogA(NULL, backup);
Furthermore test_backup() is not the only part of advapi32:eventlog that causes the event log service to crash. But tracking the other service crashers is still to be done.
https://bugs.winehq.org/show_bug.cgi?id=54614
--- Comment #2 from François Gouget fgouget@codeweavers.com --- Created attachment 74141 --> https://bugs.winehq.org/attachment.cgi?id=74141 Isolate the code paths that crash the event logger service on Windows 10 2004
advapi32:eventlog has at least 7 code paths that can crash the event log service on Windows 10 2004. Just set the crash variable between 1 and 7 to experiment with each case.
In all cases it seems to be the combination of BackupEventLogA() (such as in create_backup()) followed by OpenBackupEventLogA(NULL, backup) that causes the crash (replacing NULL with "" crashes too).
So essentially it's opening a backup that causes the crash.