From: "Schmidt, Adriaan" <adriaan.schmidt@siemens.com>
To: "Schild, Henning" <henning.schild@siemens.com>
Cc: "isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: RE: [PATCH 1/3] fix(isar-sstate): catch errors in signature comparison
Date: Tue, 19 Jul 2022 08:11:48 +0000 [thread overview]
Message-ID: <AS4PR10MB53185D9895DCCC936492798CED8F9@AS4PR10MB5318.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20220719090527.0979e298@md1za8fc.ad001.siemens.net>
Schild, Henning, Dienstag, 19. Juli 2022 09:05:
> Am Tue, 19 Jul 2022 08:16:26 +0200
> schrieb Adriaan Schmidt <adriaan.schmidt@siemens.com>:
>
> > Those errors happen when the sstate cache contains both pre and post
> > bitbake-2.0 signatures, which have a different format (pickle vs.
> > compressed json).
> >
> > Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
> > ---
> > scripts/isar-sstate | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/scripts/isar-sstate b/scripts/isar-sstate
> > index 8ea85edc..9f5c17b0 100755
> > --- a/scripts/isar-sstate
> > +++ b/scripts/isar-sstate
> > @@ -781,7 +781,10 @@ def sstate_analyze(source, target, **kwargs):
> >
> > local_file = source.download(s.path)
> > remote_file = target.download(t.path)
> > - out = compare_sigfiles(remote_file, local_file,
> > recursecb, color=True)
> > + try:
> > + out = compare_sigfiles(remote_file, local_file,
> > recursecb, color=True)
> > + except:
> > + out = ["Failed to compare signatures."]
>
> Maybe there is a python exception for just that, or an error code from
> which we can take strerr so we do not invent our own.
The exceptions we see here come from different locations during file reading.
I'm seeing things like EOFError or _pickle.UnpicklingError, and when we move
to bitbake 2.0 it may be something compression or json related.
The strings returned are not really useful (e.g. from the unpickler it
might be "Memo value not found at index 97"), that's why I went for
"catch anything and move on".
But I just noticed that sstate_lint() also needs a try/catch when reading
signature files. Will send update.
Adriaan
> Henning
>
> > source.release(local_file)
> > target.release(remote_file)
> > # shorten hashes from 64 to 8 characters for better
> > readability
next prev parent reply other threads:[~2022-07-19 8:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 6:16 [PATCH 0/3] isar-sstate improvements Adriaan Schmidt
2022-07-19 6:16 ` [PATCH 1/3] fix(isar-sstate): catch errors in signature comparison Adriaan Schmidt
2022-07-19 7:05 ` Henning Schild
2022-07-19 8:11 ` Schmidt, Adriaan [this message]
2022-07-19 6:16 ` [PATCH 2/3] isar-sstate: refactor exit codes and error messages Adriaan Schmidt
2022-07-19 6:16 ` [PATCH 3/3] docs(isar-sstate): update documentation of lint command Adriaan Schmidt
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=AS4PR10MB53185D9895DCCC936492798CED8F9@AS4PR10MB5318.EURPRD10.PROD.OUTLOOK.COM \
--to=adriaan.schmidt@siemens.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox