Skip to contentSkip to conversation

[1.48][PATCH 0/3] review request

DISCUSSION Anuj Mittal 1 participant 4 messages May 3, 2021

lore
Share & tools
lore
#0 lore raw

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(-)
Signature · 1 line
2.30.2
#1 lore raw

[1.48][PATCH 2/3] bitbake-server: ensure server timeout is a float

From: Ross Burton <[email protected]>

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 ]

(cherry picked from commit c93ae1f861208f6d39fd15c84fbcd0e2b54331f5)
---
 bin/bitbake-server       | 2 +-
 lib/bb/server/process.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
bin/bitbake-server +1 -1
index ffbc7894e..65796be74 100755
@@ -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])
lib/bb/server/process.py +1 -1
index b27b4aefe..3e99bcef8 100644
@@ -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):
 
Signature · 1 line
2.30.2
#2 lore raw

[1.48][PATCH 1/3] runqueue: Fix deferred task issues

In reply to Anuj Mittal

From: Richard Purdie <[email protected]>

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]

(cherry picked from commit 3c8717fb9ee1114dd80fc1ad22ee6c9e312bdac7)
---
 lib/bb/runqueue.py | 4 ++++
 1 file changed, 4 insertions(+)
lib/bb/runqueue.py +4 -0
index acc128ec4..aa1d6b271 100644
@@ -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)
Signature · 1 line
2.30.2
#3 lore raw

[1.48][PATCH 3/3] fetch/gitsm: Fix crash when using git LFS and submodules

In reply to Anuj Mittal

From: Niels Avonds <[email protected]>

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]

(cherry picked from commit 26caedc4d2e9b5a0f1d57f9291754a7f6c5e437e)
---
 lib/bb/fetch2/git.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/fetch2/git.py +1 -1
index b59a7cdc8..21ef85a2a 100644
@@ -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.
Signature · 1 line
2.30.2