Bug 14636 - Frequent pseudo aborts with tcp-wrappers, complains about hardlinks in packages-split
Summary: Frequent pseudo aborts with tcp-wrappers, complains about hardlinks in packag...
Status: RESOLVED INVALID
Alias: None
Product: Pseudo
Classification: Yocto Project Subprojects
Component: pseudo (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 3.1.14
Assignee: Steve Sakoman
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2021-11-18 15:47 UTC by Ernst Persson
Modified: 2021-11-22 15:03 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Patch to disable pseudo during bb.utils.remove() (997 bytes, patch)
2021-11-22 09:52 UTC, Ernst Persson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ernst Persson 2021-11-18 15:47:20 UTC
I seem to be getting semi-repeatable pseudo abort errors on tcp-wrappers right now. I'm getting this on other packages sometimes also.

I'm using Dunfell. It seems to happen both with Dunfell 3.1.7 and the almost 3.1.12 from today,
0839888394 build-appliance-image: Update to dunfell head revision

It's strange that it's complaining that
package/usr/src/debug/tcp-wrappers/7.6-r10/tcp_wrappers_7.6/diag.c
and
packages-split/tcp-wrappers-src/usr/src/debug/tcp-wrappers/7.6-r10/tcp_wrappers_7.6/diag.c

have the same inode... They should! They are hardlinks.

| DEBUG: Removing manifest: /mnt/scratch/ernst.sjostrand/cu1/work/cortexa7t2hf-neon-fslc-linux-gnueabi/tcp-wrappers/7.6-r10/recipe-sysroot-native/usr/
| NOTE: Installed into sysroot: ['dwarfsrcfiles-native', 'rpm-native', 'dbus-native', 'openssl-native', 'file-native', 'python3-native', 'popt-native', 'libarchive-native', 'db-native', 'elfutils-native', 'bzip2-native', 'perl-native', 'pkgconfig-native', 'expat-native', 'sqlite3-native', 'libnsl2-native', 'libffi-native', 'gdbm-native', 'util-linux-native', 'libtirpc-native', 'readline-native', 'lzo-native', 'e2fsprogs-native', 'libpcre2-native', 'ncurses-native', 'libcap-ng-native']
| NOTE: Skipping as already exists in sysroot: ['glibc', 'pseudo-native', 'libnsl2', 'quilt-native', 'patch-native', 'gcc-cross-arm', 'gcc-runtime', 'linux-libc-headers', 'libtirpc', 'automake-native', 'autoconf-native', 'attr-native', 'gnu-config-native', 'libtool-native', 'xz-native', 'gettext-minimal-native', 'libmpc-native', 'flex-native', 'binutils-cross-arm', 'mpfr-native', 'texinfo-dummy-native', 'gmp-native', 'zlib-native', 'libgcc', 'm4-native']
| DEBUG: sed -e 's:^[^/]*/:/mnt/scratch/ernst.sjostrand/cu1/work/cortexa7t2hf-neon-fslc-linux-gnueabi/tcp-wrappers/7.6-r10/recipe-sysroot-native/:g' /mnt/scratch/ernst.sjostrand/cu1/sysroots-components/x86_64/rpm-native/fixmepath /mnt/scratch/ernst.sjostrand/cu1/sysroots-components/x86_64/dbus-native/fixmepath /mnt/scratch/ernst.sjostrand/cu1/sysroots-components/x86_64/openssl-native/fixmepath /mnt/scratch/ernst.sjostrand/cu1/sysroots-components/x86_64/python3-native/fixmepath /mnt/scratch/ernst.sjostrand/cu1/sysroots-components/x86_64/elfutils-native/fixmepath /mnt/scratch/ernst.sjostrand/cu1/sysroots-components/x86_64/perl-native/fixmepath /mnt/scratch/ernst.sjostrand/cu1/sysroots-components/x86_64/pkgconfig-native/fixmepath /mnt/scratch/ernst.sjostrand/cu1/sysroots-components/x86_64/e2fsprogs-native/fixmepath /mnt/scratch/ernst.sjostrand/cu1/sysroots-components/x86_64/libpcre2-native/fixmepath /mnt/scratch/ernst.sjostrand/cu1/sysroots-components/x86_64/ncurses-native/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/mnt/scratch/ernst.sjostrand/cu1/work/cortexa7t2hf-neon-fslc-linux-gnueabi/tcp-wrappers/7.6-r10/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/mnt/scratch/ernst.sjostrand/cu1/work/cortexa7t2hf-neon-fslc-linux-gnueabi/tcp-wrappers/7.6-r10/recipe-sysroot-native:g' -e 's:FIXME_PSEUDO_SYSROOT:/mnt/scratch/ernst.sjostrand/cu1/sysroots-components/x86_64/pseudo-native:g' -e 's:FIXME_HOSTTOOLS_DIR:/mnt/scratch/ernst.sjostrand/cu1/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/mnt/scratch/ernst.sjostrand/cu1/pkgdata/cu2:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/mnt/scratch/ernst.sjostrand/cu1/work/cortexa7t2hf-neon-fslc-linux-gnueabi/tcp-wrappers/7.6-r10/pseudo/:g' -e 's:FIXME_LOGFIFO:/mnt/scratch/ernst.sjostrand/cu1/work/cortexa7t2hf-neon-fslc-linux-gnueabi/tcp-wrappers/7.6-r10/temp/fifo.10567:g'
| DEBUG: Python function extend_recipe_sysroot finished
| abort()ing pseudo client by server request. See https://wiki.yoctoproject.org/wiki/Pseudo_Abort for more details on this.
| Check logfile: /mnt/scratch/ernst.sjostrand/cu1/work/cortexa7t2hf-neon-fslc-linux-gnueabi/tcp-wrappers/7.6-r10/pseudo//pseudo.log
| ERROR: Command '['rm', '-rf', '/mnt/scratch/ernst.sjostrand/cu1/work/cortexa7t2hf-neon-fslc-linux-gnueabi/tcp-wrappers/7.6-r10/packages-split']' died with <Signals.SIGABRT: 6>.
ERROR: Task (/home/ernst.sjostrand/cu1/meta/poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb:do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3242 tasks of which 1516 didn't need to be rerun and 1 failed.


Summary: 1 task failed:
  /home/ernst.sjostrand/cu1/meta/poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb:do_package
Summary: There were 3 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.



Pseduo.log:

path mismatch [2 links]: ino 6176280 db '/mnt/scratch/ernst.sjostrand/cu1/work/cortexa7t2hf-neon-fslc-linux-gnueabi/tcp-wrappers/7.6-r10/package/usr/src/debug/tcp-wrappers/7.6-r10/tcp_wrappers_7.6/diag.c' req '/mnt/scratch/ernst.sjostrand/cu1/work/cortexa7t2hf-neon-fslc-linux-gnueabi/tcp-wrappers/7.6-r10/packages-split/tcp-wrappers-src/usr/src/debug/tcp-wrappers/7.6-r10/tcp_wrappers_7.6/diag.c'.


Build Configuration:
BB_VERSION           = "1.46.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-fslc-linux-gnueabi"
MACHINE              = "cu2"
DISTRO               = "verilix"
DISTRO_VERSION       = "master"
TUNE_FEATURES        = "arm vfp cortexa7 neon thumb callconvention-hard"
TARGET_FPU           = "hard"
meta                 
meta-poky            = "HEAD:0839888394a6e42e96f9f0d201376eb38bc79b24"
meta-oe              
meta-multimedia      
meta-python          
meta-networking      = "HEAD:c38d2a74f762a792046f3d3c377827b08aade513"
meta-freescale       = "HEAD:2da53ce8330d4bb0f7cb7a2ae186b7475ba02d52"
meta-selinux         = "HEAD:7af62c91d7d00a260cf28e7908955539304d100d"


find * -name diag.c | xargs stat
  File: package/usr/src/debug/tcp-wrappers/7.6-r10/tcp_wrappers_7.6/diag.c
  Size: 1466      	Blocks: 8          IO Block: 4096   regular file
Device: 811h/2065d	Inode: 6176280     Links: 2
Access: (0644/-rw-r--r--)  Uid: (12527211/ernst.sjostrand@verisure.com)   Gid: (12527211/ernst.sjostrand@verisure.com)
Access: 2021-11-18 15:05:21.358980637 +0000
Modify: 1994-12-28 16:42:20.000000000 +0000
Change: 2021-11-18 15:11:06.340869096 +0000
 Birth: -
  File: packages-split/tcp-wrappers-src/usr/src/debug/tcp-wrappers/7.6-r10/tcp_wrappers_7.6/diag.c
  Size: 1466      	Blocks: 8          IO Block: 4096   regular file
Device: 811h/2065d	Inode: 6176280     Links: 2
Access: (0644/-rw-r--r--)  Uid: (12527211/ernst.sjostrand@verisure.com)   Gid: (12527211/ernst.sjostrand@verisure.com)
Access: 2021-11-18 15:05:21.358980637 +0000
Modify: 1994-12-28 16:42:20.000000000 +0000
Change: 2021-11-18 15:11:06.340869096 +0000
 Birth: -
  File: tcp_wrappers_7.6/diag.c
  Size: 1466      	Blocks: 8          IO Block: 4096   regular file
Device: 811h/2065d	Inode: 8524642     Links: 1
Access: (0444/-r--r--r--)  Uid: (12527211/ernst.sjostrand@verisure.com)   Gid: (12527211/ernst.sjostrand@verisure.com)
Access: 2021-11-18 15:17:35.489209195 +0000
Modify: 1994-12-28 16:42:20.000000000 +0000
Change: 2021-11-18 15:11:06.384871389 +0000
 Birth: -


Host machine:
5.4.0-1063-azure
/dev/sdb1 on /mnt type ext4 (rw,relatime,x-systemd.requires=cloud-init.service)
Comment 1 Steve Sakoman 2021-11-19 15:20:30 UTC
I'd like to find some way to reproduce this issue, as I've never seen it in my own testing.

I do regular builds with layer sets quite similar to what you are using, though I mostly use the poky distro (or a distro that inherits poky). So your distro is one potential area to investigate.

Also none of my testing uses an azure host machine, so that is another area of difference.

Have you tried using other host machines to see if it might be azure related?
Comment 2 Ernst Persson 2021-11-22 09:39:50 UTC
Looks like you need to do two builds in a row without sstate caching you.
So build, tweak something, build again. The error comes from:
def exec_func(func, d, dirs = None):
<...>
     cleandirs = flags.get('cleandirs') if flags else None
     if cleandirs:
         for cdir in d.expand(cleandirs).split():
+            bb.warn("My extra print: running cleandir %s" % cdir)
             bb.utils.remove(cdir, True)
             bb.utils.mkdirhier(cdir)

So this "rm -rf" is running under Pseudo... seems a bit meaningless? Can it be disabled?

I actually don't think this is Dunfell specific, it's probably the same on all up to date Yocto.. ? I just managed to trigger this somehow.

There's a been a couple of mentions of similar problems:
https://lists.yoctoproject.org/g/yocto/topic/78528061?p=Created,,,20,2,0,0::recentpostdate%2Fsticky,,,20,2,40,78528061

My distro is based on Poky.

Yeah I also suspected Azure a bit. Looks like a normal ext4 filesystem etc, couldn't find anything very special about it... No Docker involved. Decently modern kernel.
Comment 3 Ernst Persson 2021-11-22 09:52:04 UTC
Created attachment 4844 [details]
Patch to disable pseudo during bb.utils.remove()
Comment 4 Ernst Persson 2021-11-22 09:52:30 UTC
This patch solve my issue.
Comment 5 Ernst Persson 2021-11-22 13:49:42 UTC
Ignore the patch.

This seems to be caused by adding --enable-xattrdb to pseudo.
The pseudo database is missing a lot of files.
Comment 6 Richard Purdie 2021-11-22 15:03:00 UTC
xattrdb is an experimental feature in pseudo and known not to work well, we'd not recommend it.