All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] sstate: Avoid races over rewritten siginfo files
@ 2020-01-06 13:15 Richard Purdie
  2020-01-06 13:15 ` [PATCH 2/2] scripts/gen-lockedsig-cache: Only look at new format sstate objects Richard Purdie
  2020-01-06 13:32 ` ✗ patchtest: failure for "sstate: Avoid races over rewri..." and 1 more Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Purdie @ 2020-01-06 13:15 UTC (permalink / raw)
  To: openembedded-core

Try and avoid errors like:

Exception: bb.process.ExecutionError: Execution of 'build/tmp/work/x86_64-linux/libxslt-native/1.1.34-r0/temp/run.sstate_unpack_package.12343' failed with exit code 1:
touch: setting times of 'build/sstate_devtool/80/4d/sstate:libxslt-native::1.1.34:r0::3:804d33f3f8d032b01ae92207669dd0a8f95a84917d563d122a77df19e786d73c_populate_lic.tgz.siginfo': Stale file handle
WARNING: exit code 1 from a shell command.

by not overwriting existing files.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/sstate.bbclass | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 241dace6d9a..356fe7ec180 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -686,7 +686,11 @@ def sstate_package(ss, d):
         bb.build.exec_func(f, d, (sstatebuild,))
 
     # SSTATE_PKG may have been changed by sstate_report_unihash
-    bb.siggen.dump_this_task(d.getVar('SSTATE_PKG') + ".siginfo", d)
+    siginfo = d.getVar('SSTATE_PKG') + ".siginfo"
+    if not os.path.exists(siginfo):
+        bb.siggen.dump_this_task(siginfo, d)
+    else:
+        os.utime(siginfo, None)
 
     return
 
@@ -1110,8 +1114,11 @@ python sstate_eventhandler() {
             d.setVar("SSTATE_PKGSPEC", "${SSTATE_SWSPEC}")
             d.setVar("SSTATE_EXTRAPATH", "")
         d.setVar("SSTATE_CURRTASK", taskname)
-        sstatepkg = d.getVar('SSTATE_PKG')
-        bb.siggen.dump_this_task(sstatepkg + ".siginfo", d)
+        siginfo = d.getVar('SSTATE_PKG') + ".siginfo"
+        if not os.path.exists(siginfo):
+            bb.siggen.dump_this_task(siginfo, d)
+        else:
+            os.utime(siginfo, None)
 }
 
 SSTATE_PRUNE_OBSOLETEWORKDIR ?= "1"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] scripts/gen-lockedsig-cache: Only look at new format sstate objects
  2020-01-06 13:15 [PATCH 1/2] sstate: Avoid races over rewritten siginfo files Richard Purdie
@ 2020-01-06 13:15 ` Richard Purdie
  2020-01-06 13:32 ` ✗ patchtest: failure for "sstate: Avoid races over rewri..." and 1 more Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2020-01-06 13:15 UTC (permalink / raw)
  To: openembedded-core

We can have sstate directories which are mixtures of old and new layout entries.
Only use the new format ones since these are the only ones bitbake itself will
look at.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 scripts/gen-lockedsig-cache | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/scripts/gen-lockedsig-cache b/scripts/gen-lockedsig-cache
index 6a7d2859104..cd8f9a4356d 100755
--- a/scripts/gen-lockedsig-cache
+++ b/scripts/gen-lockedsig-cache
@@ -80,13 +80,10 @@ for s in sigs:
     prefix = s[:2]
     prefix2 = s[2:4]
     if prefix not in sstate_content_cache:
-        sstate_content_cache[prefix] = build_sha_cache(prefix)
+        sstate_content_cache[prefix] = {}
     if prefix2 not in sstate_content_cache[prefix]:
         sstate_content_cache[prefix][prefix2] = build_sha_cache(prefix + "/" + prefix2)
 
-    if s in sstate_content_cache[prefix]:
-        for f in sstate_content_cache[prefix][s]:
-            files.add(f)
     if s in sstate_content_cache[prefix][prefix2]:
         for f in sstate_content_cache[prefix][prefix2][s]:
             files.add(f)
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* ✗ patchtest: failure for "sstate: Avoid races over rewri..." and 1 more
  2020-01-06 13:15 [PATCH 1/2] sstate: Avoid races over rewritten siginfo files Richard Purdie
  2020-01-06 13:15 ` [PATCH 2/2] scripts/gen-lockedsig-cache: Only look at new format sstate objects Richard Purdie
@ 2020-01-06 13:32 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2020-01-06 13:32 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

== Series Details ==

Series: "sstate: Avoid races over rewri..." and 1 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/21887/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at 53cf1241fa)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-06 13:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-06 13:15 [PATCH 1/2] sstate: Avoid races over rewritten siginfo files Richard Purdie
2020-01-06 13:15 ` [PATCH 2/2] scripts/gen-lockedsig-cache: Only look at new format sstate objects Richard Purdie
2020-01-06 13:32 ` ✗ patchtest: failure for "sstate: Avoid races over rewri..." and 1 more Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.