Bug 1248968 - perl-Test-NeedsDisplay-1.07-11.fc24 FTBFS randomly
Summary: perl-Test-NeedsDisplay-1.07-11.fc24 FTBFS randomly
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-Test-NeedsDisplay
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-31 08:48 UTC by Petr Pisar
Modified: 2015-08-27 16:09 UTC (History)
3 users (show)

Fixed In Version: perl-Test-NeedsDisplay-1.07-13.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-27 16:09:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
CPAN 106699 0 None None None Never

Description Petr Pisar 2015-07-31 08:48:52 UTC
perl-Test-NeedsDisplay-1.07-11.fc24 fails to build sometimes because tests sometimes fail:

+ make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-
e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arc
h')" t/*.t
t/01_compile.t ... ok
t/02_skip_all.t .. ok
t/10_run.t ....... skipped: No /usr/bin/xeyes
/usr/bin/xvfb-run: line 171: kill: (25932) - No such process
t/11_run.t ....... skipped: No /usr/bin/xeyes
t/12_run.t ....... skipped: No /usr/bin/xeyes
t/97_meta.t ...... skipped: Author tests not required for installation
t/98_pod.t ....... skipped: Author tests not required for installation
t/99_pmv.t ....... skipped: Author tests not required for installation
Test Summary Report
-------------------
t/11_run.t     (Wstat: 256 Tests: 0 Failed: 0)
  Non-zero exit status: 1
Files=8, Tests=3, 13 wallclock secs ( 0.03 usr  0.01 sys +  0.54 cusr  0.11 csys
 =  0.69 CPU)
Result: FAIL

Comment 1 Petr Pisar 2015-08-27 14:25:30 UTC
The reproducer is:

$ while (prove -v -b t/10_run.t t/11_run.t); do :; done 
t/10_run.t .. 
# No DISPLAY. Looking for xvfb-run...
# Restarting with xvfb-run...
1..2
ok 1 - running xeyes
# PID 11643
ok 2
ok
t/11_run.t .. 
# No DISPLAY. Looking for xvfb-run...
# Restarting with xvfb-run...
1..2
Error: Can't open display: :99
ok 1 - running xeyes
# PID 11661
ok 2
/usr/bin/xvfb-run: line 171: kill: (11657) - No such process
Dubious, test returned 1 (wstat 256, 0x100)
All 2 subtests passed

Comment 2 Petr Pisar 2015-08-27 15:07:12 UTC
First failure in Koschei <https://apps.fedoraproject.org/koschei/package/perl-Test-NeedsDisplay/727095> is:

        systemd-libs 	223-2.git65c85ef.... 	> 	224-1.fc24
	libuuid 	2.26.2-3.fc24 	> 	2.27-0.1.fc24
	systemd 	223-2.git65c85ef.... 	> 	224-1.fc24
	libmount 	2.26.2-3.fc24 	> 	2.27-0.1.fc24
	libfdisk 	2.26.2-3.fc24 	> 	2.27-0.1.fc24
	python3-dnf 	1.0.2-2.fc24.1 	> 	1.0.2-3.fc24
	dnf-conf 	1.0.2-2.fc24.1 	> 	1.0.2-3.fc24
	util-linux 	2.26.2-3.fc24 	> 	2.27-0.1.fc24
	kernel-headers 	4.2.0-0.rc4.git3.1.... 	> 	4.2.0-0.rc4.git4.1....
	libblkid 	2.26.2-3.fc24 	> 	2.27-0.1.fc24
	libsmartcols 	2.26.2-3.fc24 	> 	2.27-0.1.fc24

But the cause can be earlier because it's a probabilistic failure. I though it was caused by upgrading xorg-server, but it fails even with old xorg-server 1.17.2-2.

It's a race condition between stopping and starting Xvfb. In case of the failure, one can see that Xvfb from t/10_run.t is still running, so second Xvfb refuses to start and X client cannot open display (both Xvfb are terminated or xauth does not match) and xvfb-run killing the second Xvfb fails because it finishes before the killing.

Comment 3 Petr Pisar 2015-08-27 15:44:55 UTC
I cannot reduce it to xvfb-run only with:

$ while (xvfb-run '/bin/true'; xvfb-run '/bin/true'); do :; done

Perhaps because the tests kill xvfb-run before it reaches end.

However putting "wait" just after kill in the xvfb-run helps. I think xvfb-run should terminate after the Xvfb terminates.

Another workaround is to edit Test::NeedsDisplay to call xfbv-run with "-a". Not only it fixes the issue with overlapping Xvfb's lock file, it will also allow to use Test::NeedsDisplay in parallel. Without the option each Xvfb binds to display :99 which leads to failures.


Note You need to log in before you can comment on or make changes to this bug.