From ae216ad4bccbb09d5610a662fa93648358e2a11c Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 19 Dec 2012 15:27:10 -0500 Subject: [PATCH] Do not have the VAC daemon re-use the "masterdbh" name as this can lead to a race condition causing a core dump. Hopefully this clears it up. --- Bucardo.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Bucardo.pm b/Bucardo.pm index 860944bc3..fc587f72d 100644 --- a/Bucardo.pm +++ b/Bucardo.pm @@ -6454,7 +6454,7 @@ sub fork_vac { $self->glog(qq{${warn}VAC was killed at line $line: $diemsg}, LOG_WARN); ## Not a whole lot of cleanup to do on this one: just shut database connections and leave - $self->{masterdbh}->disconnect(); + $self->{masterdbhvac}->disconnect(); ## Remove our pid file unlink $self->{vacpidfile} or $self->glog("Warning! Failed to unlink $self->{vacpidfile}", LOG_WARN); @@ -6464,8 +6464,8 @@ sub fork_vac { }; ## end SIG{__DIE_} handler sub ## Connect to the master database (overwriting the pre-fork MCP connection) - ($self->{master_backend}, $self->{masterdbh}) = $self->connect_database(); - my $maindbh = $self->{masterdbh}; + ($self->{master_backend}, $self->{masterdbhvac}) = $self->connect_database(); + my $maindbh = $self->{masterdbhvac}; $self->glog("Bucardo database backend PID: $self->{master_backend}", LOG_VERBOSE); ## Map the PIDs to common names for better log output -- 2.39.5