- client: if can't write state file, don't immediately exit,

but don't do anything other than handle GUI RPCs.
    After 50 secs, print an "about to exit" message.
    After 60 seconds, exit

svn path=/trunk/boinc/; revision=13162
This commit is contained in:
David Anderson 2007-07-16 20:30:21 +00:00
parent 0a7422f5f7
commit 79adf59f98
5 changed files with 48 additions and 14 deletions

View File

@ -7301,3 +7301,12 @@ David 16 July 2007
clientgui/
BOINCGridCtrl.cpp,h
ViewWorkGrid.cpp
David 16 July 2007
- client: if can't write state file, don't immediately exit,
but don't do anything other than handle GUI RPCs.
After 50 secs, print an "about to exit" message.
After 60 seconds, exit
client/
client_state.C,h

View File

@ -102,6 +102,7 @@ CLIENT_STATE::CLIENT_STATE() {
redirect_io = false;
disable_graphics = false;
work_fetch_no_new_work = false;
cant_write_state_file = false;
debt_interval_start = 0;
total_wall_cpu_time_this_debt_interval = 0;
@ -247,7 +248,7 @@ int CLIENT_STATE::init() {
msg_printf(NULL, MSG_USER_ERROR,
"Make sure directory permissions are set correctly"
);
return retval;
cant_write_state_file = true;
}
// scan user prefs; create file records
@ -421,8 +422,8 @@ void CLIENT_STATE::do_io_or_sleep(double x) {
if (n==0) break;
// Limit number of times thru this loop. Can get
// stuck in while loop, if network isn't available,
// Limit number of times thru this loop.
// Can get stuck in while loop, if network isn't available,
// DNS lookups tend to eat CPU cycles.
//
if (loops++ > 99) {
@ -459,6 +460,11 @@ bool CLIENT_STATE::poll_slow_events() {
#endif
now = dtime();
if (cant_write_state_file) {
return false;
}
if (now - old_now > POLL_INTERVAL*10) {
if (log_flags.network_status_debug) {
msg_printf(0, MSG_INFO,
@ -1210,7 +1216,6 @@ bool CLIENT_STATE::update_results() {
// (timeout or idle)
//
bool CLIENT_STATE::time_to_exit() {
if (!exit_when_idle && !exit_after_app_start_secs) return false;
if (exit_after_app_start_secs
&& (app_started>0)
&& ((now - app_started) >= exit_after_app_start_secs)
@ -1224,6 +1229,22 @@ bool CLIENT_STATE::time_to_exit() {
msg_printf(NULL, MSG_INFO, "exiting because no more results");
return true;
}
if (cant_write_state_file) {
static bool first = true;
double t = now - last_wakeup_time;
if (first && t > 50) {
first = false;
msg_printf(NULL, MSG_INFO,
"Can't write state file, exiting in 10 seconds"
);
}
if (t > 60) {
msg_printf(NULL, MSG_INFO,
"Can't write state file, exiting now"
);
return true;
}
}
return false;
}

View File

@ -161,7 +161,11 @@ public:
double now;
double last_wakeup_time;
bool initialized;
bool cant_write_state_file;
// failed to write state file.
// In this case we continue to run for 1 minute,
// handling GUI RPCs but doing nothing else,
// so that the Manager can tell the user what the problem is
private:
bool client_state_dirty;
int old_major_version;

View File

@ -1,6 +1,10 @@
<?
$project_news = array(
array("July 16, 2007",
"BOINC is now the preferred client software at
<a href=http://worldcommunitygrid.org>World Community Grid</a>."
),
array("July 12, 2007",
"<a href=http://boinc.gorlaeus.net/>Leiden Classical</a>
is using BOINC for education - it provides a

View File

@ -51,7 +51,6 @@ function show_detail($v) {
dl_item("File (click to download)", "$dlink ($s MB)");
dl_item("Version number", $num);
dl_item("Release date", $date);
dl_item("Installer type", $type);
//dl_item("MD5 checksum of download file", $md);
if ($features) {
dl_item ("New features", $features);
@ -106,7 +105,7 @@ function show_version($pname, $i, $v) {
$status = $v["status"];
if (is_dev($v)) {
$status = $status."
<font color=dd0000><b>
<br><font color=ff0000><b>
(MAY BE UNSTABLE - USE ONLY FOR TESTING)
</b></font>
";
@ -122,9 +121,6 @@ function show_version($pname, $i, $v) {
<td>
<a href=".$url_base.$file."><b>Download</b></a> ($s MB)
</td>
<td>
Instructions: $type_text
</td>
<td width=1%>
<a href=download_all.php?platform=$pname&version=$num&type=$type><nobr>version details</nobr></a>
</td>
@ -206,15 +202,15 @@ if ($xml) {
<p>
If your computer is not of one of these types, you can
<ul>
<li> <a href=anonymous_platform.php>make your own client software</a> or
<li> <a href=download_other.php>download executables from a third-party site</a>
<li> <a href=trac/wiki/AnonymousPlatform>make your own client software</a> or
<li> <a href=trac/wiki/DownloadOther>download executables from a third-party site</a>
(available for Solaris/Opteron, Linux/Opteron, Linux/PPC, HP-UX, and FreeBSD, and others).
</ul>
BOINC is not available for Mac OS 9 or earlier.
There are no plans to develop an OS 9 version.
<p>
The Windows BOINC client can be
<a href=win_deploy.php>deployed across a Windows network
<a href=trac/wiki/WinDeploy>deployed across a Windows network
using Active Directory</a>.
";
}
@ -223,7 +219,7 @@ if ($xml) {
Download information can be restricted by
platform and/or version number,
and can be obtained in XML format.
<a href=download_info.php>Details</a>.
<a href=trac/wiki/DownloadInfo>Details</a>.
";
page_tail();
}