All of lore.kernel.org
 help / color / mirror / Atom feed
* Pseudo errors in lib/bb/__pycache__ #bitbake
@ 2024-05-29 10:56 Sven
  2024-05-29 22:49 ` [bitbake-devel] " Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Sven @ 2024-05-29 10:56 UTC (permalink / raw)
  To: bitbake-devel

Hi,

I'm using Yocto 5.0 (scarthgap) which comes with bitbake 2.8. Since migrating from kirkstone (bitbake 2.0), I have started seeing pseudo abort errors like these:

NOTE: recipe IMAGE-1.0-r0: task do_rootfs: Failed
ERROR: Task (poky/../LAYER/recipes-core/images/IMAGE.bb:do_rootfs) failed with exit code '1' 
Pseudo log:
path mismatch [1 link]: ino 1879965 db 'poky/bitbake/lib/bb/__pycache__/__init__.cpython-312.pyc' req 'build/tmp/work/MACHINE-poky-linux-gnueabi/IMAGE/1.0/rootfs/var/lib/opkg/info/jq.postinst'.
creat for 'build/tmp/work/MACHINE-poky-linux-gnueabi/IMAGE/1.0/rootfs/var/lib/opkg/info/jq.control' replaces existing 1879952 ['build/tmp/work/MACHINE-poky-linux-gnueabi/IMAGE/1.0/data.ext4'].
symlink err : 1879909 ['build/tmp/work/MACHINE-poky-linux-gnueabi/IMAGE/1.0/rootfs/var/cache/opkg/volatile.211108/aae1283bc69272c07742f9861f12b8d8_jq_1.7.1-r0_cortexa7t2hf-neon-vfpv4.ipk'] (db 'build/tmp/work/MACHINE-poky-linux-gnueabi/IMAGE/1.0/boot.vfat') db mode 0100644, header mode 0120777 (unlinking db)


ERROR: Task (poky/../LAYER/recipes-core/images/IMAGE.bb:do_rootfs) failed with exit code '134'
Pseudo log:
path mismatch [1 link]: ino 1081932 db 'poky/bitbake/lib/bb/fetch2/__pycache__/clearcase.cpython-312.pyc' req 'poky/meta/lib/oe/package_manager/ipk/__pycache__/__init__.cpython-311.pyc'.

This occurs both on Ubuntu 20.04 (former) and Debian Bookworm (latter). What is this caused by and how can I resolve this issue?

Thanks,
Sven


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

* Re: [bitbake-devel] Pseudo errors in lib/bb/__pycache__ #bitbake
  2024-05-29 10:56 Pseudo errors in lib/bb/__pycache__ #bitbake Sven
@ 2024-05-29 22:49 ` Richard Purdie
  2024-05-31 12:51     ` Sven
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2024-05-29 22:49 UTC (permalink / raw)
  To: sven.schwermer, bitbake-devel

On Wed, 2024-05-29 at 03:56 -0700, Sven via lists.openembedded.org
wrote:
> Hi,
> 
> I'm using Yocto 5.0 (scarthgap) which comes with bitbake 2.8. Since
> migrating from kirkstone (bitbake 2.0), I have started seeing pseudo
> abort errors like these:
> 
> NOTE: recipe IMAGE-1.0-r0: task do_rootfs: Failed
> ERROR: Task (poky/../LAYER/recipes-core/images/IMAGE.bb:do_rootfs)
> failed with exit code '1' 
> Pseudo log:
> path mismatch [1 link]: ino 1879965 db
> 'poky/bitbake/lib/bb/__pycache__/__init__.cpython-312.pyc' req
> 'build/tmp/work/MACHINE-poky-linux-
> gnueabi/IMAGE/1.0/rootfs/var/lib/opkg/info/jq.postinst'.
> creat for 'build/tmp/work/MACHINE-poky-linux-
> gnueabi/IMAGE/1.0/rootfs/var/lib/opkg/info/jq.control' replaces
> existing 1879952 ['build/tmp/work/MACHINE-poky-linux-
> gnueabi/IMAGE/1.0/data.ext4'].
> symlink err : 1879909 ['build/tmp/work/MACHINE-poky-linux-
> gnueabi/IMAGE/1.0/rootfs/var/cache/opkg/volatile.211108/aae1283bc6927
> 2c07742f9861f12b8d8_jq_1.7.1-r0_cortexa7t2hf-neon-vfpv4.ipk'] (db
> 'build/tmp/work/MACHINE-poky-linux-gnueabi/IMAGE/1.0/boot.vfat') db
> mode 0100644, header mode 0120777 (unlinking db)
> 
> 
> ERROR: Task (poky/../LAYER/recipes-core/images/IMAGE.bb:do_rootfs)
> failed with exit code '134'
> Pseudo log:
> path mismatch [1 link]: ino 1081932 db 'poky/bitbake/lib/bb/fetch2/__pycache__/clearcase.cpython-312.pyc' req 'poky/meta/lib/oe/package_manager/ipk/__pycache__/__init__.cpython-311.pyc'.
> 
> This occurs both on Ubuntu 20.04 (former) and Debian Bookworm
> (latter). What is this caused by and how can I resolve this issue?

That looks like you're running the clearcase fetcher during image
construction? There are python cache files being created and pseudo is
tracking them when it shouldn't be.

Adding the bitbake directory to PSEUDO_IGNORE_PATH (see image.bbclass)
should avoid those errors but in your position I'd probably want to
know what was calling into clearcase from under pseudo in the first
place (or at least calling into the fetcher code)...

Cheers,

Richard


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

* Re: [bitbake-devel] Pseudo errors in lib/bb/__pycache__ #bitbake
@ 2024-05-31 12:51     ` Sven
  0 siblings, 0 replies; 6+ messages in thread
