From 373917017afb7ef3346feb6f61a7bdbf12390671 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 24 Dec 2003 00:10:36 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=2822 --- checkin_notes | 7 +++++++ client/app.C | 8 ++++---- client/client_state.C | 2 +- html/ops/db_ops.inc | 15 +++++++++++++++ 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/checkin_notes b/checkin_notes index 7b74455ceb..6e5385afdc 100755 --- a/checkin_notes +++ b/checkin_notes @@ -8657,3 +8657,10 @@ David 23 Dec 2003 sched/ handle_request.C start + +David 23 Dec 2003 + - improved error messages in stderr_out + + client/ + app.C + client_state.C diff --git a/client/app.C b/client/app.C index a50fa02370..1319004c3c 100644 --- a/client/app.C +++ b/client/app.C @@ -389,7 +389,7 @@ int ACTIVE_TASK::start(bool first_time) { state = PROCESS_COULDNT_START; result->active_task_state = PROCESS_COULDNT_START; if (win_error) { - gstate.report_result_error(*result, win_error, (LPTSTR)&lpMsgBuf); + gstate.report_result_error(*result, win_error, "CreateProcess(): %s", (LPTSTR)&lpMsgBuf); LocalFree(lpMsgBuf); return ERR_EXEC; } @@ -415,7 +415,7 @@ int ACTIVE_TASK::start(bool first_time) { if (pid == -1) { state = PROCESS_COULDNT_START; result->active_task_state = PROCESS_COULDNT_START; - gstate.report_result_error(*result, -1, strerror(errno)); + gstate.report_result_error(*result, -1, "fork(): %s", strerror(errno)); msg_printf(wup->project, MSG_ERROR, "fork(): %s", strerror(errno)); return ERR_FORK; } @@ -613,7 +613,7 @@ bool ACTIVE_TASK_SET::check_app_exited() { atp->state = PROCESS_ABORTED; atp->result->active_task_state = PROCESS_ABORTED; gstate.report_result_error( - *(atp->result), 0, "process was aborted" + *(atp->result), 0, "process was aborted by core client" ); } else { atp->state = PROCESS_EXITED; @@ -665,7 +665,7 @@ bool ACTIVE_TASK_SET::check_app_exited() { atp->state = PROCESS_ABORTED; atp->result->active_task_state = PROCESS_ABORTED; gstate.report_result_error( - *(atp->result), 0, "process was aborted" + *(atp->result), 0, "process was aborted by core client" ); } else { if (WIFEXITED(stat)) { diff --git a/client/client_state.C b/client/client_state.C index 37e0662fde..fffbf5188e 100644 --- a/client/client_state.C +++ b/client/client_state.C @@ -672,7 +672,7 @@ bool CLIENT_STATE::garbage_collect() { // if (!rp->ready_to_report && rp->wup->had_failure(failnum)) { rp->wup->get_file_errors(error_msgs); - report_result_error(*rp, 0, error_msgs.c_str()); + report_result_error(*rp, 0, "file transfer error: %s", error_msgs.c_str()); } for (i=0; ioutput_files.size(); i++) { // If one of the output files had an upload failure, diff --git a/html/ops/db_ops.inc b/html/ops/db_ops.inc index 02dc754c71..a55df6593c 100644 --- a/html/ops/db_ops.inc +++ b/html/ops/db_ops.inc @@ -173,6 +173,18 @@ function link_results($n, $mq, $query) { } } +// +function exit_status_string($result) { + $x = $result->exit_status; + if ($x == 0) { + $y = parse_element($result->stderr_out, ""); + if ($y) { + $x = (int)$y; + } + } + return sprintf("%d (0x%x)", $x, $x); +} + function show_result_summary() { $server_state = array(); $outcome = array(); @@ -654,6 +666,7 @@ function show_result($result) { row("Server state", server_state_string($result->server_state)); row("Outcome", outcome_string($result->outcome)); row("Client state", client_state_string($result->client_state)); + row("Exit status", exit_status_string($result)); row("Host ID", "hostid>" . host_name_by_id($result->hostid) . ""); row("Report deadline", time_str($result->report_deadline)); row("CPU time", $result->cpu_time); @@ -679,6 +692,7 @@ function result_short_header() { WU ID server state outcome + exit status host (user) client ver received @@ -710,6 +724,7 @@ function show_result_short($result) { workunitid>$result->workunitid $ss $oc + ", exit_status_string($result), " $host_user $version $received