From b13ad4da38a55234bdee6c3d3febf8748578cc74 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 9 May 2008 16:27:20 +0000 Subject: [PATCH] David May 9 2008 - client: increase timeout from 5 sec to 60; this gives the diagnostic system time to download symbol files (which may be several MB) and write a stack trace. svn path=/trunk/boinc/; revision=15162 --- checkin_notes | 10 ++++++++++ client/app.C | 13 +++++++++---- client/app_control.C | 3 --- client/app_start.C | 4 ++++ 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/checkin_notes b/checkin_notes index eac6c1e630..50755c74a0 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3761,3 +3761,13 @@ Rom May 9 2008 lib/ stackwalker_win.cpp + +David May 9 2008 + - client: increase timeout from 5 sec to 60; + this gives the diagnostic system time to download + symbol files (which may be several MB) and write a stack trace. + + client/ + app.C + app_control.C + app_start.C diff --git a/client/app.C b/client/app.C index b0350036a6..1e610f8c01 100644 --- a/client/app.C +++ b/client/app.C @@ -31,9 +31,7 @@ #ifndef _WIN32 -#if HAVE_UNISTD_H #include -#endif #if HAVE_SYS_WAIT_H #include #endif @@ -79,6 +77,13 @@ using std::max; using std::min; +#define ABORT_TIMEOUT 60 + // if we send app request, wait this long before killing it. + // This gives it time to download symbol files (which can be several MB) + // and write stack trace to stderr +#define QUIT_TIMEOUT 10 + // Same, for . Shorter because no stack trace is generated + ACTIVE_TASK::~ACTIVE_TASK() { #ifndef SIM cleanup_task(); @@ -311,12 +316,12 @@ bool ACTIVE_TASK_SET::poll() { for (i=0; itask_state() == PROCESS_ABORT_PENDING) { - if (gstate.now > atp->abort_time + 5.0) { + if (gstate.now > atp->abort_time + ABORT_TIMEOUT) { atp->kill_task(false); } } if (atp->task_state() == PROCESS_QUIT_PENDING) { - if (gstate.now > atp->quit_time + 10.0) { + if (gstate.now > atp->quit_time + QUIT_TIMEOUT) { atp->kill_task(true); } } diff --git a/client/app_control.C b/client/app_control.C index c6436a52fb..fa98b2c433 100644 --- a/client/app_control.C +++ b/client/app_control.C @@ -33,10 +33,7 @@ #else #include "config.h" - -#ifdef HAVE_UNISTD_H #include -#endif #if HAVE_SYS_IPC_H #include diff --git a/client/app_start.C b/client/app_start.C index 1be03a571e..cff844ad19 100644 --- a/client/app_start.C +++ b/client/app_start.C @@ -743,6 +743,10 @@ int ACTIVE_TASK::start(bool first_time) { // If an error happens, // exit nonzero so that the core client knows there was a problem. + // close descriptors + // + fclose(stdout); + // add project dir to library path // char libpath[8192];