From: Sven Schwermer @ 2024-05-31 12:50 UTC (permalink / raw)
  To: Richard Purdie; +Cc: bitbake-devel

I get these mismatch errors between all sorts of different pairs of
files, it seems to be unpredictable. Another example:
path mismatch [2 links]: ino 6330088 db
'poky/meta/lib/oe/__pycache__/__init__.cpython-312.pyc' req
'build/tmp/work/MACHINE-poky-linux-gnueabi/IMAGE/1.0/rootfs.image_tar/usr/lib/systemd/system/user@0.service.d'.

This is after I added the following lines to my conf/local.conf:
PSEUDO_IGNORE_PATHS .= ",${COREBASE}/bitbake"
PSEUDO_IGNORE_PATHS .= ",${COREBASE}/meta/lib"

I'm probably doing something wrong in some recipe/class, however, I
don't know how I can find out where to look. What's the way to
troubleshoot these errors? Any help is appreciated.

Thanks!

Best regards,
Sven

On Thu, May 30, 2024 at 12:49 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2024-05-29 at 03:56 -0700, Sven via lists.openembedded.org
> wrote:
> > Hi,
> >
> > I'm using Yocto 5.0 (scarthgap) which comes with bitbake 2.8. Since
> > migrating from kirkstone (bitbake 2.0), I have started seeing pseudo
> > abort errors like these:
> >
> > NOTE: recipe IMAGE-1.0-r0: task do_rootfs: Failed
> > ERROR: Task (poky/../LAYER/recipes-core/images/IMAGE.bb:do_rootfs)
> > failed with exit code '1'
> > Pseudo log:
> > path mismatch [1 link]: ino 1879965 db
> > 'poky/bitbake/lib/bb/__pycache__/__init__.cpython-312.pyc' req
> > 'build/tmp/work/MACHINE-poky-linux-
> > gnueabi/IMAGE/1.0/rootfs/var/lib/opkg/info/jq.postinst'.
> > creat for 'build/tmp/work/MACHINE-poky-linux-
> > gnueabi/IMAGE/1.0/rootfs/var/lib/opkg/info/jq.control' replaces
> > existing 1879952 ['build/tmp/work/MACHINE-poky-linux-
> > gnueabi/IMAGE/1.0/data.ext4'].
> > symlink err : 1879909 ['build/tmp/work/MACHINE-poky-linux-
> > gnueabi/IMAGE/1.0/rootfs/var/cache/opkg/volatile.211108/aae1283bc6927
> > 2c07742f9861f12b8d8_jq_1.7.1-r0_cortexa7t2hf-neon-vfpv4.ipk'] (db
> > 'build/tmp/work/MACHINE-poky-linux-gnueabi/IMAGE/1.0/boot.vfat') db
> > mode 0100644, header mode 0120777 (unlinking db)
> >
> >
> > ERROR: Task (poky/../LAYER/recipes-core/images/IMAGE.bb:do_rootfs)
> > failed with exit code '134'
> > Pseudo log:
> > path mismatch [1 link]: ino 1081932 db 'poky/bitbake/lib/bb/fetch2/__pycache__/clearcase.cpython-312.pyc' req 'poky/meta/lib/oe/package_manager/ipk/__pycache__/__init__.cpython-311.pyc'.
> >
> > This occurs both on Ubuntu 20.04 (former) and Debian Bookworm
> > (latter). What is this caused by and how can I resolve this issue?
>
> That looks like you're running the clearcase fetcher during image
> construction? There are python cache files being created and pseudo is
> tracking them when it shouldn't be.
>
> Adding the bitbake directory to PSEUDO_IGNORE_PATH (see image.bbclass)
> should avoid those errors but in your position I'd probably want to
> know what was calling into clearcase from under pseudo in the first
> place (or at least calling into the fetcher code)...
>
> Cheers,
>
> Richard



-- 

Sven Schwermer

Engineering Manager Connectivity

+47 94169642 |
www.disruptive-technologies.com
Strandveien 17, 1366 Lysaker, Norway


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

* Re: [bitbake-devel] Pseudo errors in lib/bb/__pycache__ #bitbake
@ 2024-05-31 12:51     ` Sven
  0 siblings, 0 replies; 6+ messages in thread
From: Sven @ 2024-05-31 12:51 UTC (permalink / raw)
  To: Richard Purdie; +Cc: bitbake-devel

I get these mismatch errors between all sorts of different pairs of
files, it seems to be unpredictable. Another example:
path mismatch [2 links]: ino 6330088 db
'poky/meta/lib/oe/__pycache__/__init__.cpython-312.pyc' req
'build/tmp/work/MACHINE-poky-linux-gnueabi/IMAGE/1.0/rootfs.image_tar/usr/lib/systemd/system/user@0.service.d'.

This is after I added the following lines to my conf/local.conf:
PSEUDO_IGNORE_PATHS .= ",${COREBASE}/bitbake"
PSEUDO_IGNORE_PATHS .= ",${COREBASE}/meta/lib"

I'm probably doing something wrong in some recipe/class, however, I
don't know how I can find out where to look. What's the way to
troubleshoot these errors? Any help is appreciated.

Thanks!

Best regards,
Sven

On Thu, May 30, 2024 at 12:49 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2024-05-29 at 03:56 -0700, Sven via lists.openembedded.org
> wrote:
> > Hi,
> >
> > I'm using Yocto 5.0 (scarthgap) which comes with bitbake 2.8. Since
> > migrating from kirkstone (bitbake 2.0), I have started seeing pseudo
> > abort errors like these:
> >
> > NOTE: recipe IMAGE-1.0-r0: task do_rootfs: Failed
> > ERROR: Task (poky/../LAYER/recipes-core/images/IMAGE.bb:do_rootfs)
> > failed with exit code '1'
> > Pseudo log:
> > path mismatch [1 link]: ino 1879965 db
> > 'poky/bitbake/lib/bb/__pycache__/__init__.cpython-312.pyc' req
> > 'build/tmp/work/MACHINE-poky-linux-
> > gnueabi/IMAGE/1.0/rootfs/var/lib/opkg/info/jq.postinst'.
> > creat for 'build/tmp/work/MACHINE-poky-linux-
> > gnueabi/IMAGE/1.0/rootfs/var/lib/opkg/info/jq.control' replaces
> > existing 1879952 ['build/tmp/work/MACHINE-poky-linux-
> > gnueabi/IMAGE/1.0/data.ext4'].
> > symlink err : 1879909 ['build/tmp/work/MACHINE-poky-linux-
> > gnueabi/IMAGE/1.0/rootfs/var/cache/opkg/volatile.211108/aae1283bc6927
> > 2c07742f9861f12b8d8_jq_1.7.1-r0_cortexa7t2hf-neon-vfpv4.ipk'] (db
> > 'build/tmp/work/MACHINE-poky-linux-gnueabi/IMAGE/1.0/boot.vfat') db
> > mode 0100644, header mode 0120777 (unlinking db)
> >
> >
> > ERROR: Task (poky/../LAYER/recipes-core/images/IMAGE.bb:do_rootfs)
> > failed with exit code '134'
> > Pseudo log:
> > path mismatch [1 link]: ino 1081932 db 'poky/bitbake/lib/bb/fetch2/__pycache__/clearcase.cpython-312.pyc' req 'poky/meta/lib/oe/package_manager/ipk/__pycache__/__init__.cpython-311.pyc'.
> >
> > This occurs both on Ubuntu 20.04 (former) and Debian Bookworm
> > (latter). What is this caused by and how can I resolve this issue?
>
> That looks like you're running the clearcase fetcher during image
> construction? There are python cache files being created and pseudo is
> tracking them when it shouldn't be.
>
> Adding the bitbake directory to PSEUDO_IGNORE_PATH (see image.bbclass)
> should avoid those errors but in your position I'd probably want to
> know what was calling into clearcase from under pseudo in the first
> place (or at least calling into the fetcher code)...
>
> Cheers,
>
> Richard


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

* Re: [bitbake-devel] Pseudo errors in lib/bb/__pycache__ #bitbake
  2024-05-31 12:51     ` Sven
  (?)
@ 2024-05-31 13:36     ` Richard Purdie
  2024-06-04 12:26       ` Sven
  -1 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2024-05-31 13:36 UTC (permalink / raw)
  To: Sven Schwermer; +Cc: bitbake-devel

On Fri, 2024-05-31 at 14:50 +0200, Sven Schwermer wrote:
> I get these mismatch errors between all sorts of different pairs of
> files, it seems to be unpredictable. Another example:
> path mismatch [2 links]: ino 6330088 db
> 'poky/meta/lib/oe/__pycache__/__init__.cpython-312.pyc' req
> 'build/tmp/work/MACHINE-poky-linux-gnueabi/IMAGE/1.0/rootfs.image_tar/usr/lib/systemd/system/user@0.service.d'.
> 
> This is after I added the following lines to my conf/local.conf:
> PSEUDO_IGNORE_PATHS .= ",${COREBASE}/bitbake"
> PSEUDO_IGNORE_PATHS .= ",${COREBASE}/meta/lib"
> 
> I'm probably doing something wrong in some recipe/class, however, I
> don't know how I can find out where to look. What's the way to
> troubleshoot these errors? Any help is appreciated.

There isn't a magic way to debug what is going on. The issue is that
files are being created under pseudo then deleted outside of it, then
the inode is being reused. When pseudo sees the same inode against two
different files, it can get confused so we made it complain about these
cases.

The question is therefore which processes are creating the files.

Creation of pycache files under pseudo means you're probably importing
python modules which weren't previously used outside pseudo. Why
they're being deleted and recreated seems odd though, usually pycache
files are created and then unchanged.

Adding the PSEUDO_IGNORE_PATHS should help but I'm guessing you're
reusing a TMPDIR and there are still entries in the pseudo db from
previous builds?

You could clean the image recipes in question which would delete the
pseudo db for those recipes (WORKDIR/pseudo) and might help sort out an
existing builddir...

Cheers,

Richard




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

* Re: Pseudo errors in lib/bb/__pycache__ #bitbake
  2024-05-31 13:36     ` Richard Purdie
@ 2024-06-04 12:26       ` Sven
  0 siblings, 0 replies; 6+ messages in thread
From: Sven @ 2024-06-04 12:26 UTC (permalink / raw)
  To: bitbake-devel

Richard, your explanation helped me find the issue: I had deleted files in __pycache__ between builds. Apparently, those files had been created while in the pseudo environment.

Thank you very much!

Sven


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

end of thread, other threads:[~2024-06-04 12:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-29 10:56 Pseudo errors in lib/bb/__pycache__ #bitbake Sven
2024-05-29 22:49 ` [bitbake-devel] " Richard Purdie
2024-05-31 12:50   ` Sven Schwermer
2024-05-31 12:51     ` Sven
2024-05-31 13:36     ` Richard Purdie
2024-06-04 12:26       ` Sven

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.