Bug 7731

Summary: Build race at configure time
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: kernelAssignee: Bruce Ashfield <bruce.ashfield>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: bruce.ashfield, tom.zanussi
Version: 1.9   
Target Milestone: ---   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2015-05-07 15:30:49 UTC
ERROR: Function failed: do_kernel_metadata (log file is located at /data/poky-master/tmp/work/beaglebone-poky-linux-gnueabi/linux-yocto/3.14.36+gitAUTOINC+46df2668fa_dbe5b52e93-r0/temp/log.do_kernel_metadata.7261)
ERROR: Logfile of failure stored in: /data/poky-master/tmp/work/beaglebone-poky-linux-gnueabi/linux-yocto/3.14.36+gitAUTOINC+46df2668fa_dbe5b52e93-r0/temp/log.do_kernel_metadata.7261
Log data follows:
| DEBUG: Executing shell function do_kernel_metadata
| .meta
| [INFO]: checkpoint is already restored, nothing to do
| WARNING: addon feature "features/netfilter/netfilter" was not found
| ERROR: required features were not found. aborting
| ERROR: Could not update standard/beaglebone
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_kernel_metadata (log file is located at /data/poky-master/tmp/work/beaglebone-poky-linux-gnueabi/linux-yocto/3.14.36+gitAUTOINC+46df2668fa_dbe5b52e93-r0/temp/log.do_kernel_metadata.7261)

The .meta/cfg/kernel-cache directory does exist in the build directory after the failure.

Chat from Bruce on IM:

"""
yah. but it is so very weird, it has to be the move to work-shared (part of the kernel_checkout) and the configuration/meta-data phase.
I'll check the ordering between those tasks.
both just say: before do_patch
so I bet they race.
"""
Comment 1 Bruce Ashfield 2015-05-07 18:32:24 UTC
this should be the fix:

diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index da541a1ac663..11beb682367a 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -215,7 +215,7 @@ do_kernel_checkout() {
 }
 do_kernel_checkout[dirs] = "${S}"
 
-addtask kernel_checkout before do_patch after do_unpack
+addtask kernel_checkout before do_kernel_metadata after do_unpack
 addtask kernel_metadata after do_validate_branches before do_patch
 do_kernel_metadata[depends] = "kern-tools-native:do_populate_sysroot"
Comment 2 Ross Burton 2015-05-07 19:12:59 UTC
Yeah that looks like a good candidate!