Bug#834960: libdaemon-generic-perl: FTBFS too much often (failing tests)
On Sat, 17 Sep 2016 21:27:33 +0300, Niko Tyni wrote: > > From starting at t/daemon.t my guess is that we're seeing a race > > condition or some other timing issue here -- the daemon writes to a > > log file and the test reads the logfile, and in one case the log > > message doesn't seem to be there (yet?). At least that's my current > > guess. > Indeed, the daemon first opens the file for writing and only then writes > it (see the logger script at top of daemon.t), while the test waits for > existence (-e) and then proceeds to check the file contents. > > I think the attached patch should fix it. I was able to reproduce > the issue sporadically without the patch, and couldn't get it to > happen after applying this. Great, thanks. > > I'm tempted to mark this log-reading test as TODO since this seems a > > bit fragile. > No objections, but let's try the patch first? Sure, a fix is always better than a workaround :) Patch forwarded upstream, package uploaded. Cheers, gregor -- .''`. Homepage https://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06 : :' : Debian GNU/Linux user, admin, and developer - https://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- NP: Tony Joe White: Goin' Down Rockin' signature.asc Description: Digital Signature
Bug#834960: libdaemon-generic-perl: FTBFS too much often (failing tests)
On Sat, Sep 17, 2016 at 07:20:09PM +0200, gregor herrmann wrote: > CPAN RT has one issue; don't know if it's related: > https://rt.cpan.org/Public/Bug/Display.html?id=110239 I think it's a different issue. > From starting at t/daemon.t my guess is that we're seeing a race > condition or some other timing issue here -- the daemon writes to a > log file and the test reads the logfile, and in one case the log > message doesn't seem to be there (yet?). At least that's my current > guess. Indeed, the daemon first opens the file for writing and only then writes it (see the logger script at top of daemon.t), while the test waits for existence (-e) and then proceeds to check the file contents. I think the attached patch should fix it. I was able to reproduce the issue sporadically without the patch, and couldn't get it to happen after applying this. > I'm tempted to mark this log-reading test as TODO since this seems a > bit fragile. No objections, but let's try the patch first? -- Niko >From 96209b5ba3df009a495da31bee8e2540c3365ec5 Mon Sep 17 00:00:00 2001 From: Niko Tyni Date: Sat, 17 Sep 2016 21:16:16 +0300 Subject: [PATCH] Fix a race condition in the test suite waiting for daemon log output There's a window where the daemon has created a log file but not yet written anything into it. Wait for the file to become nonempty before reading it to make sure we're past that window. Bug-Debian: https://bugs.debian.org/834960 --- t/daemon.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/daemon.t b/t/daemon.t index 30763df..548af21 100644 --- a/t/daemon.t +++ b/t/daemon.t @@ -200,7 +200,7 @@ sub do_test chomp($counter1); like($counter1, qr/^\d+$/, "counter1 - $name"); - expect { -e "$tmp/log" }; + expect { -s "$tmp/log" }; like(read_file("$tmp/log"), qr/START LOG/, "logged output"); expect { my @l = read_file("$tmp/log"); @l > 1 }; -- 2.9.3
Bug#834960: libdaemon-generic-perl: FTBFS too much often (failing tests)
On Sun, 21 Aug 2016 02:21:52 +0200, gregor herrmann wrote: > > I tried to build this package in stretch with "dpkg-buildpackage -A" > > (which is what the "Arch: all" autobuilder would do to build it) > > but it failed: > Builds fine for me (amd64 sind cowbuilder). Some additional information: cpantesters have very few failures, but they are all the same as what we see in Santiago#s logs: http://www.cpantesters.org/cpan/report/8fb11c8e-0653-11e6-a2e4-45f0fcd2507e http://www.cpantesters.org/cpan/report/9c628bfa-2171-11e6-8c16-9a987137e9a4 http://www.cpantesters.org/cpan/report/66c774ca-7a7b-11e6-979d-6531eb7e2f12 http://www.cpantesters.org/cpan/report/a8b80e96-3132-11e5-8118-e820f1b6abcd CPAN RT has one issue; don't know if it's related: https://rt.cpan.org/Public/Bug/Display.html?id=110239 Personally I still can't reproduce the bug. From starting at t/daemon.t my guess is that we're seeing a race condition or some other timing issue here -- the daemon writes to a log file and the test reads the logfile, and in one case the log message doesn't seem to be there (yet?). At least that's my current guess. I'm tempted to mark this log-reading test as TODO since this seems a bit fragile. Thoughts? Cheers, gregor -- .''`. Homepage https://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06 : :' : Debian GNU/Linux user, admin, and developer - https://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- NP: Pogues: Lullaby Of London signature.asc Description: Digital Signature
Bug#834960: libdaemon-generic-perl: FTBFS too much often (failing tests)
Control: tag -1 + unreproducible On Sun, 21 Aug 2016 01:41:03 +0200, Santiago Vila wrote: > Package: src:libdaemon-generic-perl > Version: 0.84-1 > Severity: serious > > Dear maintainer: > > I tried to build this package in stretch with "dpkg-buildpackage -A" > (which is what the "Arch: all" autobuilder would do to build it) > but it failed: Builds fine for me (amd64 sind cowbuilder). Cheers, gregor -- .''`. Homepage https://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06 : :' : Debian GNU/Linux user, admin, and developer - https://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- NP: Diana Krall: The Boulevard Of Broken Dreams signature.asc Description: Digital Signature
Processed: Re: Bug#834960: libdaemon-generic-perl: FTBFS too much often (failing tests)
Processing control commands: > tag -1 + unreproducible Bug #834960 [src:libdaemon-generic-perl] libdaemon-generic-perl: FTBFS too much often (failing tests) Added tag(s) unreproducible. -- 834960: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=834960 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems
Bug#834960: libdaemon-generic-perl: FTBFS too much often (failing tests)
Package: src:libdaemon-generic-perl Version: 0.84-1 Severity: serious Dear maintainer: I tried to build this package in stretch with "dpkg-buildpackage -A" (which is what the "Arch: all" autobuilder would do to build it) but it failed: [...] debian/rules build-indep dh build-indep dh_testdir -i dh_update_autotools_config -i dh_auto_configure -i perl -I. Makefile.PL INSTALLDIRS=vendor Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Daemon::Generic Writing MYMETA.yml and MYMETA.json dh_auto_build -i make -j1 [... snipped ...] ok 28 - process 31310 is alive - event ok 29 - config ok - event ok 30 - running ok 31 - kill message ok 32 - process is dead - event ok 33 - config ok ok 34 - not running ok 35 - restart message - start - event ok 36 - restart message - kill ok 37 - restart message - start - event ok 38 - check ok 39 - stop message ok 40 - check - event ok 41 - start message - anyevent ok 42 - pid ok 43 - counter1 - anyevent ok 44 - logged output ok 45 - daemonized ok 46 - reconfig message ok 47 - counter2 ok 48 - process 31381 is alive - anyevent ok 49 - config ok - anyevent ok 50 - running ok 51 - kill message ok 52 - process is dead - anyevent ok 53 - config ok ok 54 - not running ok 55 - restart message - start - anyevent ok 56 - restart message - kill ok 57 - restart message - start - anyevent ok 58 - check ok 59 - stop message ok 60 - check - anyevent ok 61 - finished 1..61 Dubious, test returned 1 (wstat 256, 0x100) Failed 1/61 subtests Test Summary Report --- t/daemon.t (Wstat: 256 Tests: 61 Failed: 1) Failed test: 4 Non-zero exit status: 1 Files=1, Tests=61, 33 wallclock secs ( 0.03 usr 0.01 sys + 1.78 cusr 0.18 csys = 2.00 CPU) Result: FAIL Failed 1/1 test programs. 1/61 subtests failed. Makefile:858: recipe for target 'test_dynamic' failed make[1]: *** [test_dynamic] Error 1 make[1]: Leaving directory '/<>' dh_auto_test: make -j1 test TEST_VERBOSE=1 returned exit code 2 debian/rules:4: recipe for target 'build-indep' failed make: *** [build-indep] Error 2 dpkg-buildpackage: error: debian/rules build-indep gave error exit status 2 Because this source package only generates "Arch: all" packages, this is the same as a FTBFS bug in the usual sense, and the fact that I was doing "dpkg-buildpackage -A" does not mean anything special. I attach three build logs. There are more here: https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/libdaemon-generic-perl.html Thanks. libdaemon-generic-perl_0.84-1_amd64-20160814T1442Z.gz Description: application/gzip libdaemon-generic-perl_0.84-1_amd64-20160816T2138Z.gz Description: application/gzip libdaemon-generic-perl_0.84-1_amd64-20160820T223119Z.gz Description: application/gzip