Race condition between hotspot build/import

David Holmes david.holmes at oracle.com
Fri Sep 14 05:01:50 PDT 2012


On 14/09/2012 9:10 PM, Magnus Ihse Bursie wrote:
> On 2012-09-14 09:39, David Holmes wrote:
>> On 14/09/2012 1:12 PM, David Holmes wrote:
>>> I'm currently always getting a build failure on a clean build when
>>> cross-compiling (which I don't think affects anything other than
>>> timing).
>>>
>>> The problem seems to be that the top-level make kicks of the hotspot and
>>> jdk makes concurrently, and the first part of the JDK make tries to
>>> import hotspot, and the hotspot/dist directory doesn't exist yet.
>>>
>>> I found the following changeset:
>>>
>>> # HG changeset patch
>>> # User ihse
>>> # Date 1347352614 -7200
>>> # Node ID 0d8ad4b406dff44492a906462af42be185aa7d3b
>>> # Parent 61eb8ec239f7547b78fd600b6359b2de2389dcec
>>> Protect the top-level Makefile against race conditions happening if
>>> inadvertently running with -jN.
>>>
>>> But the problem still exists.
>>
>> Seems I had a fclone misfire and ended up with an inconsistent
>> build-infra forest. Once that was fixed the build problem went away.
>>
>> However I still have this problem in my jdk8 forest, even applying the
>> above patch. Was there something else needed to deal with these races?
>
> I've never seen this actually happening, the patch above was more of a
> theoretical guard, as a result of real problem in a submake.
>
> Do you run with "make -jN"? Do you have MFLAGS or MAKEFLAGS set in your
> environment, setting -j?

I don't set anything special in that regard. It's obvious from the logs 
that the build of the two components is overlapping though.

David
-----


> /Magnus



More information about the build-infra-dev mailing list