All of lore.kernel.org
 help / color / mirror / Atom feed
* [bitbake][dunfell][1.46][PATCH 0/2] Patch review
@ 2021-03-13 19:04 Steve Sakoman
  2021-03-13 19:04 ` [bitbake][dunfell][1.46][PATCH 1/2] runqueue: Fix task execution corruption issue Steve Sakoman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Steve Sakoman @ 2021-03-13 19:04 UTC (permalink / raw)
  To: bitbake-devel

Please review this next set of patches for dunfell/1.46 and have comments back
by end of day Tuesday.

Passed a-full on autobuilder:

https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1962

The following changes since commit e0dd20a006ce6fdc656e6be6ac581e93e2ed4a95:

  __init__.py: Fix bitbake debug log handling (2021-03-09 00:03:26 +0000)

are available in the Git repository at:

  git://git.openembedded.org/bitbake-contrib stable/1.46-nut
  http://cgit.openembedded.org/bitbake-contrib/log/?h=stable/1.46-nut

Richard Purdie (2):
  runqueue: Fix task execution corruption issue
  runqueue: Add setscene task overlap sanity check

 lib/bb/runqueue.py | 7 +++++++
 1 file changed, 7 insertions(+)

-- 
2.25.1


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

* [bitbake][dunfell][1.46][PATCH 1/2] runqueue: Fix task execution corruption issue
  2021-03-13 19:04 [bitbake][dunfell][1.46][PATCH 0/2] Patch review Steve Sakoman
@ 2021-03-13 19:04 ` Steve Sakoman
  2021-03-13 19:04 ` [bitbake][dunfell][1.46][PATCH 2/2] runqueue: Add setscene task overlap sanity check Steve Sakoman
  2021-03-13 19:18 ` [bitbake-devel] [bitbake][dunfell][1.46][PATCH 0/2] Patch review Martin Jansa
  2 siblings, 0 replies; 4+ messages in thread
From: Steve Sakoman @ 2021-03-13 19:04 UTC (permalink / raw)
  To: bitbake-devel

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

We've seen occasional issues where linux-yocto:do_compile_kernelmodules would
run without do_shared_workdir running before it. do_shared_workdir is an
setscene task but never has an sstate object generated so it will always
rerun. This should not happen since compile_kernemodules should only
execute if a setscene that depends on it didn't run and that should trigger
do_shared_workdir not to be marked as covered.

The issue is that build-appliance-image:do_package is one of the tasks which
covers linux-yocto:do_compile_kernelmodules but it is also a noexec task
and has a dependecy on pseudo-native:do_populate_sysroot.

In the problem case, pseudo-native:do_populate_sysroot is unavailable but
marked as covered since it is noexec. The "harddeps" code then also marks it
as notcovered. No task should ever be both covered and notcovered and this
is where the problems come from.

The solution is for the harddeps code only to to fail tasks if they've not
already been handled in some way. The code is assuming code couldn't have
handled revdeps at this point but we now have clear evidence they can.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f66556bbb38449789ceea2fd105e9f68df7fb660)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 lib/bb/runqueue.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 30cab537..6186a83f 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -2421,6 +2421,9 @@ class RunQueueExecute:
 
         for dep in sorted(self.sqdata.sq_deps[task]):
             if fail and task in self.sqdata.sq_harddeps and dep in self.sqdata.sq_harddeps[task]:
+                if dep in self.scenequeue_covered or dep in self.scenequeue_notcovered:
+                    # dependency could be already processed, e.g. noexec setscene task
+                    continue
                 logger.debug(2, "%s was unavailable and is a hard dependency of %s so skipping" % (task, dep))
                 self.sq_task_failoutright(dep)
                 continue
-- 
2.25.1


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

