Bug 14366 - populate_sdk_ext fails with pseudo path mismatch due to COPY_LIC_DIRS hard links
Summary: populate_sdk_ext fails with pseudo path mismatch due to COPY_LIC_DIRS hard links
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: oe-core other (show other bugs)
Version: 3.3
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 3.4 M3
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2021-04-27 16:05 UTC by Tony Battersby
Modified: 2021-08-04 21:56 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Battersby 2021-04-27 16:05:02 UTC
Environment: Hardknott on Ubuntu 20.04

Steps to reproduce:

Add the "lmsensors-sensors" and "shadow" packages to your image.

Add the following to local.conf:
COPY_LIC_DIRS     = "1"
COPY_LIC_MANIFEST = "1"

Then "bitbake -c populate_sdk_ext core-image-whatever".

Result:

Pseudo log:
Setup complete, sending SIGUSR1 to pid 535434.
path mismatch [10 links]: ino 17702263 db '/home/tonyb/projects/yocto/poky/build-cyber-v/tmp/work/genericx86_64-poky-linux/core-image-cyberv/1.0-r0/rootfs/usr/share/common-licenses/lmsensors-config-libsensors/COPYING.MIT' req '/home/tonyb/projects/yocto/poky/meta/COPYING.MIT'.

And the esdk build fails.

The following page talks about this problem being related to deleted files causing inode reuse:
https://wiki.yoctoproject.org/wiki/Pseudo_Abort

But in this case, the problem is triggered by the fact that the two COPYING.MIT file names are both hard links of the same file.  Neither has been deleted.  They both share the same inode 17702263.  In fact many of the files in rootfs/usr/share/common-licenses have multiple hard links.

Our local.conf has:
COPY_LIC_DIRS     = "1"
COPY_LIC_MANIFEST = "1"

The problem goes away when we comment out these two lines in our local.conf, which removes the rootfs/usr/share/common-licenses directory that is causing the conflict.

A different fix for the problem is to edit the following recipes used in our image:
meta-openembedded/meta-oe/recipes-bsp/lm_sensors/lmsensors-config_1.0.bb
meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
meta/recipes-extended/shadow/shadow-securetty_4.6.bb

...and make a change such as:
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

Reproducibility: always