* [PATCH] glibc/gcc/libgcc-initial: Reimplement "deltask do_build"
@ 2017-11-21 8:00 mingli.yu
2017-11-21 8:37 ` Yu, Mingli
0 siblings, 1 reply; 4+ messages in thread
From: mingli.yu @ 2017-11-21 8:00 UTC (permalink / raw)
To: openembedded-core, richard.purdie
From: Mingli Yu <Mingli.Yu@windriver.com>
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]
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
---
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(-)
diff --git a/meta/recipes-core/glibc/glibc-initial.inc b/meta/recipes-core/glibc/glibc-initial.inc
index b86e2fb2db..4390b6dfca 100644
--- a/meta/recipes-core/glibc/glibc-initial.inc
+++ b/meta/recipes-core/glibc/glibc-initial.inc
@@ -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)
+}
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index 892b1dbf2f..6c0b2eff86 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -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)
+}
diff --git a/meta/recipes-devtools/gcc/libgcc-initial.inc b/meta/recipes-devtools/gcc/libgcc-initial.inc
index 950ad861e7..cef8257052 100644
--- a/meta/recipes-devtools/gcc/libgcc-initial.inc
+++ b/meta/recipes-devtools/gcc/libgcc-initial.inc
@@ -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)
+}
--
2.13.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] glibc/gcc/libgcc-initial: Reimplement "deltask do_build"
@ 2017-11-21 8:27 mingli.yu
2017-12-12 2:13 ` Yu, Mingli
0 siblings, 1 reply; 4+ messages in thread
From: mingli.yu @ 2017-11-21 8:27 UTC (permalink / raw)
To: openembedded-core, richard.purdie
From: Mingli Yu <Mingli.Yu@windriver.com>
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]
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
---
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(-)
diff --git a/meta/recipes-core/glibc/glibc-initial.inc b/meta/recipes-core/glibc/glibc-initial.inc
index b86e2fb2db..0dc32092a9 100644
--- a/meta/recipes-core/glibc/glibc-initial.inc
+++ b/meta/recipes-core/glibc/glibc-initial.inc
@@ -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)
+}
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index 892b1dbf2f..55e22f62d3 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -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)
+}
diff --git a/meta/recipes-devtools/gcc/libgcc-initial.inc b/meta/recipes-devtools/gcc/libgcc-initial.inc
index 950ad861e7..4c45b9a801 100644
--- a/meta/recipes-devtools/gcc/libgcc-initial.inc
+++ b/meta/recipes-devtools/gcc/libgcc-initial.inc
@@ -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)
+}
--
2.13.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] glibc/gcc/libgcc-initial: Reimplement "deltask do_build"
2017-11-21 8:00 [PATCH] glibc/gcc/libgcc-initial: Reimplement "deltask do_build" mingli.yu
@ 2017-11-21 8:37 ` Yu, Mingli
0 siblings, 0 replies; 4+ messages in thread
From: Yu, Mingli @ 2017-11-21 8:37 UTC (permalink / raw)
To: openembedded-core, richard.purdie
Please ignore this patch as the indentation is TAB, will send V2 to use
four space as indentation.
Thanks,
Mingli
On 2017年11月21日 16:00, mingli.yu@windriver.com wrote:
> From: Mingli Yu <Mingli.Yu@windriver.com>
>
> 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]
>
> Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
> ---
> 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(-)
>
> diff --git a/meta/recipes-core/glibc/glibc-initial.inc b/meta/recipes-core/glibc/glibc-initial.inc
> index b86e2fb2db..4390b6dfca 100644
> --- a/meta/recipes-core/glibc/glibc-initial.inc
> +++ b/meta/recipes-core/glibc/glibc-initial.inc
> @@ -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)
> +}
> diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
> index 892b1dbf2f..6c0b2eff86 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
> @@ -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)
> +}
> diff --git a/meta/recipes-devtools/gcc/libgcc-initial.inc b/meta/recipes-devtools/gcc/libgcc-initial.inc
> index 950ad861e7..cef8257052 100644
> --- a/meta/recipes-devtools/gcc/libgcc-initial.inc
> +++ b/meta/recipes-devtools/gcc/libgcc-initial.inc
> @@ -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)
> +}
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] glibc/gcc/libgcc-initial: Reimplement "deltask do_build"
2017-11-21 8:27 mingli.yu
@ 2017-12-12 2:13 ` Yu, Mingli
0 siblings, 0 replies; 4+ messages in thread
From: Yu, Mingli @ 2017-12-12 2:13 UTC (permalink / raw)
To: openembedded-core, richard.purdie
Ping.
Thanks,
Mingli
On 2017年11月21日 16:27, mingli.yu@windriver.com wrote:
> From: Mingli Yu <Mingli.Yu@windriver.com>
>
> 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]
>
> Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
> ---
> 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(-)
>
> diff --git a/meta/recipes-core/glibc/glibc-initial.inc b/meta/recipes-core/glibc/glibc-initial.inc
> index b86e2fb2db..0dc32092a9 100644
> --- a/meta/recipes-core/glibc/glibc-initial.inc
> +++ b/meta/recipes-core/glibc/glibc-initial.inc
> @@ -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)
> +}
> diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
> index 892b1dbf2f..55e22f62d3 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
> @@ -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)
> +}
> diff --git a/meta/recipes-devtools/gcc/libgcc-initial.inc b/meta/recipes-devtools/gcc/libgcc-initial.inc
> index 950ad861e7..4c45b9a801 100644
> --- a/meta/recipes-devtools/gcc/libgcc-initial.inc
> +++ b/meta/recipes-devtools/gcc/libgcc-initial.inc
> @@ -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)
> +}
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-12-12 2:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-21 8:00 [PATCH] glibc/gcc/libgcc-initial: Reimplement "deltask do_build" mingli.yu
2017-11-21 8:37 ` Yu, Mingli
-- strict thread matches above, loose matches on Subject: below --
2017-11-21 8:27 mingli.yu
2017-12-12 2:13 ` Yu, Mingli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox