From 9ab9ae753085cb3e2cb2e06661e13f18d1ea6ff5 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sun, 2 Nov 2008 13:54:49 +0000 Subject: [PATCH] Commit orphaned job fix git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7967 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/patches/2.4.3-orphaned-jobs.patch | 24 ++++++++++++++++++++++++ bacula/patchnotes-2.4 | 5 +++++ bacula/src/dird/ua_prune.c | 1 + bacula/technotes-2.4 | 8 +++++--- 4 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 bacula/patches/2.4.3-orphaned-jobs.patch diff --git a/bacula/patches/2.4.3-orphaned-jobs.patch b/bacula/patches/2.4.3-orphaned-jobs.patch new file mode 100644 index 0000000000..6162c9e95a --- /dev/null +++ b/bacula/patches/2.4.3-orphaned-jobs.patch @@ -0,0 +1,24 @@ + + This patch fixes a case of orphaned jobs (and possible deadlock) + during pruning. + Apply it to Bacula 2.4.3 (possibly earlier versions) with: + + cd + patch -p0 <2.4.3-orphaned-jobs.patch + ./configure + make + ... + make install + +Index: src/dird/ua_prune.c +=================================================================== +--- src/dird/ua_prune.c (revision 7949) ++++ src/dird/ua_prune.c (working copy) +@@ -468,6 +468,7 @@ + break; + } + } ++ endeach_jcr(jcr); + if (skip) { + continue; + } diff --git a/bacula/patchnotes-2.4 b/bacula/patchnotes-2.4 index 6ac66e9439..1a709a41c0 100644 --- a/bacula/patchnotes-2.4 +++ b/bacula/patchnotes-2.4 @@ -5,6 +5,7 @@ Patches Released to Source Forge: Patches Committed: 28Oct08 +2.4.3-orphaned-jobs.patch 2.4.3-migrate-log.patch 2.4.3-migrate.patch 2.4.3-prune.patch @@ -12,6 +13,10 @@ Patches Committed: 2.4.3-win32-runscript-unicode-path.patch Patches being Tested: +02Nov08 +2.4.3-orphaned-jobs.patch +kes This patch fixes a case of orphaned jobs (and possible deadlock) + during pruning. 28Oct08 2.4.3-migrate-log.patch kes This patch should cause all Job Log records to be migrated when the diff --git a/bacula/src/dird/ua_prune.c b/bacula/src/dird/ua_prune.c index 19bc1d4f6e..3d91cc2329 100644 --- a/bacula/src/dird/ua_prune.c +++ b/bacula/src/dird/ua_prune.c @@ -468,6 +468,7 @@ int get_prune_list_for_volume(UAContext *ua, MEDIA_DBR *mr, del_ctx *del) break; } } + endeach_jcr(jcr); if (skip) { continue; } diff --git a/bacula/technotes-2.4 b/bacula/technotes-2.4 index 7a363ea640..01548ef6a1 100644 --- a/bacula/technotes-2.4 +++ b/bacula/technotes-2.4 @@ -1,6 +1,8 @@ Technical notes on version 2.4 General: +02Nov08 +kes Fix orphaned jobs (possible deadlock) while pruning. 31Oct08 ebl Backport of the btraceback script that keeps trace file on working dir 28Oct08 @@ -8,7 +10,7 @@ kes Migrate DB Log records too. This fixes last part of bug #1171. 24Oct08 kes Modify SQL so that jobs that failed will not be migrated. kes Correct bug where long retention periods caused immediate - prunning. + pruning. Release Version 2.4.3 27Oct08 @@ -69,7 +71,7 @@ kes Break the do_swapping into do_unload, do_swapping, and kes Implement a set_dcr_from_vol subroutine in acquire.c for reading volumes. This allows the dcr to be refreshed after being zapped when the wrong volume is mounted. - This should fix bug #1126 -- During multiple tape restore, bacula + This should fix bug #1126 -- During multiple tape restore, Bacula does not ask for physical tape change, but rereads same tape 23Jul08 kes Apply patch submitted for bug #1107 with a small modification. @@ -129,7 +131,7 @@ Release Beta version 2.4.1-b1 kes Back out bad src/lib/base64.c change. 27Jun08 kes Generally clean up the manual tape loading code. The main - conceptial change is that when a volume is marked to be unloaded, + conceptual change is that when a volume is marked to be unloaded, its volume name is retained, and it is only marked as unloaded when either the autoloader says it is unloaded or another tape is read on that drive. -- 2.39.5