From: Kern Sibbald Date: Sun, 24 Aug 2003 11:02:25 +0000 (+0000) Subject: Fix possible race in heartbeat; set gnome-console default size X-Git-Tag: Release-1.32~44 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a5d21828e2e53c17d0f8eafda107ba77ad5e0e97;p=bacula%2Fbacula Fix possible race in heartbeat; set gnome-console default size git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@675 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/kernstodo b/bacula/kernstodo index 9c7ef507cc..040852203f 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -1,5 +1,5 @@ Kern's ToDo List - 21 August 2003 + 24 August 2003 Documentation to do: (any release a little bit at a time) - Document running a test version. @@ -27,6 +27,21 @@ Testing to do: (painful) - Figure out how to use ssh or stunnel to protect Bacula communications. For 1.32: +- Write JobMedia records with max file size is reached on tape. +- Look at the possibility of loading only the necessary + data into the restore tree (i.e. do it one directory at a + time as the user walks through the tree). +- Possibly use the hash code if the user selects all. +- Handle the case of multiple JobMedia records pending (i.e. the + thread is slow and multiple situations requiring a JobMedia + record occur). +- Fix maximum file size (block.c) to generate JobMedia records. +- Do performance analysis on the restore tree routines. +- Implement forward spacing between files. +- Make the default file size 1GB on the tape. +- Orphaned Dir buffer at parse_conf.c:373 => store_dir +- Implement some way for the File daemon to contact the Director + to start a job or pass its DHCP obtained IP number. - Implement multiple Consoles. - Add Console usr permissions. - Fix "restore all" to bypass building the tree. @@ -807,4 +822,3 @@ Done: (see kernsdone for more) - Fix read_record to handle multiple sessions. - Tip from Steve Allam mt -f /dev/nst0 defblksize 0 - diff --git a/bacula/src/console.glade b/bacula/src/console.glade index 84b6eec753..08f3d57563 100644 --- a/bacula/src/console.glade +++ b/bacula/src/console.glade @@ -25,8 +25,10 @@ Bacula Console GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE + GTK_WIN_POS_CENTER False + 800 + 500 True True False diff --git a/bacula/src/filed/heartbeat.c b/bacula/src/filed/heartbeat.c index 05bd90229b..458871d372 100644 --- a/bacula/src/filed/heartbeat.c +++ b/bacula/src/filed/heartbeat.c @@ -96,15 +96,19 @@ void start_heartbeat_monitor(JCR *jcr) /* Terminate the heartbeat thread. Used for both SD and DIR */ void stop_heartbeat_monitor(JCR *jcr) { - /* Wait for heartbeat thread to start */ - while (jcr->hb_bsock == NULL) { + int cnt = 0; + /* Wait max 10 secs for heartbeat thread to start */ + while (jcr->hb_bsock == NULL && cnt++ < 200) { bmicrosleep(0, 50); /* avoid race */ } - jcr->hb_bsock->timed_out = 1; /* set timed_out to terminate read */ - jcr->hb_bsock->terminated = 1; /* set to terminate read */ - /* Wait for heartbeat thread to stop */ - while (jcr->hb_bsock) { + if (jcr->hb_bsock) { + jcr->hb_bsock->timed_out = 1; /* set timed_out to terminate read */ + jcr->hb_bsock->terminated = 1; /* set to terminate read */ + } + cnt = 0; + /* Wait max 100 secs for heartbeat thread to stop */ + while (jcr->hb_bsock && cnt++ < 200) { /* Naturally, Cygwin 1.3.20 craps out on the following */ pthread_kill(jcr->heartbeat_id, TIMEOUT_SIGNAL); /* make heartbeat thread go away */ bmicrosleep(0, 500); diff --git a/bacula/src/version.h b/bacula/src/version.h index ed92ba85dc..338f62dda7 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -2,8 +2,8 @@ #undef VERSION #define VERSION "1.32" #define VSTRING "1" -#define BDATE "20 Aug 2003" -#define LSMDATE "20Aug03" +#define BDATE "24 Aug 2003" +#define LSMDATE "24Aug03" /* Debug flags */ #undef DEBUG