[Buildroot] [PATCH] dmalloc: fix parallel builds

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sun Jan 4 20:41:57 UTC 2015


Dear Alex Suykov,

On Sun, 4 Jan 2015 21:02:04 +0200, Alex Suykov wrote:

> The following sequence seems to trigger it more or less reliably for me:
> 
>     ./configure --disable-static --enable-shared --enable-cxx --enable-threads
>     sed -i -e "s at cat \$(srcdir)/dmalloc.h.1.*@&; sleep 1@" Makefile
>     make clean
>     make -j4
> 
> What happens is a race condition between "cat ...; mv ... dmalloc.h"
> and "g++ -c dmallocc.cc". As long as cat-mv pair is faster, it works well.
> But if there's a delay, it breaks.
> 
> This should be rare, I can only reproduce it with an artificial delay,
> and only with --disable-static. But on the other hand, it did happen
> on autobuild somehow.

Ok, thanks a lot for the explanation! I've committed your patch, with a
few minor tweaks:

    [Thomas:
     - Rename patch to the new naming convention.
     - Add SoB line from Alex inside the patch itself.
     - Adjust the commit log to contain the reference to the autobuilder
       failure.]

If you're using dmalloc, I just noticed that the version we have in
Buildroot is 5.4.3, while upstream has a 5.5.2 release. If you want to
send a patch to bump the dmalloc version, that would be great.

Also, don't hesitate to send your patch to the upstream dmalloc
developers.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the buildroot mailing list