From: Stefano Tondo <stondo@gmail.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: bitbake-devel@lists.openembedded.org,
Thomas Perrot <thomas.perrot@bootlin.com>,
Alexander Kanavin <alex.kanavin@gmail.com>,
Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>,
Peter Marko <peter.marko@siemens.com>,
stefano.tondo.ext@siemens.com
Subject: Re: [bitbake-devel] [PATCH 1/2] cooker: Write variables that are not JSON types to the event log
Date: Mon, 23 Nov 2026 21:36:01 +0100 [thread overview]
Message-ID: <20261123203601.867088-1-stondo@gmail.com> (raw)
In-Reply-To: <196178d920291fb292393e16233869c08f077760.camel@linuxfoundation.org>
On Fri, 2026-11-20 at 18:46 +0000, Richard Purdie wrote:
> This worries me a bit (well, a lot!), specifically the "second build"
> piece. Why is this persisting across builds? Does:
>
> https://git.openembedded.org/bitbake/commit/?id=606786d17351534ce35d1b0f89815461546a66fe
>
> have any effect on that?
Hi Richard,
606786d17 does not change it. The value persists in the cooker
datastore, not in the global context.
RunQueueExecute.check_dependencies() calls BB_SETSCENE_DEPVALID with
d set to self.cooker.data. In OE-Core, setscene_depvalid() in
sstate.bbclass caches the compiled patterns of
SSTATE_EXCLUDEDEPS_SYSROOT in that datastore:
d.setVar('_SSTATE_EXCLUDEDEPS_SYSROOT', excludedeps)
Nothing removes the variable. So it stays in the datastore until the
cooker parses the configuration again. I checked this with tinfoil on
master: after two builds of nodejs-native:do_populate_sysroot in one
server, config_data still contains the list.
The value alone does not break the event log, because
getAllKeysWithFlags() writes str(v). The crash comes from the
variable history. When tracking is on while setscene_depvalid() runs,
the history records the list, and json.dumps() fails on it at the
start of the next build. Tinfoil(tracking=True) normally enables
tracking only around parsing. But _data_tracked_if_enabled() has no
try/finally, so tracking stays on when the operation inside it raises
an exception. On master, without this patch, the second build fails
with the TypeError in two cases:
- tracking is enabled for the whole tinfoil session
- an exception occurs inside _data_tracked_if_enabled(), and then two
builds run
I must also correct my cover letter for the OE-Core series. It says
that the recipetool selftest needs this patch. With the final version
of that series, the selftest passes without it. The crash occurred
with an earlier version of my recipetool changes, and I could not
find out which call left tracking on in that run.
I think that these are the correct fixes:
1. sstate.bbclass keeps the compiled patterns out of the datastore.
With this change in OE-Core, both cases above pass, and the
variable is not in the event log. setscene_depvalid() gives the
same results as before.
2. _data_tracked_if_enabled() disables tracking in a finally block.
With only this change, the case with the exception passes.
I can send both patches. Do you want to keep this patch as a safety
net for other values in the datastore, or should I drop it? Patch 2/2
does not depend on it.
Best regards,
Stefano
next prev parent reply other threads:[~2026-11-23 20:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 13:53 [PATCH 0/2] fetch/npm: no npm executable, and an event log fix Stefano Tondo
2026-11-20 13:53 ` [PATCH 1/2] cooker: Write variables that are not JSON types to the event log Stefano Tondo
2026-11-20 18:46 ` [bitbake-devel] " Richard Purdie
2026-11-23 20:36 ` Stefano Tondo [this message]
2026-12-04 14:12 ` Stefano Tondo
2026-11-20 13:53 ` [PATCH 2/2] fetch/npm: Build the tarball URL without the npm executable Stefano Tondo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261123203601.867088-1-stondo@gmail.com \
--to=stondo@gmail.com \
--cc=alex.kanavin@gmail.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=peter.marko@siemens.com \
--cc=richard.purdie@linuxfoundation.org \
--cc=stefan.herbrechtsmeier@weidmueller.com \
--cc=stefano.tondo.ext@siemens.com \
--cc=thomas.perrot@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.