| Summary: | Race condition in wic to package IMAGE_BOOT_FILES before EXTRA_IMAGEDEPENDS are built | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Denys Dmytriyenko <denis> |
| Component: | oe-core other | Assignee: | Richard Purdie <richard.purdie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | randy.macleod, richard.purdie |
| Version: | unspecified | ||
| Target Milestone: | 2.8 M1 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
Denys Dmytriyenko
2019-04-12 21:10:53 UTC
Just to add, I have a suspicion that in a failed build the autobuilder shows the error due to the use of "bitbake -k" (continue mode) which most builds therefore wouldn't see. You therefore work best with an underlying uboot failure then the -k option to expose the race. This isn't what EXTRA_IMAGEDEPENDS is designed to do. These dependencies are added to do_image_complete which clearly isn't what is needed here. I think the fix might be:
diff --git a/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf b/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf
index bc18ee8c47e..35814cd8f1a 100644
--- a/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf
+++ b/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf
@@ -18,7 +18,7 @@ IMAGE_FSTYPES += "tar.bz2 jffs2 wic wic.bmap"
EXTRA_IMAGECMD_jffs2 = "-lnp "
WKS_FILE ?= "beaglebone-yocto.wks"
IMAGE_INSTALL_append = " kernel-devicetree kernel-image-zimage"
-do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot"
+do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot u-boot:do_deploy"
SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0"
SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
Richard, I already had this workaround for a month: http://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/commit/?id=484c2d0d126722bcbb1f3aa3eac01472361c145a But I don't believe it is a proper fix... It used to work just fine with EXTRA_IMAGEDEPENDS for long time until we moved to thud and later - it would never fail in do_image_wic like that, maybe we were just lucky before. But now we've seen this breakage intermittently even w/o u-boot build failing, so some dependencies got rearranged and do_image_wic gets ahead of u-boot:do_deploy sometimes... BTW, why does EXTRA_IMAGEDEPEDNS add to do_image_complete? It kind of makes the name of the variable slightly confusing, as those are rather POST image depends. I know those deps are not meant to go into the image, so maybe EXTRA_POSTIMAGEDEPS is a better name, though historical reasons, I guess... (In reply to comment #4) > Richard, > > I already had this workaround for a month: > http://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/commit/ > ?id=484c2d0d126722bcbb1f3aa3eac01472361c145a > > But I don't believe it is a proper fix... It used to work just fine with > EXTRA_IMAGEDEPENDS for long time until we moved to thud and later - it would > never fail in do_image_wic like that, maybe we were just lucky before. But > now we've seen this breakage intermittently even w/o u-boot build failing, > so some dependencies got rearranged and do_image_wic gets ahead of > u-boot:do_deploy sometimes... Having looked at this quite carefully I believe its just been luck and this is the correct fix. I think you could test that by executing "bitbake image:do_image_wic" explicitly even pre thud and see the problem if you'd cleaned u-boot prior to that. Put another way, if you specify a wks which needs the u-boot deploy artefacts, you also have to add a dependency for that to do_image_wic. > BTW, why does EXTRA_IMAGEDEPEDNS add to do_image_complete? It kind of makes > the name of the variable slightly confusing, as those are rather POST image > depends. I know those deps are not meant to go into the image, so maybe > EXTRA_POSTIMAGEDEPS is a better name, though historical reasons, I guess... Its a very old variable, it even predates task dependencies and the multithreaded runqueue in bitbake. We made it do what its contents mean rather than its name. Ideally we should probably clean up some of these things but that is a people/time problem. |