Parallel make bug in busybox

Richard Purdie rpurdie at rpsys.net
Thu Aug 18 08:01:34 UTC 2016


On Wed, 2016-08-17 at 16:16 +0100, Richard Purdie wrote:
> I think this is the real underlying problem which broke our build. I
> have backported Denys' fix into our builds but I worry there is
> another
> bug here which I didn't find a reproducer for as detailed above. Is
> there a way we could make this issue reproducible so people could
> look
> at a fix? I believe the second issue I mentioned is at least
> addressed
> now, thanks Denys!

FWIW in a build with the backported makefile fix applied, we saw:

https://autobuilder.yoctoproject.org/main/builders/nightly-oe-selftest/builds/643/steps/Running%20oe-selftest/logs/stdio

which looks like the same issue again :( I appreciate the log has
various failures in it but grep for NUM_APPLETS.h will find the one in
question.

You can clearly see its running:

|   applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h
|   x86_64-poky-linux-gcc  -m64 <snip>
|   applets/applet_tables include/applet_tables.h include/NUM_APPLETS.h

So multiple executions of applet_tables is happening in parallel,
leading to an empty/corrupt file being visible to the compiler.

Its clearly running "make -f scripts/Makefile.build obj=applets"
multiple times which would seem to be the problem.

One workaround would be to generate temp files and move into position
so the update is atomic. That does hack around the issue rather than
fixing the dependency problem though.

Cheers,

Richard


More information about the busybox mailing list