Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 762367 - sys-apps/sandbox: errors on armv6j-hardfp qemu-chroot (amd64 host)
Summary: sys-apps/sandbox: errors on armv6j-hardfp qemu-chroot (amd64 host)
Status: RESOLVED DUPLICATE of bug 681892
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-29 06:38 UTC by Casey Avila
Modified: 2021-02-03 20:28 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info for HOST qemu (emerge-info-qemu.txt,8.15 KB, text/plain)
2020-12-29 06:38 UTC, Casey Avila
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Casey Avila 2020-12-29 06:38:38 UTC
Created attachment 680131 [details]
emerge --info for HOST qemu

After setting up `qemu-arm` and chrooting into the latest armv6j | HardFP stage-3 tarball and applying the proper FEATURES flags to disable `pid-sandbox` and `network-sandbox`, emerging a package yields the following error multiple times:

>(sandbox) error: in /var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13/libsbutil/src/file.c, function rc_ls_dir(), line 122:
>(sandbox)        strerror() = 'Value too large for defined data type'
>(sandbox)        Failed to readdir() '/etc/sandbox.d'!
>(sandbox) error: in /var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13/libsbutil/src/file.c, function rc_ls_dir(), line 122:
>(sandbox)        strerror() = 'Value too large for defined data type'
>(sandbox)        Failed to readdir() '/etc/sandbox.d'!
>(sandbox) error: in /var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13/libsbutil/src/file.c, function rc_ls_dir(), line 122:
>(sandbox)        strerror() = 'Value too large for defined data type'
>(sandbox)        Failed to readdir() '/etc/sandbox.d'!
>(sandbox) error: in /var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13/libsbutil/src/file.c, function rc_ls_dir(), line 122:
>(sandbox)        strerror() = 'Value too large for defined data type'
>(sandbox)        Failed to readdir() '/etc/sandbox.d'!

(It prints the error four times in a row)
The error appears when the emerge moves onto a new step (Calculating dependencies -> Fetching sources -> Preparing sources -> Compiling -> Merging). I thought these errors were harmless, but occasionally I would get an illegal instruction error when compiling. This may be a completely different problem however. I also set up the same scenario chrooting into the aarch64 tarball instead of armv6j, and the error does not occur on that platform. My qemu is set up with a qemu-wrapper that enables `-cpu arm1176` to ensure compatibility with armv6 binaries. I have attached the `emerge --info` for qemu on the host machine.
Comment 1 Casey Avila 2020-12-29 06:44:11 UTC
Portage 3.0.9 (python 3.8.6-final-0, default/linux/amd64/17.1/hardened, gcc-9.3.0, glibc-2.32-r3, 5.4.80-gentoo-r1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.4.80-gentoo-r1-x86_64-AMD_Ryzen_5_1600X_Six-Core_Processor-with-glibc2.2.5
KiB Mem:    16412560 total,   7549748 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Sat, 26 Dec 2020 00:45:01 +0000
Head commit of repository gentoo: 41c8afc3f6b5af34dfbba3ed07cb3ceca99a4e6e
sh bash 5.0_p18
ld GNU ld (Gentoo 2.34 p6) 2.34.0
ccache version 3.7.12 [enabled]
app-shells/bash:          5.0_p18::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          3.8.6::gentoo, 3.9.0::gentoo
dev-util/ccache:          3.7.12::gentoo
dev-util/cmake:           3.17.4-r1::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.2-r1::gentoo
sys-devel/binutils:       2.34-r2::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo
sys-devel/gcc-config:     2.3.2-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r3::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 

kc
    location: /var/db/repos/kc
    masters: gentoo

brother-overlay
    location: /var/lib/layman/brother-overlay
    sync-type: laymansync
    sync-uri: https://github.com/stefan-langenmaier/brother-overlay.git
    masters: gentoo
    priority: 50

haskell
    location: /home/casey/Proyectos/overlays/gentoo-haskell
    sync-type: laymansync
    sync-uri: https://github.com/gentoo-haskell/gentoo-haskell.git
    masters: gentoo
    priority: 50

jorgicio
    location: /var/lib/layman/jorgicio
    sync-type: laymansync
    sync-uri: https://github.com/jorgicio/jorgicio-gentoo.git
    masters: gentoo
    priority: 50

ricerlay
    location: /var/lib/layman/ricerlay
    sync-type: laymansync
    sync-uri: https://github.com/azahi/ricerlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=znver1 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=znver1 -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=znver1 -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=znver1 -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="es_MX.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j13"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl alsa amd64 bzip2 crypt cuda elogind hardened iconv ipv6 libglvnd libtirpc multilib ncurses nls nptl nvidia openmp pam pcre pie pulseaudio readline seccomp split-usr ssl ssp unicode vaapi vdpau xattr xtpax zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python2_7 python3_8" RUBY_TARGETS="ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

app-emulation/qemu-5.1.0-r2::gentoo was built with the following:
USE="aio alsa bzip2 caps curl fdt filecaps jpeg ncurses nls oss pin-upstream-blobs png pulseaudio seccomp slirp static-user vhost-net vnc xattr xkb -accessibility (-capstone) -debug -doc -glusterfs -gnutls -gtk -infiniband -io-uring -iscsi -jack -jemalloc -lzo -multipath -nfs -numa -opengl -plugins -python -rbd -sasl -sdl -sdl-image (-selinux) -smartcard -snappy -spice -ssh -static -systemtap -test -usb -usbredir -vde -vhost-user-fs -virgl -virtfs -vte -xen -xfs -zstd" ABI_X86="(64)" PYTHON_TARGETS="python3_8 -python3_6 -python3_7 -python3_9" QEMU_SOFTMMU_TARGETS="aarch64 arm x86_64 -alpha -avr -cris -hppa -i386 -lm32 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -moxie -nios2 -or1k -ppc -ppc64 -riscv32 -riscv64 -rx -s390x -sh4 -sh4eb -sparc -sparc64 -tricore -unicore32 -xtensa -xtensaeb" QEMU_USER_TARGETS="aarch64 arm -aarch64_be -alpha -armeb -cris -hppa -i386 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -mipsn32 -mipsn32el -nios2 -or1k -ppc -ppc64 -ppc64abi32 -ppc64le -riscv32 -riscv64 -s390x -sh4 -sh4eb -sparc -sparc32plus -sparc64 -tilegx -x86_64 -xtensa -xtensaeb"
FEATURES="fixlafiles ipc-sandbox ebuild-locks xattr strict qa-unresolved-soname-deps binpkg-docompress preserve-libs usersync protect-owned unknown-features-warn userfetch unmerge-logs userpriv ccache usersandbox multilib-strict news config-protect-if-modified network-sandbox binpkg-dostrip merge-sync assume-digests parallel-fetch sandbox pid-sandbox distlocks unmerge-orphans sfperms binpkg-logs"

>>> Attempting to run pkg_info() for 'app-emulation/qemu-5.1.0-r2'
Using:
  
  sys-firmware/edk2-ovmf-201905
    USE=binary
  sys-firmware/ipxe-1.0.0_p20190728
  sys-firmware/seabios-1.12.0
    USE=binary
  sys-firmware/sgabios-0.1_pre8-r1
Comment 2 Nuno 2021-02-02 19:12:57 UTC
I'm experiencing the same errors on my system:

> (sandbox) error: in /var/tmp/portage/sys-apps/sandbox-2.20/work/sandbox-2.20/libsbutil/src/file.c, function rc_ls_dir(), line 122:
> (sandbox)        strerror() = 'Value too large for defined data type'
> (sandbox)        Failed to readdir() '/etc/sandbox.d'!
> (...)


armv7a-unknown-linux-gnueabihf chroot using qemu-arm version 5.1.0, running on amd64.

sys-apps/sandbox-2.20
sys-apps/portage-3.0.13
Linux 5.4.80-gentoo-r1

FEATURES="-sandbox -usersandbox" suppresses these errors.
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2021-02-03 20:28:13 UTC

*** This bug has been marked as a duplicate of bug 681892 ***