Bug 810559 - FTBFS: libvirt has parallel make race that can stop build
FTBFS: libvirt has parallel make race that can stop build
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Eric Blake
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-06 13:33 EDT by Eric Blake
Modified: 2012-06-20 02:52 EDT (History)
8 users (show)

See Also:
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 02:52:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric Blake 2012-04-06 13:33:24 EDT
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 04:13:30 EDT
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 05:34:20 EDT
(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 07:56:43 EDT
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 11:16:01 EDT
(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 12:13:59 EDT
(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 02:52:51 EDT
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

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