On Tue, May 24, 2011 at 09:55:16PM +0300, Niko Tyni wrote:
> Package: perl
> Version: 5.12.3-5
> Severity: important
> X-Debbugs-Cc: kfreebsd-am...@buildd.debian.org
> 
> Both 5.12.3-5 and 5.12.3-7 failed to build on fano.debian.org due
> to failures in cpan/Sys-Syslog/t/syslog.t. 5.12.3-6 built fine on
> fasch.debian.org.

I was finally able to reproduce this with the attached test script.

Looks like openlog() on an inet socket is racy on kfreebsd when
syslog remote reception is disabled.

On my Linux system this test succeeds all the time. On a uniprocessor
kvm kfreebsd-amd64 system with one processor I get a very occasional
single failure. However, on the same kvm kfreebsd-amd64 system with two
processors ("kvm -smp 2") about 90% or so of the test tries fail.

It would be interesting to test this on a real FreeBSD SMP system.
Will probably set up one when I find the time.
-- 
Niko Tyni   nt...@debian.org
#!/usr/bin/perl -w
use strict;
use Sys::Syslog qw/setlogsock openlog/;

setlogsock("inet");

my $r;
my $i=1;
my $MAX = 100;

print "1..$MAX\n";

do {
	$r = eval { openlog("perl", "ndelay", "local0") };
	my $ok = !$r and $@ =~ /no connection/;
	my $msg = "result " . ($r//"[undef]");
	my @err = split(/\n/, $@);
	$msg .= qq( error "$err[0]") if !$r;
	print (($ok ? "": "not ") . "ok $i # $msg\n");
} while $i++ < $MAX;

Reply via email to