*** empty log message ***

svn path=/trunk/boinc/; revision=11872
This commit is contained in:
David Anderson 2007-01-15 22:53:41 +00:00
parent 40a118a6b2
commit cc9ab449e0
8 changed files with 38 additions and 13 deletions

View File

@ -616,3 +616,26 @@ Rom 15 Jan 2007
curl/
<numerious files>
David 15 Jan 2007
- core client: fix a bug that could cause computation to stop.
The problem: if we suspended a task by sending it a <quit/> message,
we were changing its scheduler state to CPU_SCHED_PREEMPTED
but not changing its task state (PROCESS_EXECUTING).
If, for some reason, the process didn't exit right away,
the scheduler would treat it as still running,
since it builds its "currently running" list based on task_state.
Solution: the scheduler shouldn't be looking at task_state.
Use scheduler_state instead.
It's still a mystery why the app wasn't quitting.
- db_dump: don't write team.nusers; it's meaningless
client/
app.C,h
app_control.C
cpu_sched.C
html/user/
create_account.php
sched/
db_dump.C

View File

@ -212,7 +212,7 @@ void ACTIVE_TASK_SET::get_memory_usage() {
}
for (i=0; i<active_tasks.size(); i++) {
ACTIVE_TASK* atp = active_tasks[i];
if (atp->task_state == PROCESS_EXECUTING) {
if (atp->scheduler_state == CPU_SCHED_SCHEDULED) {
PROCINFO& pi = atp->procinfo;
unsigned long last_page_fault_count = pi.page_fault_count;
memset(&pi, 0, sizeof(pi));

View File

@ -40,8 +40,7 @@ typedef int PROCESS_ID;
// values of ACTIVE_TASK::task_state
//
#define PROCESS_UNINITIALIZED 0
// states in which the process exists
// process doesn't exist yet
#define PROCESS_EXECUTING 1
// process is running, as far as we know
#define PROCESS_SUSPENDED 9

View File

@ -159,6 +159,7 @@ int ACTIVE_TASK::preempt(bool quit_task) {
);
}
pending_suspend_via_quit = true;
task_state = PROCESS_UNINITIALIZED;
retval = request_exit();
} else {
if (log_flags.cpu_sched) {
@ -224,7 +225,6 @@ void ACTIVE_TASK::handle_exited_app(int stat) {
} else {
if (pending_suspend_via_quit) {
pending_suspend_via_quit = false;
task_state = PROCESS_UNINITIALIZED;
close_process_handles();
return;
}
@ -255,7 +255,6 @@ void ACTIVE_TASK::handle_exited_app(int stat) {
//
if (pending_suspend_via_quit) {
pending_suspend_via_quit = false;
task_state = PROCESS_UNINITIALIZED;
// destroy shm, since restarting app will re-create it
//

View File

@ -537,7 +537,7 @@ void CLIENT_STATE::make_running_task_heap(
atp = active_tasks.active_tasks[i];
if (atp->result->project->non_cpu_intensive) continue;
if (!atp->result->runnable()) continue;
if (atp->task_state != PROCESS_EXECUTING) continue;
if (atp->scheduler_state != CPU_SCHED_SCHEDULED) continue;
running_tasks.push_back(atp);
}

View File

@ -8,6 +8,12 @@ $volid = $_GET['volid'];
$vol = vol_lookup($volid);
function is_valid_email_addr($addr) {
$pattern = '/^([^@]+)@([^@\.]+)\.([^@]{2,})$/';
$match = preg_match($pattern, $addr);
return (bool) $match;
}
function show_info($vol) {
$x = "<span class=note> Country: $vol->country\n";
if ($vol->availability) {
@ -121,8 +127,8 @@ if ($send_email) {
}
$body = "The following message was sent by a BOINC Help user.\n";
$email_addr = $_GET['email_addr'];
if (!$email_addr) {
error_page("You need to specify your email address");
if (!is_valid_email_addr($email_addr)) {
error_page("You must specify a valid email address");
}
$reply = "\r\nreply-to: $email_addr";
$body .= "\n\n";

View File

@ -40,7 +40,7 @@ if (strlen($passwd_hash) != 32) {
$user = lookup_user_email_addr($email_addr);
if ($user) {
if ($user->passwd_hash != $passwd_hash) {
xml_error(-206);
xml_error(-137);
} else {
$authenticator = $user->authenticator;
}

View File

@ -487,16 +487,14 @@ void write_team(TEAM& team, FILE* f, bool detail) {
" <userid>%d</userid>\n"
" <total_credit>%f</total_credit>\n"
" <expavg_credit>%f</expavg_credit>\n"
" <expavg_time>%f</expavg_time>\n"
" <nusers>%d</nusers>\n",
" <expavg_time>%f</expavg_time>\n",
team.id,
team.type,
name,
team.userid,
team.total_credit,
team.expavg_credit,
team.expavg_time,
team.nusers
team.expavg_time
);
// show founder name since that user might not be active