All of lore.kernel.org
 help / color / mirror / Atom feed
* [1.48][PATCH 0/3] review request
@ 2021-05-03 14:35 Anuj Mittal
  2021-05-03 14:35 ` [1.48][PATCH 1/3] runqueue: Fix deferred task issues Anuj Mittal
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Anuj Mittal @ 2021-05-03 14:35 UTC (permalink / raw)
  To: bitbake-devel

Please review these changes for 1.48/gatesgarth.

Thanks,

Anuj

The following changes since commit 7b7d7b02faedb603d81144a134e80027e4019ab0:

  cooker: Include all packages a recipe provides in SkippedPackage.rprovides (2021-04-27 15:22:14 +0100)

are available in the Git repository at:

  git://push.openembedded.org/bitbake-contrib stable/1.48-next

Niels Avonds (1):
  fetch/gitsm: Fix crash when using git LFS and submodules

Richard Purdie (1):
  runqueue: Fix deferred task issues

Ross Burton (1):
  bitbake-server: ensure server timeout is a float

 bin/bitbake-server       | 2 +-
 lib/bb/fetch2/git.py     | 2 +-
 lib/bb/runqueue.py       | 4 ++++
 lib/bb/server/process.py | 2 +-
 4 files changed, 7 insertions(+), 3 deletions(-)

-- 
2.30.2


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

* [1.48][PATCH 1/3] runqueue: Fix deferred task issues
  2021-05-03 14:35 [1.48][PATCH 0/3] review request Anuj Mittal
@ 2021-05-03 14:35 ` Anuj Mittal
  2021-05-03 14:35 ` [1.48][PATCH 2/3] bitbake-server: ensure server timeout is a float Anuj Mittal
  2021-05-03 14:35 ` [1.48][PATCH 3/3] fetch/gitsm: Fix crash when using git LFS and submodules Anuj Mittal
  2 siblings, 0 replies; 4+ messages in thread
From: Anuj Mittal @ 2021-05-03 14:35 UTC (permalink / raw)
  To: bitbake-devel

From: Richard Purdie <richard.purdie@linuxfoundation.org>

In a multiconfig situation there are circumstances where firstly, tasks
are deferred when they shouldn't be, then later, tasks can end up as
both covered and not covered.

This patch fixes two related issues. Firstly, the stamp validity checking
is done up front in the build and not reevaulated. When rebuilding the
deferred task list after scenequeue hash change updates, we need therefore
need to check if a task was in notcovered *or* covered when deciding to
defer it. This avoids strange logs like:

NOTE: Running setscene task X of Y (mc:initrfs_guest:/A/alsa-state.bb:do_deploy_source_date_epoch_setscene)
NOTE: Deferring mc:initrfs_guest:/A/alsa-state.bb:do_deploy_source_date_epoch after mc:host:/A/alsa-state.bb:do_deploy_source_date_epoch

where tasks have run but are then deferred.

Since we're recalculating the whole list, we also need to clear it before
iterating to rebuild it. By ensuring covered tasks aren't added to the
deferred queue, the covered + notcovered issue should also be avoided.
in the task deadlock forcing code.

[YOCTO #14342]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 3c8717fb9ee1114dd80fc1ad22ee6c9e312bdac7)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 lib/bb/runqueue.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index acc128ec4..aa1d6b271 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -2798,6 +2798,7 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, s
     sqdata.valid |= rq.validate_hashes(tocheck, cooker.data, len(sqdata.stamppresent), False, summary=summary)
 
     sqdata.hashes = {}
+    sqrq.sq_deferred = {}
     for mc in sorted(sqdata.multiconfigs):
         for tid in sorted(sqdata.sq_revdeps):
             if mc_from_tid(tid) != mc:
@@ -2810,6 +2811,9 @@ def update_scenequeue_data(tids, sqdata, rqdata, rq, cooker, stampcache, sqrq, s
                 continue
             if tid in sqrq.scenequeue_notcovered:
                 continue
+            if tid in sqrq.scenequeue_covered:
+                continue
+
             sqdata.outrightfail.add(tid)
 
             h = pending_hash_index(tid, rqdata)
-- 
2.30.2


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

* [1.48][PATCH 2/3] bitbake-server: ensure server timeout is a float
  2021-05-03 14:35 [1.48][PATCH 0/3] review request Anuj Mittal
  2021-05-03 14:35 ` [1.48][PATCH 1/3] runqueue: Fix deferred task issues Anuj Mittal
@ 2021-05-03 14:35 ` Anuj Mittal
  2021-05-03 14:35 ` [1.48][PATCH 3/3] fetch/gitsm: Fix crash when using git LFS and submodules Anuj Mittal
  2 siblings, 0 replies; 4+ messages in thread
From: Anuj Mittal @ 2021-05-03 14:35 UTC (permalink / raw)
  To: bitbake-devel

From: Ross Burton <ross@burtonini.com>

bitbake-server is spawned by process.py and passes the arguments it is
given to ProcessServer.  There's some type confusion here:

bitbake-server is called with a string representation of the timeout,
which may be None.  If the timeout is not set, pass 0 instead of None.

Inside bitbake-server a ProcessServer is created which expects the
timeout to be a float not a string, so always float() the value.

[ YOCTO #14350 ]

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c93ae1f861208f6d39fd15c84fbcd0e2b54331f5)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 bin/bitbake-server       | 2 +-
 lib/bb/server/process.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/bitbake-server b/bin/bitbake-server
index ffbc7894e..65796be74 100755
--- a/bin/bitbake-server
+++ b/bin/bitbake-server
@@ -26,7 +26,7 @@ readypipeinfd = int(sys.argv[3])
 logfile = sys.argv[4]
 lockname = sys.argv[5]
 sockname = sys.argv[6]
-timeout = sys.argv[7]
+timeout = float(sys.argv[7])
 xmlrpcinterface = (sys.argv[8], int(sys.argv[9]))
 if xmlrpcinterface[0] == "None":
     xmlrpcinterface = (None, xmlrpcinterface[1])
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index b27b4aefe..3e99bcef8 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -509,7 +509,7 @@ class BitBakeServer(object):
         os.set_inheritable(self.bitbake_lock.fileno(), True)
         os.set_inheritable(self.readypipein, True)
         serverscript = os.path.realpath(os.path.dirname(__file__) + "/../../../bin/bitbake-server")
-        os.execl(sys.executable, "bitbake-server", serverscript, "decafbad", str(self.bitbake_lock.fileno()), str(self.readypipein), self.logfile, self.bitbake_lock.name, self.sockname,  str(self.server_timeout), str(self.xmlrpcinterface[0]), str(self.xmlrpcinterface[1]))
+        os.execl(sys.executable, "bitbake-server", serverscript, "decafbad", str(self.bitbake_lock.fileno()), str(self.readypipein), self.logfile, self.bitbake_lock.name, self.sockname,  str(self.server_timeout or 0), str(self.xmlrpcinterface[0]), str(self.xmlrpcinterface[1]))
 
 def execServer(lockfd, readypipeinfd, lockname, sockname, server_timeout, xmlrpcinterface):
 
-- 
2.30.2


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

* [1.48][PATCH 3/3] fetch/gitsm: Fix crash when using git LFS and submodules
  2021-05-03 14:35 [1.48][PATCH 0/3] review request Anuj Mittal
  2021-05-03 14:35 ` [1.48][PATCH 1/3] runqueue: Fix deferred task issues Anuj Mittal
  2021-05-03 14:35 ` [1.48][PATCH 2/3] bitbake-server: ensure server timeout is a float Anuj Mittal
@ 2021-05-03 14:35 ` Anuj Mittal
  2 siblings, 0 replies; 4+ messages in thread
From: Anuj Mittal @ 2021-05-03 14:35 UTC (permalink / raw)
  To: bitbake-devel

From: Niels Avonds <niels@codebits.be>

Gitsm fetcher crashes when cloning a repository that contains LFS files.
This happens because the unpack method is called during download, but the
submodules have not been downloaded yet at this point.

This issue was introduced in this
commit: 977b7268bf4fd425cb86d4a57500350c9b829162

[YOCTO #14283]

Signed-off-by: Niels Avonds <niels@codebits.be>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 26caedc4d2e9b5a0f1d57f9291754a7f6c5e437e)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 lib/bb/fetch2/git.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index b59a7cdc8..21ef85a2a 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -389,7 +389,7 @@ class Git(FetchMethod):
             tmpdir = tempfile.mkdtemp(dir=d.getVar('DL_DIR'))
             try:
                 # Do the checkout. This implicitly involves a Git LFS fetch.
-                self.unpack(ud, tmpdir, d)
+                Git.unpack(self, ud, tmpdir, d)
 
                 # Scoop up a copy of any stuff that Git LFS downloaded. Merge them into
                 # the bare clonedir.
-- 
2.30.2


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

end of thread, other threads:[~2021-05-03 14:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03 14:35 [1.48][PATCH 0/3] review request Anuj Mittal
2021-05-03 14:35 ` [1.48][PATCH 1/3] runqueue: Fix deferred task issues Anuj Mittal
2021-05-03 14:35 ` [1.48][PATCH 2/3] bitbake-server: ensure server timeout is a float Anuj Mittal
2021-05-03 14:35 ` [1.48][PATCH 3/3] fetch/gitsm: Fix crash when using git LFS and submodules Anuj Mittal

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.