Bug 256652 - ports-mgmt/poudriere-devel: freebsd-update in i386 jail on amd64 host upgrades jail using amd64 files
Summary: ports-mgmt/poudriere-devel: freebsd-update in i386 jail on amd64 host upgrade...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Bryan Drewery
URL:
Keywords: needs-qa
: 256659 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-06-16 16:44 UTC by Jan Beich
Modified: 2021-06-17 22:02 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2021-06-16 16:44:47 UTC
At least on 11.4 i386 freebsd-update gets confused about architecture, breaking the jail due to mixed ABI. My 12.2/13.0 i386 jails are NOT affected (14.0 i386 is built from source + freebsd-update doesn't support -CURRENT). Creating another 11.4 i386 jail still produces mixed ABI because poudriere runs freebsd-update at the end.

$ poudriere jail -l | fgrep 114i386
114i386      11.4-RELEASE-p7                i386          ftp      2021-01-31 00:10:14 /poudriere/jails/114i386

$ file /poudriere/jails/114i386/libexec/ld-elf.so.1
/poudriere/jails/114i386/libexec/ld-elf.so.1: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), dynamically linked, stripped

$ poudriere jail -uj 114i386
[00:00:00] Upgrading using ftp
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching metadata signature for 11.4-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata patches.. done.
Applying metadata patches... done.
Fetching 2 metadata files... done.
Inspecting system... done.
Preparing to download files... done.
Fetching 15 patches.....10.. done.
Applying patches... done.
Fetching 54 files... ....10....20....30....40....50.. done.
The following files will be updated as part of updating to
11.4-RELEASE-p11:
/bin/freebsd-version
/lib/libc.so.7
/lib/libcrypto.so.8
/lib/libgcc_s.so.1
/libexec/ld-elf.so.1
/rescue/[
/rescue/atmconfig
/rescue/badsect
/rescue/bectl
/rescue/bsdlabel
/rescue/bunzip2
/rescue/bzcat
/rescue/bzip2
/rescue/camcontrol
/rescue/cat
/rescue/ccdconfig
/rescue/chflags
/rescue/chgrp
/rescue/chio
/rescue/chmod
/rescue/chown
/rescue/chroot
/rescue/clri
/rescue/cp
/rescue/csh
/rescue/date
/rescue/dd
/rescue/devfs
/rescue/df
/rescue/dhclient
/rescue/disklabel
/rescue/dmesg
/rescue/dump
/rescue/dumpfs
/rescue/dumpon
/rescue/echo
/rescue/ed
/rescue/ex
/rescue/expr
/rescue/fastboot
/rescue/fasthalt
/rescue/fdisk
/rescue/fsck
/rescue/fsck_4.2bsd
/rescue/fsck_ffs
/rescue/fsck_msdosfs
/rescue/fsck_ufs
/rescue/fsdb
/rescue/fsirand
/rescue/gbde
/rescue/geom
/rescue/getfacl
/rescue/glabel
/rescue/gpart
/rescue/groups
/rescue/gunzip
/rescue/gzcat
/rescue/gzip
/rescue/halt
/rescue/head
/rescue/hostname
/rescue/id
/rescue/ifconfig
/rescue/init
/rescue/ipf
/rescue/iscsictl
/rescue/iscsid
/rescue/kenv
/rescue/kill
/rescue/kldconfig
/rescue/kldload
/rescue/kldstat
/rescue/kldunload
/rescue/ldconfig
/rescue/less
/rescue/link
/rescue/ln
/rescue/ls
/rescue/lzcat
/rescue/lzma
/rescue/md5
/rescue/mdconfig
/rescue/mdmfs
/rescue/mkdir
/rescue/mknod
/rescue/more
/rescue/mount
/rescue/mount_cd9660
/rescue/mount_msdosfs
/rescue/mount_nfs
/rescue/mount_nullfs
/rescue/mount_udf
/rescue/mount_unionfs
/rescue/mt
/rescue/mv
/rescue/nc
/rescue/newfs
/rescue/newfs_msdos
/rescue/nos-tun
/rescue/pgrep
/rescue/ping
/rescue/ping6
/rescue/pkill
/rescue/poweroff
/rescue/ps
/rescue/pwd
/rescue/rcorder
/rescue/rcp
/rescue/rdump
/rescue/realpath
/rescue/reboot
/rescue/red
/rescue/rescue
/rescue/restore
/rescue/rm
/rescue/rmdir
/rescue/route
/rescue/routed
/rescue/rrestore
/rescue/rtquery
/rescue/rtsol
/rescue/savecore
/rescue/sed
/rescue/setfacl
/rescue/sh
/rescue/shutdown
/rescue/sleep
/rescue/spppcontrol
/rescue/stty
/rescue/swapon
/rescue/sync
/rescue/sysctl
/rescue/tail
/rescue/tar
/rescue/tcsh
/rescue/tee
/rescue/test
/rescue/tunefs
/rescue/umount
/rescue/unlink
/rescue/unlzma
/rescue/unxz
/rescue/vi
/rescue/whoami
/rescue/xz
/rescue/xzcat
/rescue/zcat
/rescue/zdb
/rescue/zfs
/rescue/zpool
/sbin/devd
/sbin/dhclient
/sbin/init
/sbin/rtsol
/usr/bin/ar
/usr/bin/as
/usr/bin/c++
/usr/bin/cc
/usr/bin/clang
/usr/bin/clang++
/usr/bin/clang-cpp
/usr/bin/cpp
/usr/bin/ld
/usr/bin/ld.bfd
/usr/bin/ld.lld
/usr/bin/make
/usr/bin/ranlib
/usr/bin/svnlite
/usr/bin/svnliteadmin
/usr/bin/svnlitebench
/usr/bin/svnlitedumpfilter
/usr/bin/svnlitefsfs
/usr/bin/svnlitelook
/usr/bin/svnlitemucc
/usr/bin/svnliterdump
/usr/bin/svnliteserve
/usr/bin/svnlitesync
/usr/bin/svnliteversion
/usr/include/sys/filedesc.h
/usr/include/sys/jail.h
/usr/lib/libc.a
/usr/lib/libc_p.a
/usr/lib/libc_pic.a
/usr/lib/libcompiler_rt.a
/usr/lib/libcompiler_rt_p.a
/usr/lib/libcrypto.a
/usr/lib/libcrypto_p.a
/usr/lib/libhdb.so.11
/usr/lib/libpam.a
/usr/lib/libprivatesqlite3.a
/usr/lib/libprivatesqlite3.so.0
/usr/lib/libprivatesqlite3_p.a
/usr/lib/libprivateunbound.a
/usr/lib/libprivateunbound.so.5
/usr/lib/libprivateunbound_p.a
/usr/lib/libradius.a
/usr/lib/libradius.so.4
/usr/lib/libradius_p.a
/usr/lib/pam_login_access.so.6
/usr/lib/pam_radius.so.6
/usr/libexec/ftpd
/usr/sbin/freebsd-update
/usr/sbin/local-unbound
/usr/sbin/local-unbound-anchor
/usr/sbin/local-unbound-checkconf
/usr/sbin/local-unbound-control
/usr/sbin/nologin
/usr/sbin/ppp
/usr/sbin/rtsold
/usr/share/man/man2/jail.2.gz
/usr/share/man/man2/jail_attach.2.gz
/usr/share/man/man2/jail_get.2.gz
/usr/share/man/man2/jail_remove.2.gz
/usr/share/man/man2/jail_set.2.gz
/usr/src/lib/libc/sys/jail.2
/usr/src/lib/libpam/modules/pam_login_access/login_access.c
/usr/src/lib/libradius/radlib.c
/usr/src/sys/conf/newvers.sh
/usr/src/sys/dev/xen/blkback/blkback.c
/usr/src/sys/kern/kern_descrip.c
/usr/src/sys/kern/kern_fork.c
/usr/src/sys/kern/kern_jail.c
/usr/src/sys/kern/vfs_mount.c
/usr/src/sys/sys/filedesc.h
/usr/src/sys/sys/jail.h
/usr/src/sys/vm/vm_fault.c
/usr/src/usr.sbin/freebsd-update/freebsd-update.sh
Installing updates...Scanning /poudriere/jails/114i386/usr/share/certs/blacklisted for certificates...
Scanning /poudriere/jails/114i386/usr/share/certs/trusted for certificates...
 done.
11.4-RELEASE-p11
[00:01:20] Recording filesystem state for clean... done

$ file /poudriere/jails/114i386/libexec/ld-elf.so.1
/poudriere/jails/114i386/libexec/ld-elf.so.1: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, stripped
$ file /poudriere/jails/114i386/lib/libthr.so.3
/poudriere/jails/114i386/lib/libthr.so.3: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), dynamically linked, stripped
Comment 1 Victor Sudakov 2021-06-17 02:28:29 UTC
I have this problem too, with ports-mgmt/poudriere-devel. The "importance" field should be changed to "Affects some people" IMO.
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2021-06-17 06:04:20 UTC
Ah, so this is why my 11 and 12 i386 jails are broken.
Comment 3 Victor Sudakov 2021-06-17 12:13:45 UTC
> freebsd-update in 11.4 i386 jail [...]

