Bug 810559

Summary: FTBFS: libvirt has parallel make race that can stop build
Product: Red Hat Enterprise Linux 6 Reporter: Eric Blake <eblake>
Component: libvirtAssignee: Eric Blake <eblake>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: acathrow, ajia, dyasny, dyuan, mzhan, rwu, veillard, ydu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-0.9.10-11.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 06:52:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eric Blake 2012-04-06 17:33:24 UTC
Description of problem:
libvirt's docs/Makefile.am is not parallel-safe, and as a result, can cause spurious build failures.

Version-Release number of selected component (if applicable):
v0.9.10-10.el6

How reproducible:
50% or so - depends on the race condition

Steps to Reproduce:
1. make -j2
2.
3.
  
Actual results:
  GEN    html/index.html
  GEN    devhelp/index.html
Validating hvsupport.html
warning: failed to load external entity "hvsupport.html.tmp"
make[2]: *** [hvsupport.html] Error 1
rm formatdomain.html.tmp hooks.html.tmp formatstorage.html.tmp


Expected results:
clean build every time

Additional info:
Upstream patch available:
https://www.redhat.com/archives/libvir-list/2012-April/msg00163.html
no impact to the source code, so safe to backport

Comment 2 Daniel Veillard 2012-04-09 08:13:30 UTC
ACK this make rebuilds of the rpm fail randomly and happened a couple
of time in brew already, very painful !

Daniel

Comment 5 Alex Jia 2012-04-12 09:34:20 UTC
(In reply to comment #0)
> How reproducible:
> 50% or so - depends on the race condition
Eric, I want to know how to easily reproduce this issues?

I tried to run many make jobs to increase race condition such as ./configure && make -j20, but everything is okay on libvirt-0.9.10-10 source rpm package, maybe I can easy to reproduce it on some low profile machine, if so, I will change kernel cmdline to limit host cpu/memory resources, or I may increase cpu or memory stress on the host something like that?

Thanks,
Alex

Comment 6 Eric Blake 2012-04-12 11:56:43 UTC
I was hitting the problem about 50% of my time when doing './autobuild.sh' on my dual-core laptop, which invokes 'make -j2', with no special load or kernel tweaking.  I have no idea how to force the race.  It might be possible to inspect 'make --debug' output with appropriate make targets to see if the dependency chains are correct, but even then, I'm not sure what specifically to look for; maybe you can figure out how to have make tell you what the prerequisites of hvsupport.html and hvsupport.html.in are, then compare those lists pre- and post-patch to see that hvsupport.html has added more dependencies.

Comment 7 Alex Jia 2012-04-12 15:16:01 UTC
(In reply to comment #6)
> I was hitting the problem about 50% of my time when doing './autobuild.sh' on
> my dual-core laptop, which invokes 'make -j2', with no special load or kernel
> tweaking.  I have no idea how to force the race.  It might be possible to
> inspect 'make --debug' output with appropriate make targets to see if the
> dependency chains are correct, but even then, I'm not sure what specifically to
> look for; maybe you can figure out how to have make tell you what the
> prerequisites of hvsupport.html and hvsupport.html.in are, then compare those
> lists pre- and post-patch to see that hvsupport.html has added more
> dependencies.

I see, thanks for your nice comment, I will try to reproduce it again according to your advice, thanks a lot.

Comment 8 Alex Jia 2012-04-12 16:13:59 UTC
(In reply to comment #6)
> I was hitting the problem about 50% of my time when doing './autobuild.sh' on
> my dual-core laptop, which invokes 'make -j2', with no special load or kernel

I can also reproduce the issues on my dual-core laptop with libvirt-0.9.10-10.el6.src.rpm by run ./autobuild && make -j2:

Validating hvsupport.html
warning: failed to load external entity "hvsupport.html.tmp"
make[2]: *** [hvsupport.html] Error 1

And I can't reproduce it with libvirt-0.9.10-11.el6.src.rpm on the same test environment, so the bug has been verified.

Comment 10 errata-xmlrpc 2012-06-20 06:52:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0748.html