[Bucardo-general] Kid Dies When using Syslog for Logging

Ben Allen bsa at lanl.gov
Sat Jan 10 00:03:34 UTC 2009


Well heres a strange one, but I finally narrowed it down to logging  
to syslog. When logging to syslog is enabled kids will die and the  
sync will not finish.

Error messages that  I see when this happens:

If debugstderr is enabled in addition to syslog in /var/log/messages:
print() on closed filehandle STDERR at /usr/local/lib/perl5/site_perl/ 
5.8.8/Bucardo.pm line 767.

If debugstdout is enabled in addition to syslog in /var/log/messages:
print() on closed filehandle STDOUT at /usr/local/lib/perl5/site_perl/ 
5.8.8/Bucardo.pm line 768.

The above messages are repeated many many times.

If just debugsyslog is enabled /var/log/messages just gets the last  
SQL statement before the kid dies is printed.

In /var/log/bucardo.log (where syslog points local0.* to):

Jan  9 15:41:39 Bucardo[2453]: KID Action summary: 1:188
Jan  9 15:41:41 Bucardo[2361]: CTL Rows updated child 2453 to aborted  
in q: 1
Jan  9 15:41:41 Bucardo[2361]: CTL Warning! Kid 2453 seems to have  
died. Sync "test_sync"

In PostgreSQL's log file the only errors seen are a number of similar  
logs as below:
ERROR:  prepared statement "dbdpg_p6771_2" does not exist
STATEMENT:  DEALLOCATE dbdpg_p6771_2

Logging to a file with debugfile works correctly and no kids die.


My last oddity is if I don't specify --dbhost=localhost on the  
command line i will get the following error:

$ bucardo_ctl start test
Checking for existing processes
Removing /var/run/bucardo/fullstopbucardo
Starting Bucardo
	(in cleanup) Line 219: Line 269: Caught a SIGPIPE at /usr/local/lib/ 
perl5/site_perl/5.8.8/mach/Class/MOP/Class.pm line 219

Bucardo appears to startup after this and function as if I'd use the  
--dbhost option.

My current sync is a multi-master swap with about 13 tables, many  
with multi-pkeys. All are set for "latest" conflict resolution. I'm  
using the latest pull from Git of Bucardo. Running on FreeBSD 6.3  
with PostgreSQL 8.2. Let me know if you want Perl module versions,  
more log files, etc.

Thanks,

Ben




More information about the Bucardo-general mailing list