Not only in an 11.4 i386 jail, but in an 12.2 i386 jail too:

find /poudriere/jails/122i386/{bin,sbin,usr/bin,usr/sbin,usr/lib} |\
  xargs file | grep "64-bit LSB" | wc -l

The above will find 13 64-bit binaries.
Comment 4 Jan Beich freebsd_committer freebsd_triage 2021-06-17 12:18:43 UTC
(In reply to Victor Sudakov from comment #3)

Thanks for a one-liner. 13.0 i386 appears to be affected as well.

/poudriere/jails/130i386/usr/bin/dc:                                                                     ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 13.0 (1300139), FreeBSD-style, stripped
/poudriere/jails/130i386/usr/bin/bc:                                                                     ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 13.0 (1300139), FreeBSD-style, stripped
/poudriere/jails/130i386/usr/lib/libradius.so.4:                                                         ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked, for FreeBSD 13.0 (1300139), stripped
Comment 5 Bryan Drewery freebsd_committer freebsd_triage 2021-06-17 19:51:07 UTC
*** Bug 256659 has been marked as a duplicate of this bug. ***
Comment 6 Bryan Drewery freebsd_committer freebsd_triage 2021-06-17 19:52:51 UTC
This is specific to Poudriere-devel where I changed how freebsd-update is used.
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-06-17 22:01:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=25060b9198097c19f5bb5daf9bcbb271d4f5a8e7

commit 25060b9198097c19f5bb5daf9bcbb271d4f5a8e7
Author:     Bryan Drewery <bdrewery@FreeBSD.org>
AuthorDate: 2021-06-17 21:57:59 +0000
Commit:     Bryan Drewery <bdrewery@FreeBSD.org>
CommitDate: 2021-06-17 22:01:15 +0000

    ports-mgmt/poudriere-devel: Update to 3.3.0-738-g9839954fb

    Changes
          - testport: Show logs info on depend build failures
          - MUTABLE_BASE=schg: Support writing to /boot/firmware for cpu microcode
          - jail -x: This is not limited to src builds
          - bulk: Don't run 'bulk crashed' hook on -f failures
          - Add git hash annotation into built packages.
          - jail -cu: Fix freebsd-update using wrong arch [1]
          - Update log parsing reasons (processonelog.sh)

    PR:     256652 [1]

 ports-mgmt/poudriere-devel/Makefile | 4 ++--
 ports-mgmt/poudriere-devel/distinfo | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)