On 19.01.21 19:40, Martin Simmons wrote:
I say "in theory" because it looks like Bacula 9.6.4 broke this!
What is the output of "show catalog" in bconsole? My guess is that you will
see db_driver=MySQ i.e. missing the final "L" of MySQL. This will prevent it
from reusing the BDB object, leading to unexpected concurrency.
The bug is caused by this change:
diff --git a/bacula/src/dird/dird.c b/bacula/src/dird/dird.c
index fdb1d97bf9..11c4406ea7 100644
--- a/bacula/src/dird/dird.c
+++ b/bacula/src/dird/dird.c
@@ -1265,7 +1265,7 @@ static bool check_catalog(cat_op mode)
/* To copy dbdriver field into "CAT" catalog resource class (local)
* from dbdriver in "BDB" catalog DB Interface class (global)
*/
- strncpy(catalog->db_driver, BDB_db_driver, db_driver_len);
+ bstrncpy(catalog->db_driver, BDB_db_driver, db_driver_len);
}
}
which was part of 9.6.4.
To fix it, replace db_driver_len with db_driver_len+1 in this call to
bstrncpy. This has been fixed in Bacula 11 because the seemingly minor
problem with "status catalog" was reported in
https://bugs.bacula.org/view.php?id=2551 but it looks like the significance of
it wasn't realized.
This is so very amazing! I think this may also explain and cure the
deadlock problems we have been seeing since 9.6.4.
And also me wondering why suddenly Bacula needed so many more database
connections since 9.6.4 in contrast to before.
Phil, I am pulling your patch for Gentoo for Debian to get this fix into
Bullseye ASAP.
Grüße,
Sven.
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel