From: Alain Spineux Date: Thu, 18 Mar 2021 09:23:53 +0000 (+0100) Subject: Fix FD crash when the SD disk is full introduced with SDPacketCheck feature X-Git-Tag: Release-11.3.2~617 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=802b3743a78f48c2f8ab3e876062cc6904c68611;p=thirdparty%2Fbacula.git Fix FD crash when the SD disk is full introduced with SDPacketCheck feature Description: ------------ The FD crash when the SD send back a message to the FD (for example when the disk is full) This issue was introduced in 12.6.2 with SDPacketCheck feature Workaround: ----------- Set SDPacketCheck to some value in the bacula-fd.conf Details: -------- bnet_poll_manager cannot handle error msg from SD - FD get a "3999 Failed append\n" in the hearbeat while jcr->sd_packet_mgr was already set to NULL --- diff --git a/bacula/src/filed/heartbeat.c b/bacula/src/filed/heartbeat.c index f57fa705d..e002797dd 100644 --- a/bacula/src/filed/heartbeat.c +++ b/bacula/src/filed/heartbeat.c @@ -107,7 +107,11 @@ extern "C" void *sd_heartbeat_thread(void *arg) Dmsg2(100, "Got m=%d BNET_SIG %d from SD\n", m, sd->msglen); } else { Dmsg3(100, "Got m=%d msglen=%d bytes from SD. MSG=%s\n", m, sd->msglen, sd->msg); - jcr->sd_packet_mgr->recv(jcr, sd->msg); // Might be to ack a POLL request + if (jcr->sd_packet_mgr) + { + // Might be to ack a POLL request + jcr->sd_packet_mgr->recv(jcr, sd->msg); + } } } Dmsg2(200, "wait_intr=%d stop=%d\n", n, sd->is_stop());