glibc/gcc/libgcc-initial: Reimplement "deltask do_build"
PATCH 1/1 glibc/gcc/libgcc-initial: Reimplement "deltask do_build"
From: Mingli Yu <[email protected]>
Previously, "deltask do_build" can result in the
dependency of do_build lost and can trigger a
race condition error as below when do_rm_work
is enabled.
=================================================
NOTE: recipe glibc-initial-2.26-r0: task do_fetch: Failed
ERROR: glibc-initial-2.26-r0 do_fetch: Function failed: extend_recipe_sysroot The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:extend_recipe_sysroot(d)
0003:
File: '$Prj/layers/oe-core/meta/classes/staging.bbclass', lineno: 410, function: extend_recipe_sysroot
0406: manifests = {}
0407: # All files that we're going to be installing, to find conflicts.
0408: fileset = {}
0409:
*** 0410: for f in os.listdir(depdir):
0411: if not f.endswith(".complete"):
0412: continue
0413: f = depdir + "/" + f
0414: if os.path.islink(f) and not os.path.exists(f):Exception: FileNotFoundError: [Errno 2] No such file or directory: '$Prj/build/tmp-glibc/work/cortexa8hf-neon-wrs-linux-gnueabi/glibc-initial/2.26-r0/recipe-sysroot-native/installeddeps'
=================================================
Rewrite the implementation of "deltask do_build" to save the dependency before deleting do_build task to avoid the race condition.
[YOCTO #12365]
--- meta/recipes-core/glibc/glibc-initial.inc | 6 +++++- meta/recipes-devtools/gcc/gcc-cross-initial.inc | 6 +++++- meta/recipes-devtools/gcc/libgcc-initial.inc | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-)
meta/recipes-core/glibc/glibc-initial.inc +5 -1
@@ -54,4 +54,8 @@ do_siteconfig () { inherit nopackages # We really only want this built by things that need it, not any recrdeptask -deltask do_build +python () { + if bb.data.inherits_class('rm_work', d): + bb.build.exec_func("inject_rm_work", d) + bb.build.deltask('do_build', d) +}
meta/recipes-devtools/gcc/gcc-cross-initial.inc +5 -1
@@ -86,4 +86,8 @@ COMPILERINITIAL = "-initial" # We really only want this built by things that need it, not any recrdeptask -deltask do_build +python () { + if bb.data.inherits_class('rm_work', d): + bb.build.exec_func("inject_rm_work", d) + bb.build.deltask('do_build', d) +}
meta/recipes-devtools/gcc/libgcc-initial.inc +5 -1
@@ -17,4 +17,8 @@ COMPILERINITIAL = "-initial" inherit nopackages # We really only want this built by things that need it, not any recrdeptask -deltask do_build +python () { + if bb.data.inherits_class('rm_work', d): + bb.build.exec_func("inject_rm_work", d) + bb.build.deltask('do_build', d) +}
Signature · 1 line
2.13.3
Ping.
Thanks,
Mingli
Quoted 83 lines · On 2017年11月21日 16:27, [email protected] wrote:
From: Mingli Yu <[email protected]>
Previously, "deltask
do_build" can result in the
dependency ofdo_buildlost and can trigger a
race condition error as below whendo_rm_work
is enabled.
=================================================
NOTE: recipe glibc-initial-2.26-r0: taskdo_fetch: Failed
ERROR: glibc-initial-2.26-r0do_fetch: Function failed:extend_recipe_sysrootThe stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func()autogenerated', lineno: 2, function: <module>0001: *** 0002:extend_recipe_sysroot(d) 0003: File: '$Prj/layers/oe-core/meta/classes/staging.bbclass', lineno: 410, function: extend_recipe_sysroot 0406: manifests = {} 0407: # All files that we're going to be installing, to find conflicts. 0408: fileset = {} 0409: *** 0410: for f in os.listdir(depdir): 0411: if not f.endswith(".complete"): 0412: continue 0413: f = depdir + "/" + f 0414: if os.path.islink(f) and not os.path.exists(f):Exception: FileNotFoundError: [Errno 2] No such file or directory: '$Prj/build/tmp-glibc/work/cortexa8hf-neon-wrs-linux-gnueabi/glibc-initial/2.26-r0/recipe-sysroot-native/installeddeps'
=================================================Rewrite the implementation of "deltask
do_build" to save the dependency before deletingdo_buildtask to avoid the race condition.[YOCTO #12365]
Signed-off-by Mingli Yu <[email protected]>--- meta/recipes-core/glibc/glibc-initial.inc | 6 +++++- meta/recipes-devtools/gcc/gcc-cross-initial.inc | 6 +++++- meta/recipes-devtools/gcc/libgcc-initial.inc | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-)meta/recipes-core/glibc/glibc-initial.inc +5
-1@@ -54,4 +54,8 @@ do_siteconfig () { inherit nopackages # We really only want this built by things that need it, not any recrdeptask -deltask do_build +python () { + if bb.data.inherits_class('rm_work', d): + bb.build.exec_func("inject_rm_work", d) + bb.build.deltask('do_build', d) +}meta/recipes-devtools/gcc/gcc-cross-initial.inc +5
-1@@ -86,4 +86,8 @@ COMPILERINITIAL = "-initial" # We really only want this built by things that need it, not any recrdeptask -deltask do_build +python () { + if bb.data.inherits_class('rm_work', d): + bb.build.exec_func("inject_rm_work", d) + bb.build.deltask('do_build', d) +}meta/recipes-devtools/gcc/libgcc-initial.inc +5
-1@@ -17,4 +17,8 @@ COMPILERINITIAL = "-initial" inherit nopackages # We really only want this built by things that need it, not any recrdeptask -deltask do_build +python () { + if bb.data.inherits_class('rm_work', d): + bb.build.exec_func("inject_rm_work", d) + bb.build.deltask('do_build', d) +}