]> git.sur5r.net Git - bacula/bacula/blob - bacula/patches/3.0.1-sd-hang.patch
Tweak keep readall error messages
[bacula/bacula] / bacula / patches / 3.0.1-sd-hang.patch
1
2  This patch can be applied to version 3.0.1 and fixes a 
3  a race condition that causes the SD to hang. This should
4  fix bug #1287.
5
6  Apply it to version 3.0.1 with:
7
8  cd <bacula-source>
9  patch -p0 <3.0.1-sd-hang.patch
10  ./configure <your-options>
11  make
12  ...
13  make install
14
15
16
17 Index: src/lib/jcr.c
18 ===================================================================
19 --- src/lib/jcr.c       (revision 8840)
20 +++ src/lib/jcr.c       (working copy)
21 @@ -518,6 +518,7 @@
22              jcr->JobId, jcr->use_count(), jcr->Job);
23     }
24     remove_jcr(jcr);                   /* remove Jcr from chain */
25 +   unlock_jcr_chain();
26  
27     dequeue_messages(jcr);
28     job_end_pop(jcr);                  /* pop and call hooked routines */
29 @@ -571,7 +572,6 @@
30        jcr->daemon_free_jcr(jcr);      /* call daemon free routine */
31     }
32  
33 -   unlock_jcr_chain();
34     free_common_jcr(jcr);
35     close_msg(NULL);                   /* flush any daemon messages */
36     garbage_collect_memory_pool();