Closed romw closed 9 years ago
Commented by romw on 28 Aug 40311938 20:26 UTC Thyme, when you say Windows protected mode, do you mean when UAC is turned on?
Commented by Thyme Lawn on 30 May 40311977 22:40 UTC I mean a service installation Rom. The tests were run on an XP system.
Commented by Thyme Lawn on 28 Jul 40321466 20:26 UTC Further information.
The QMC application used as an example was built using BOINC API version 6.3.0.
2 changes have been made to boinc_api.cpp since then which affect how Windows project applications respond to
[modified boinc_exit() to follow up the call to TerminateProcess() with calls to Sleep() and DebugBreak() (first used in BOINC API version 6.7.5).
20772 modified exit_from_timer_thread() to resume a task before calling boinc_exit(). That was checked in on 2nd March 2010 and the current trunk version number (6.11.1) was set on 23rd November 2009 (i.e. an
For any application using the current trunk version of boinc_api.cpp I'd expect that a
Commented by Thyme Lawn on 6 Jul 40450116 18:40 UTC [21295] resolves this problem.
Reported by Thyme Lawn on 20 Sep 40310674 08:00 UTC If a project application fails to respond to a request the BOINC core client's attempt to kill the process always fails when running in Windows protected mode. I modified the core client to generate an error message when ACTIVE_TASK::kill_task() fails to kill the process. This generated the following:
My additional error message indicates that the handle retrieved by OpenProcess() can't be used by the core client.
All subsequent attempts to restart this task fail with a '''Can't acquire lockfile''' error until the task has been terminated. This can only be done by manually killing the task or by rebooting; stopping the BOINC service results in an orphaned task.
I repeated the test after using System Internals Process Explorer to grant the '''Terminate''' permission to the '''boinc_admins''' group for the QMC process. This time kill_task() successfully terminated the process:
ACTIVE_TASK::start() needs to set up a security descriptor to assign the required privilege and pass it to CreateProcessAsUser() (as the 4th parameter).