From 7a8f01d1749d99f38d3f21755b26dd18f3116c10 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Tue, 2 Dec 2008 17:39:23 +0000 Subject: [PATCH] ebl Apply 2.4.3-prune-deadlock.patch that fixes a problem when using Catalog as message backend. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@8101 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/Patchnotes-2.4 | 2 ++ bacula/patches/2.4.3-prune-deadlock.patch | 35 +++++++++++++++++++++++ bacula/src/lib/jcr.c | 2 +- bacula/technotes-2.4 | 3 ++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 bacula/patches/2.4.3-prune-deadlock.patch diff --git a/bacula/Patchnotes-2.4 b/bacula/Patchnotes-2.4 index ce26d19059..048952fde7 100644 --- a/bacula/Patchnotes-2.4 +++ b/bacula/Patchnotes-2.4 @@ -5,6 +5,8 @@ Patches Released to Source Forge: 2.4.3-orphaned-jobs.patch Patches Committed: +02Dec08 +2.4.3-prune-deadlock.patch 20Nov08 2.4.3-unique-inchanger.patch 2.4.3-win32-runscript-unicode-path.patch diff --git a/bacula/patches/2.4.3-prune-deadlock.patch b/bacula/patches/2.4.3-prune-deadlock.patch new file mode 100644 index 0000000000..1e26d374d1 --- /dev/null +++ b/bacula/patches/2.4.3-prune-deadlock.patch @@ -0,0 +1,35 @@ + + This patch corrects a deadlock that can occure when using the catalog + as message backend and the director decides to prune volumes. + + Apply it to Bacula 2.4.3 (possibly earlier versions) + with: + + cd + patch -p0 <2.4.3-prune-deadlock.patch + ./configure + make + ... + make install + + +Index: src/lib/jcr.c +=================================================================== +--- src/lib/jcr.c (révision 8063) ++++ src/lib/jcr.c (copie de travail) +@@ -438,7 +438,6 @@ + + #endif + +- dequeue_messages(jcr); + lock_jcr_chain(); + jcr->dec_use_count(); /* decrement use count */ + if (jcr->use_count() < 0) { +@@ -455,6 +454,7 @@ + remove_jcr(jcr); /* remove Jcr from chain */ + unlock_jcr_chain(); + ++ dequeue_messages(jcr); + job_end_pop(jcr); /* pop and call hooked routines */ + + Dmsg1(3400, "End job=%d\n", jcr->JobId); diff --git a/bacula/src/lib/jcr.c b/bacula/src/lib/jcr.c index ea82183cce..946ea760bb 100644 --- a/bacula/src/lib/jcr.c +++ b/bacula/src/lib/jcr.c @@ -438,7 +438,6 @@ void free_jcr(JCR *jcr) #endif - dequeue_messages(jcr); lock_jcr_chain(); jcr->dec_use_count(); /* decrement use count */ if (jcr->use_count() < 0) { @@ -455,6 +454,7 @@ void free_jcr(JCR *jcr) remove_jcr(jcr); /* remove Jcr from chain */ unlock_jcr_chain(); + dequeue_messages(jcr); job_end_pop(jcr); /* pop and call hooked routines */ Dmsg1(3400, "End job=%d\n", jcr->JobId); diff --git a/bacula/technotes-2.4 b/bacula/technotes-2.4 index 4730371a34..fe4d8fcece 100644 --- a/bacula/technotes-2.4 +++ b/bacula/technotes-2.4 @@ -1,6 +1,9 @@ Technical notes on version 2.4 General: +02Dec08 +ebl Apply 2.4.3-prune-deadlock.patch that fixes a problem when + using Catalog as message backend. 20Nov08 ebl Apply 2.4.3-win32-runscript-unicode-path.patch for #1110 about a problem when executing a program with Unicode path. -- 2.39.5