| Summary: | Infinite hang in bitbake parse if you have certain types of parse errors | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Jason Wessel <jason.wessel> | ||||
| Component: | bitbake | Assignee: | Richard Purdie <richard.purdie> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | Undecided | CC: | kergoth, poky.bs.watcher, poky.watcher | ||||
| Version: | 1.4 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | x86 | ||||||
| OS: | Multiple | ||||||
| Whiteboard: | |||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | --- | |||||
| Attachments: |
|
||||||
|
Description
Jason Wessel
2013-03-04 16:18:59 UTC
Created attachment 1104 [details]
Patch to apply to get the hang
The latest bitbake code will hang at the parse stage indefinitely if you have certain types of parse failures. There is an attachment to this case which causes a parse failure. You check out the latest poky master and apply the patch and then do:
bitbake core-image-minimal
The parse should hang before 100%.
I worked around the problem by reverting the following changes to the bitbake master.
9ca8e513dc142dd7aefadeb6db2ccdb00f38b39f (cooker: now that we use a Pool, raise the exceptions)
8af519a49a3374bd9004864ef31ca8aa328e9f34 (cooker: parse using bb.compat.Pool)
The problem is actually introduced in the 8af519 commit, but the 9ac8e commit makes it happen everytime with respect to the hang.
Jason.
--- a/meta/classes/syslinux.bbclass
+++ b/meta/classes/syslinux.bbclass
@@ -20,6 +20,7 @@ SYSLINUXMENU = "${S}/menu"
ISOLINUXDIR = "/isolinux"
SYSLINUXDIR = "/"
+SYSLINUX_SERIAL_ACTIVE ?= "0 115200"
ISO_BOOTIMG = "isolinux/isolinux.bin"
ISO_BOOTCAT = "isolinux/boot.cat"
MKISOFS_OPTIONS = "-no-emul-boot -boot-load-size 4 -boot-info-table"
@@ -149,6 +150,9 @@ python build_syslinux_cfg () {
cfgfile.write('ALLOWOPTIONS 1\n');
cfgfile.write('DEFAULT %s\n' % (labels.split()[0]))
+ syslinux_serial = d.getVar('SYSLINUX_SERIAL', True)
+ if syslinux_serial:
+ cfgfile.write('SERIAL %s', % syslinux_serial)
timeout = d.getVar('SYSLINUX_TIMEOUT', True)
I tried this with poky master and see: NOTE: Error during finalise of /media/build1/poky/meta/recipes-core/images/build-appliance-image.bb | ETA: --:--:-- ERROR: ExpansionError during parsing /media/build1/poky/meta/recipes-core/images/build-appliance-image.bb: Failure expanding variable build_syslinux_cfg: SyntaxError: invalid syntax (<string>, line 40) ERROR: Command execution failed: Exited with 1 with no hang. Actually, as long as its not the last task being parsed, it does hang. I've spent an age trying to track this down and can't figure out how to fix it. I'd note that if we take the shutdown(clean=False) lines out of cooker.py and let the parser finish processing, we don't see this issue. I reverted the problemtic change in http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=164a4cb2fc64e76836182ad2d412343a7b26b964 (and the preceeding commit). I'll close this for now as such. Chris/I will try and figure out if we can do something better if/as/when we have time. |