client: if an output file is missing or bad length, mark WU as error

Failure to do so apparently leaves WU in limbo
This commit is contained in:
David Anderson 2019-09-12 23:43:46 -07:00
parent 26b92a16aa
commit b46ceb6fce
3 changed files with 19 additions and 5 deletions

View File

@ -273,6 +273,9 @@ void ACTIVE_TASK::cleanup_task() {
kill_subsidiary_processes();
if (cc_config.exit_after_finish) {
msg_printf(wup->project, MSG_INFO,
"exit_after_finish: job %s, slot %d", wup->name, slot
);
gstate.write_state_file();
exit(0);
}

View File

@ -1133,11 +1133,13 @@ int WORKUNIT::parse(XML_PARSER& xp) {
if (xp.parse_double("rsc_disk_bound", rsc_disk_bound)) continue;
if (xp.match_tag("file_ref")) {
retval = file_ref.parse(xp);
if (retval) msg_printf(0, MSG_INFO,
"can't parse file_ref in workunit: %s",
boincerror(retval)
);
return retval;
if (retval) {
msg_printf(0, MSG_INFO,
"can't parse file_ref in workunit: %s",
boincerror(retval)
);
return retval;
}
#ifndef SIM
input_files.push_back(file_ref);
#endif

View File

@ -506,6 +506,15 @@ void CLIENT_STATE::check_file_existence() {
path, fip->nbytes, size
);
}
// If an output file disappears before it's uploaded,
// flag the job as an error.
//
if (fip->result && fip->status == FILE_NOT_PRESENT && !fip->uploaded) {
gstate.report_result_error(
*fip->result, "output file missing or invalid"
);
}
}
}
}