https://bugs.winehq.org/show_bug.cgi?id=54194
Bug ID: 54194 Summary: user32:msg - test_broadcast() sometimes fails to send WM_USER-1 on Windows 7 Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
user32:msg - test_broadcast() sometimes fails to send WM_USER-1 on Windows 7.
2022-12-29 w7u-2qxl (32-bit)
msg.c:17379: Test failed: 0: message 03ff, got 0, error 1460 msg.c:17384: Test failed: 0,0: message 03ff, got 0, error 1460 msg.c:17384: Test failed: 0,1: message 03ff, got 0, error 1460 msg.c:17384: Test failed: 0,2: message 03ff, got 0, error 1460 msg.c:17384: Test failed: 0,3: message 03ff, got 0, error 1460 msg.c:17384: Test failed: 0,8: message 03ff, got 0, error 1460 msg.c:17384: Test failed: 0,9: message 03ff, got 0, error 1460 msg.c:17384: Test failed: 0,10: message 03ff, got 0, error 1460 msg.c:17384: Test failed: 0,11: message 03ff, got 0, error 1460 msg.c:17384: Test failed: 0,12: message 03ff, got 0, error 1460
2022-12-15 w7u (32-bit)
msg.c:17379: Test failed: 0: message 03ff, got 0, error 0 msg.c:17384: Test failed: 0,0: message 03ff, got 0, error 0 msg.c:17384: Test failed: 0,1: message 03ff, got 0, error 0 msg.c:17384: Test failed: 0,2: message 03ff, got 0, error 0 msg.c:17384: Test failed: 0,3: message 03ff, got 0, error 0 msg.c:17384: Test failed: 0,8: message 03ff, got 0, error 0 msg.c:17384: Test failed: 0,9: message 03ff, got 0, error 0 msg.c:17384: Test failed: 0,10: message 03ff, got 0, error 0 msg.c:17384: Test failed: 0,11: message 03ff, got 0, error 0 msg.c:17384: Test failed: 0,12: message 03ff, got 0, error 0
2022-10-19 w7u-adm (32-bit)
msg.c:17002: Test failed: 0: message 03ff, got 0, error 5 msg.c:17007: Test failed: 0,0: message 03ff, got 0, error 5 msg.c:17007: Test failed: 0,1: message 03ff, got 0, error 5 msg.c:17007: Test failed: 0,2: message 03ff, got 0, error 5 msg.c:17007: Test failed: 0,3: message 03ff, got 0, error 5 msg.c:17007: Test failed: 0,8: message 03ff, got 0, error 5 msg.c:17007: Test failed: 0,9: message 03ff, got 0, error 5 msg.c:17007: Test failed: 0,10: message 03ff, got 0, error 5 msg.c:17007: Test failed: 0,11: message 03ff, got 0, error 5 msg.c:17007: Test failed: 0,12: message 03ff, got 0, error 5
See https://test.winehq.org/data/patterns.html#user32:msg
Where: 0x03ff == WM_USER-1 5 == ERROR_ACCESS_DENIED 1460 == ERROR_TIMEOUT
0, ERROR_ACCESS_DENIED and ERROR_TIMEOUT are the only three errors that were reported in the past 6 months.
See also bug 54032 which deals with test_broadcast() sometimes getting ERROR_INVALID_PARAMETER.
https://bugs.winehq.org/show_bug.cgi?id=54194
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase
https://bugs.winehq.org/show_bug.cgi?id=54194
--- Comment #1 from François Gouget fgouget@codeweavers.com --- WM_USER (c000) can also get a permission denied error, still on Windows 7. For instance on 2023-07-31 on w7u_adm:
msg.c:17741: Test failed: 4: message c000, got 0, error 5 msg.c:17746: Test failed: 4,0: message c000, got 0, error 5 msg.c:17746: Test failed: 4,1: message c000, got 0, error 5 msg.c:17746: Test failed: 4,2: message c000, got 0, error 5 msg.c:17746: Test failed: 4,3: message c000, got 0, error 5 msg.c:17746: Test failed: 4,8: message c000, got 0, error 5 msg.c:17746: Test failed: 4,9: message c000, got 0, error 5 msg.c:17746: Test failed: 4,10: message c000, got 0, error 5 msg.c:17746: Test failed: 4,11: message c000, got 0, error 5
https://bugs.winehq.org/show_bug.cgi?id=54194
--- Comment #2 from Esme Povirk madewokherd@gmail.com --- Access denied could be UIPI.
https://bugs.winehq.org/show_bug.cgi?id=54194
--- Comment #3 from François Gouget fgouget@codeweavers.com --- Note for myself: UIPI == User Interface Privilege Isolation https://en.wikipedia.org/wiki/User_Interface_Privilege_Isolation
Given that this happens while sending a broadcast this would happen whenever a "high integrity-level" system process is running and thus the target of our test broadcast messages. So the only way to avoid that would be to restrict our test to one of the "very specific set of allowed UI messages" but I'm not sure that makes sense for the test. Otherwise the test would have to ignore permission denied errors.
At least on Windows 7. Question is then: why don't we get this issue on newer Windows versions? Did MS drop UIPI? Or do we just never have high "integrity-level" processes running on newer Windows versions? Can we dump information on the process triggering the errors? (in user32:clipboard I had a hack to trace an hwnd's GetClassNameA() and GetWindowTextA() which helped identify the cause of some failures)
https://bugs.winehq.org/show_bug.cgi?id=54194
--- Comment #4 from Esme Povirk madewokherd@gmail.com --- It's possible that in later versions it silently fails to send to higher-integrity processes in the case of broadcast. You could always test by running an elevated notepad or something yourself.
I don't see how you would identify a specific window that caused the error.
https://bugs.winehq.org/show_bug.cgi?id=54194
--- Comment #5 from Esme Povirk madewokherd@gmail.com --- Posted MR: https://gitlab.winehq.org/wine/wine/-/merge_requests/3862
The GetLastError value may be misleading because it isn't set to a known value before calling SendMessageTimeout.