[Bucardo-general] SIGPIPE Problems

Ben Allen bsa at lanl.gov
Tue Mar 31 07:10:21 UTC 2009


Another interesting and frustrating error, that I think coincides with  
updating some perl modules, that or a possible a recent Bucardo  
update? I didn't see anything in the git log that was obvious, sans my  
sendmail patch which I checked.

The symptoms are on start of Bucardo if sendmail is enabled, the  
initial startup email will be sent, and then the program will hang and  
not continue.

The interesting part of it is that the error doesn't happen if I  
disable sendmail. However if sendmail is enabled (--sendmail=1), $self- 
 >{masterdbh}->disconnect(); on line 1099 of Bucardo.pm hangs with a  
SIGPIPE. If I wrap that line in an eval I get the following error:

Mar 31 00:10:05 Bucardo[34318]: MCP Line 1099: Line 44: Caught a  
SIGPIPE at /usr/local/lib/perl5/site_perl/5.8.9/Bucardo.pm line 1099

After the error is printed out via glog, the program continues on and  
starts up correctly.

The disconnect wrapped with an eval:
eval { $self->{masterdbh}->disconnect(); }; $self->glog($@) if $@;

I can not for the life of me figure out why the heck that disconnect  
all of sudden is failing with a SIGPIPE, and what it the world it has  
to do with sending mail. Likely this is going to be a FreeBSD specific  
bug as it seems I've had some other SIGPIPE errors where Greg was not  
able to reproduce them on a Linux system.

On a side note, along my debugging way I rewrote send_mail to use  
Net::SMTP instead of Mail::Sendmail. Net::SMTP has been included with  
Perl for a while so it'd be removing one dependance from Bucardo. If  
we feel like this is a good idea let me know and I'll submit a patch.

On a second side note, possible more related to the above problem, I  
was asking about a SIGPIPE problem when running bucardo_ctl without -- 
dbhost a few months ago. It still exists when I run bucardo without  
options. However If I pass it --dbhost or --sendmail (each can stand  
alone without the other option) no SIGPIPE is displayed. Even though  
an error is shown Bucardo starts normally. Output of the error is:

[ballen ~]$ sudo bucardo_ctl start "Starting Up"
Checking for existing processes
Removing /var/run/bucardo/fullstopbucardo
Starting Bucardo
	(in cleanup) Line 220: Line 44: Caught a SIGPIPE at /usr/local/lib/ 
perl5/site_perl/5.8.9/mach/Class/MOP/Class.pm line 220


For reference installed Perl modules and versions:

perl-5.8.9_2
bsdpan-Bucardo-3.2.7
bsdpan-DBIx-Safe-1.2.5
p5-Algorithm-C3-0.07
p5-Class-C3-0.21
p5-Class-MOP-0.79
p5-DBD-Pg-2.11.8
p5-DBI-1.60.7
p5-Data-OptList-0.104
p5-Devel-GlobalDestruction-0.02
p5-Error-0.17015
p5-ExtUtils-CBuilder-0.24
p5-ExtUtils-MakeMaker-6.50
p5-ExtUtils-ParseXS-2.19
p5-Filter-Simple-0.84
p5-IO-Socket-SSL-1.23
p5-List-MoreUtils-0.22
p5-MIME-Base64-3.07
p5-MRO-Compat-0.10
p5-Mail-Sendmail-0.79
p5-Module-Build-0.32
p5-Moose-0.73
p5-Net-SMTP-SSL-1.01
p5-Net-SSLeay-1.35_1
p5-Params-Util-0.38
p5-Scalar-List-Utils-1.19,1
p5-Scope-Guard-0.03
p5-Spiffy-0.30
p5-Storable-2.18
p5-Sub-Exporter-0.982
p5-Sub-Identify-0.04
p5-Sub-Install-0.925
p5-Sub-Name-0.04
p5-Task-Weaken-1.02
p5-Test-Base-0.55
p5-YAML-0.68
p5-gettext-1.05_2
p5-version-0.76


Any ideas?

Thanks,

Ben


More information about the Bucardo-general mailing list