https://bugs.winehq.org/show_bug.cgi?id=54634
Bug ID: 54634 Summary: schtasks.exe:schtasks causes taskschd:scheduler to crash on w7u_adm and w8adm Product: Wine Version: unspecified Hardware: x86-64 OS: Windows Status: NEW Severity: normal Priority: P2 Component: taskschd Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com
schtasks.exe:schtasks causes taskschd:scheduler to crash on w7u_adm and w8adm:
scheduler.c:344: Test failed: expected ERROR_DIR_NOT_EMPTY, got 0x80070005 scheduler.c:351: Test failed: DeleteFolder error 0x80070005 scheduler.c:354: Test failed: expected ERROR_FILE_NOT_FOUND, got 0x80070005 scheduler.c:474: Test failed: expected 2, got 3 scheduler.c:483: Test failed: expected 2, got 3 scheduler.c:515: Test failed: expected \Wine\Folder2, got L"\Wine\test" scheduler.c:523: Test failed: expected Folder2, got L"test" scheduler.c:538: Test failed: expected \Wine\Folder2, got L"\Wine\test" scheduler.c:546: Test failed: expected Folder2, got L"test" scheduler.c:555: Test failed: expected E_INVALIDARG, got 0 scheduler.c:582: Test failed: expected S_FALSE, got 0 scheduler.c:616: Test failed: expected S_FALSE, got 0 scheduler.c:617: Test failed: expected 0, got 1 scheduler.c:630: Test failed: expected S_FALSE, got 0 scheduler.c:631: Test failed: expected 2, got 3 scheduler.c:647: Test failed: expected \Wine\Folder2, got L"\Wine\test" scheduler.c:655: Test failed: expected Folder2, got L"test" scheduler.c:673: Test failed: DeleteFolder error 0x80070005 scheduler.c:776: Test failed: CreateFolder error 0x800700b7 scheduler.c:787: Test failed: expected ERROR_FILE_NOT_FOUND, got 0x80070005 scheduler.c:787: this is the last test seen before the exception 07e4:scheduler: unhandled exception c0000005 at 004017CA
See https://test.winehq.org/data/patterns.html#taskschd:scheduler
taskschd:scheduler does not crash when run on its own: it's schtasks.exe:schtasks that causes it to crash.
The reason is that, at least when run without elevated privileges, schtasks.exe:schtasks leaves behind the "Wine\test" task folders created by the call below in schtasks.c:
register_task("wine\test\winetest");
These folders then interfere with taskschd:scheduler. Not that they are mean to be deleted by the calls below but that fail with E_ACCESSDENIED:
ITaskFolder_DeleteFolder(root, wine_testW, 0); ITaskFolder_DeleteFolder(root, wineW, 0);
https://bugs.winehq.org/show_bug.cgi?id=54634
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase
https://bugs.winehq.org/show_bug.cgi?id=54634
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |739c5c547c361880a69993b2185 | |5af0fa00ade76 Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #1 from François Gouget fgouget@codeweavers.com --- This is fixed:
commit 739c5c547c361880a69993b21855af0fa00ade76 Author: François Gouget fgouget@codeweavers.com Date: Sat Mar 25 17:52:59 2023 +0100
schtasks/tests: Deleting folders requires elevated privileges on Windows 7 & 8.
This means skipping any test that requires creating a task as the test would be unable to clean up after itself.
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=52193 Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=54634
https://bugs.winehq.org/show_bug.cgi?id=54634
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.6.