From e109e8a101b43b9e9d19506234ab2a0dd1aa72fd Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 3 Jul 2008 14:46:12 +0000 Subject: [PATCH] Make watchdog connect timeout queue messages rather than sending directly to avoid lock conflicts with the real thread. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7298 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/lib/jcr.c | 10 +++++----- bacula/technotes-2.4 | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bacula/src/lib/jcr.c b/bacula/src/lib/jcr.c index 3ce86e23f4..cd406150e4 100644 --- a/bacula/src/lib/jcr.c +++ b/bacula/src/lib/jcr.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2007 Free Software Foundation Europe e.V. + Copyright (C) 2000-2008 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -428,7 +428,7 @@ void free_jcr(JCR *jcr) lock_jcr_chain(); jcr->dec_use_count(); /* decrement use count */ if (jcr->use_count() < 0) { - Emsg2(M_ERROR, 0, _("JCR use_count=%d JobId=%d\n"), + Jmsg2(jcr, M_ERROR, 0, _("JCR use_count=%d JobId=%d\n"), jcr->use_count(), jcr->JobId); } Dmsg3(3400, "Dec free_jcr 0x%x use_count=%d jobid=%d\n", jcr, jcr->use_count(), jcr->JobId); @@ -758,7 +758,7 @@ static void jcr_timeout_check(watchdog_t *self) if (timer_start && (watchdog_time - timer_start) > fd->timeout) { fd->timer_start = 0; /* turn off timer */ fd->set_timed_out(); - Jmsg(jcr, M_ERROR, 0, _( + Qmsg(jcr, M_ERROR, 0, _( "Watchdog sending kill after %d secs to thread stalled reading Storage daemon.\n"), watchdog_time - timer_start); pthread_kill(jcr->my_thread_id, TIMEOUT_SIGNAL); @@ -770,7 +770,7 @@ static void jcr_timeout_check(watchdog_t *self) if (timer_start && (watchdog_time - timer_start) > fd->timeout) { fd->timer_start = 0; /* turn off timer */ fd->set_timed_out(); - Jmsg(jcr, M_ERROR, 0, _( + Qmsg(jcr, M_ERROR, 0, _( "Watchdog sending kill after %d secs to thread stalled reading File daemon.\n"), watchdog_time - timer_start); pthread_kill(jcr->my_thread_id, TIMEOUT_SIGNAL); @@ -782,7 +782,7 @@ static void jcr_timeout_check(watchdog_t *self) if (timer_start && (watchdog_time - timer_start) > fd->timeout) { fd->timer_start = 0; /* turn off timer */ fd->set_timed_out(); - Jmsg(jcr, M_ERROR, 0, _( + Qmsg(jcr, M_ERROR, 0, _( "Watchdog sending kill after %d secs to thread stalled reading Director.\n"), watchdog_time - timer_start); pthread_kill(jcr->my_thread_id, TIMEOUT_SIGNAL); diff --git a/bacula/technotes-2.4 b/bacula/technotes-2.4 index 28f2aadb20..c4038e1980 100644 --- a/bacula/technotes-2.4 +++ b/bacula/technotes-2.4 @@ -2,6 +2,8 @@ General: 03Jul08 +kes Make watchdog connect timeout queue messages rather than sending + directly to avoid lock conflicts with the real thread. kes Remove const char that causes problems with Python, which has older 'incorrect' headers. kes Add const char in dbd.c to avoid compiler warnings. -- 2.39.5