]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Apply 2.4.3-prune-deadlock.patch that fixes a problem when
authorEric Bollengier <eric@eb.homelinux.org>
Tue, 2 Dec 2008 17:39:23 +0000 (17:39 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Tue, 2 Dec 2008 17:39:23 +0000 (17:39 +0000)
     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
bacula/patches/2.4.3-prune-deadlock.patch [new file with mode: 0644]
bacula/src/lib/jcr.c
bacula/technotes-2.4

index ce26d190598eda75d5324b8f6972266804a69dbe..048952fde72b1e968a01084159ca8f86ce1af5ed 100644 (file)
@@ -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 (file)
index 0000000..1e26d37
--- /dev/null
@@ -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 <bacula-source>
+ patch -p0 <2.4.3-prune-deadlock.patch
+ ./configure <your-options>
+ 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);
index ea82183ccef97450f4c4187cf3b5bc02450fa4b0..946ea760bbef95d873888cc2dc70858ca85cdaae 100644 (file)
@@ -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);
index 4730371a347e47c15f0916416cfbc96f67943042..fe4d8fcece22c407625815b3f4980fd2b4ee9124 100644 (file)
@@ -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.