* [bitbake][dunfell][1.46][PATCH 2/2] runqueue: Add setscene task overlap sanity check
  2021-03-13 19:04 [bitbake][dunfell][1.46][PATCH 0/2] Patch review Steve Sakoman
  2021-03-13 19:04 ` [bitbake][dunfell][1.46][PATCH 1/2] runqueue: Fix task execution corruption issue Steve Sakoman
@ 2021-03-13 19:04 ` Steve Sakoman
  2021-03-13 19:18 ` [bitbake-devel] [bitbake][dunfell][1.46][PATCH 0/2] Patch review Martin Jansa
  2 siblings, 0 replies; 4+ messages in thread
From: Steve Sakoman @ 2021-03-13 19:04 UTC (permalink / raw)
  To: bitbake-devel

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

We've seen hard to debug issues where a task ends up in both the
covered and notcovered list. Add a sanity check to ensure if this
happens in future, we see it in the logs.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6e001410854792f9bb66a0409a2ac176171b0507)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 lib/bb/runqueue.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 6186a83f..2bb97b6e 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -1934,6 +1934,10 @@ class RunQueueExecute:
             logger.error("Scenequeue had holdoff tasks: %s" % pprint.pformat(self.holdoff_tasks))
             err = True
 
+        for tid in self.scenequeue_covered.intersection(self.scenequeue_notcovered):
+            # No task should end up in both covered and uncovered, that is a bug.
+            logger.error("Setscene task %s in both covered and notcovered." % tid)
+
         for tid in self.rqdata.runq_setscene_tids:
             if tid not in self.scenequeue_covered and tid not in self.scenequeue_notcovered:
                 err = True
-- 
2.25.1


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

* Re: [bitbake-devel] [bitbake][dunfell][1.46][PATCH 0/2] Patch review
  2021-03-13 19:04 [bitbake][dunfell][1.46][PATCH 0/2] Patch review Steve Sakoman
  2021-03-13 19:04 ` [bitbake][dunfell][1.46][PATCH 1/2] runqueue: Fix task execution corruption issue Steve Sakoman
  2021-03-13 19:04 ` [bitbake][dunfell][1.46][PATCH 2/2] runqueue: Add setscene task overlap sanity check Steve Sakoman
@ 2021-03-13 19:18 ` Martin Jansa
  2 siblings, 0 replies; 4+ messages in thread
From: Martin Jansa @ 2021-03-13 19:18 UTC (permalink / raw)
  To: Steve Sakoman; +Cc: bitbake-devel

[-- Attachment #1: Type: text/plain, Size: 1930 bytes --]

On Sat, Mar 13, 2021 at 09:04:50AM -1000, Steve Sakoman wrote:
> Please review this next set of patches for dunfell/1.46 and have comments back
> by end of day Tuesday.
> 
> Passed a-full on autobuilder:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/1962
> 
> The following changes since commit e0dd20a006ce6fdc656e6be6ac581e93e2ed4a95:
> 
>   __init__.py: Fix bitbake debug log handling (2021-03-09 00:03:26 +0000)
> 
> are available in the Git repository at:
> 
>   git://git.openembedded.org/bitbake-contrib stable/1.46-nut
>   http://cgit.openembedded.org/bitbake-contrib/log/?h=stable/1.46-nut
> 
> Richard Purdie (2):
>   runqueue: Fix task execution corruption issue
>   runqueue: Add setscene task overlap sanity check
> 
>  lib/bb/runqueue.py | 7 +++++++
>  1 file changed, 7 insertions(+)

Following fix from master might be useful for 1.46 and 1.48 as well.

The bebef58b21bdff7a3ee1fa2449b7df19144f26fd mentioned in commit message was introduced in 1.40 and I've included this
change to all my builds since it was sent to ML and haven't seen any issues caused by that (but cannot confirm that
it _completely_ resolve the hangs I was seeing after parsing issues).

commit 915330e1dbae1ee8fd9a0358decf2c294f771961
Author: Jan Brzezanski <jan.brzezanski@gmail.com>
Date:   Thu Feb 18 17:53:32 2021 +0100

    Force parser shutdown after catching an exception

    Commit bebef58b21bdff7a3ee1fa2449b7df19144f26fd introduced forcing
    parser shutdown as default in case of build abort.

    In this case bitbake sometimes hangs after facing error during parsing,
    waiting for child processes to finish. Killing it then will spawn zombie
    processes.

    Thus we force the shutdown after catching an exception.

    Signed-off-by: Jan Brzezanski <jan.brzezanski@gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

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

end of thread, other threads:[~2021-03-13 19:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13 19:04 [bitbake][dunfell][1.46][PATCH 0/2] Patch review Steve Sakoman
2021-03-13 19:04 ` [bitbake][dunfell][1.46][PATCH 1/2] runqueue: Fix task execution corruption issue Steve Sakoman
2021-03-13 19:04 ` [bitbake][dunfell][1.46][PATCH 2/2] runqueue: Add setscene task overlap sanity check Steve Sakoman
2021-03-13 19:18 ` [bitbake-devel] [bitbake][dunfell][1.46][PATCH 0/2] Patch review Martin Jansa

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.