Skip to contentSkip to conversation

Pseudo errors in lib/bb/__pycache__ #bitbake

DISCUSSION Sven 2 participants 5 messages May 29, 2024 – Jun 4, 2024

lore
Share & tools
lore

Sven

author
#0 lore raw

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

#1 lore raw
Quoted 25 lines · Sven via lists.openembedded.org

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)

Quoted 7 lines

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

#2 lore raw

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/[email protected]'.

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

Quoted 48 lines · Richard Purdie
Quoted 25 lines · Sven via lists.openembedded.org

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)

Quoted 7 lines

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

Signature · 7 lines
Sven Schwermer

Engineering Manager Connectivity

+47 94169642 |
www.disruptive-technologies.com
Strandveien 17, 1366 Lysaker, Norway
#3 lore raw
Quoted 6 lines · Sven Schwermer

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/[email protected]'.

Quoted 7 lines

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

author
#4 lore raw

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