tag 627821 patch forwarded 627821 http://rt.cpan.org/Ticket/Display.html?id=69997 thanks
On Tue, Aug 02, 2011 at 06:16:19PM +0300, Niko Tyni wrote: > 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. There's already a workaround in the code for this on MacOS X (which is FreeBSD under the hood), so the attached patch should help. I've sent more elaborate patches upstream in [rt.cpan.org #69997]. -- Niko Tyni nt...@debian.org
>From f266a2ced9d0ce8740219a806c4010fb3487d64f Mon Sep 17 00:00:00 2001 From: Niko Tyni <nt...@debian.org> Date: Wed, 3 Aug 2011 22:36:24 +0300 Subject: [PATCH] Use a socket timeout on GNU/kFreeBSD to catch ICMP port unreachable messages Bug: http://rt.cpan.org/Ticket/Display.html?id=69997 Bug-Debian: http://bugs.debian.org/627821 Without this, openlog() on a UDP socket may succeed on the FreeBSD kernel even when there's no listener, causing test failures. It seems probable that all FreeBSD-based systems suffer from the same issue, but that's for upstream to decide. --- cpan/Sys-Syslog/Syslog.pm | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/cpan/Sys-Syslog/Syslog.pm b/cpan/Sys-Syslog/Syslog.pm index 002e6e4..b445c66 100644 --- a/cpan/Sys-Syslog/Syslog.pm +++ b/cpan/Sys-Syslog/Syslog.pm @@ -138,7 +138,10 @@ my @fallbackMethods = (); # happy, the timeout is now zero by default on all systems # except on OSX where it is set to 250 msec, and can be set # with the infamous setlogsock() function. -$sock_timeout = 0.25 if $^O =~ /darwin/; +# +# Debian change: include Debian GNU/kFreeBSD, lower to 1ms +# see [rt.cpan.org #69997] +$sock_timeout = 0.001 if $^O =~ /darwin|gnukfreebsd/; # coderef for a nicer handling of errors my $err_sub = $options{nofatal} ? \&warnings::warnif : \&croak;