Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 623846 - sys-apps/sandbox: ISE running test-fs-util from sys-apps/systemd-233-r3
Summary: sys-apps/sandbox: ISE running test-fs-util from sys-apps/systemd-233-r3
Status: RESOLVED DUPLICATE of bug 590084
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-04 21:15 UTC by moxian
Modified: 2017-07-05 02:41 UTC (History)
1 user (show)

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


Attachments
backtrace (gdb.txt,3.67 KB, text/plain)
2017-07-05 00:17 UTC, Mike Gilbert
Details
reduced testcase (test-623846.c,226 bytes, text/plain)
2017-07-05 02:36 UTC, Mike Gilbert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description moxian 2017-07-04 21:15:03 UTC
From build.log:

PASS: test-io-util
PASS: test-glob-util
PASS: test-xattr-util
 * /var/tmp/portage/sys-apps/sandbox-2.10-r3/work/sandbox-2.10/libsandbox/libsandbox.c:check_syscall():989: failure (No such file or directory):
 * ISE:
        abs_path: (null)
        res_path: (null)
/var/tmp/portage/sys-apps/systemd-233-r3/work/systemd-233/build-aux/test-driver: line 107: 30471 Aborted                 (core dumped) "$@" > $log_file 2>&1
FAIL: test-fs-util



From test-fs-util.log:

/usr/lib64/libsandbox.so(+0xa796)[0x7ff662875796]
/usr/lib64/libsandbox.so(+0xa884)[0x7ff662875884]
/usr/lib64/libsandbox.so(+0x4b4d)[0x7ff66286fb4d]
/usr/lib64/libsandbox.so(opendir+0x6d)[0x7ff662872f3d]
/var/tmp/portage/sys-apps/systemd-233-r3/work/systemd-233-abi_x86_64.amd64/.libs/libsystemd-shared-233.so(get_files_in_directory+0x43)[0x7ff6624952c3]
/var/tmp/portage/sys-apps/systemd-233-r3/work/systemd-233-abi_x86_64.amd64/.libs/test-fs-util(+0x1114)[0x55bc3c485114]
/lib64/libc.so.6(__libc_start_main+0xf0)[0x7ff661eb6680]
/var/tmp/portage/sys-apps/systemd-233-r3/work/systemd-233-abi_x86_64.amd64/.libs/test-fs-util(+0x1b19)[0x55bc3c485b19]
/proc/30471/cmdline: /var/tmp/portage/sys-apps/systemd-233-r3/work/systemd-233-abi_x86_64.amd64/.libs/test-fs-util 

FAIL test-fs-util (exit status: 134)


I looked at the core, but couldn't figure out what exactly is going on:

(gdb) bt
#0  0x00007f3879a0e108 in raise () from /lib64/libc.so.6
#1  0x00007f3879a0f58a in abort () from /lib64/libc.so.6
#2  0x00007f387a3bb367 in __sb_ebort (file=file@entry=0x7f387a3bdb10 "/var/tmp/portage/sys-apps/sandbox-2.10-r3/work/sandbox-2.10/libsandbox/libsandbox.c", func=func@entry=0x7f387a3bdf28 <__func__.8748> "check_syscall", 
    line_num=line_num@entry=989, format=format@entry=0x7f387a3bdca0 "ISE:\n\tabs_path: %s\n\tres_path: %s\n") at /var/tmp/portage/sys-apps/sandbox-2.10-r3/work/sandbox-2.10/libsbutil/sb_efuncs.c:126
#3  0x00007f387a3b5483 in check_syscall (sbcontext=0x7f387a5ca320 <sbcontext>, flags=<optimized out>, file=0x562bad2cd597 ".", func=0x7f387a3be746 "opendir", sb_nr=<optimized out>)
    at /var/tmp/portage/sys-apps/sandbox-2.10-r3/work/sandbox-2.10/libsandbox/libsandbox.c:988
#4  before_syscall (dirfd=<optimized out>, sb_nr=<optimized out>, func=<optimized out>, file=0x562bad2cd597 ".", flags=<optimized out>)
    at /var/tmp/portage/sys-apps/sandbox-2.10-r3/work/sandbox-2.10/libsandbox/libsandbox.c:1068
#5  0x00007f387a3b54e6 in before_syscall (dirfd=dirfd@entry=-100, sb_nr=sb_nr@entry=16, func=func@entry=0x7f387a3be746 "opendir", file=file@entry=0x562bad2cd597 ".", flags=flags@entry=0)
    at /var/tmp/portage/sys-apps/sandbox-2.10-r3/work/sandbox-2.10/libsandbox/libsandbox.c:1081
#6  0x00007f387a3b7abc in opendir_DEFAULT (name=0x562bad2cd597 ".") at /var/tmp/portage/sys-apps/sandbox-2.10-r3/work/sandbox-2.10/libsandbox/wrapper-funcs/__wrapper_simple.c:52
#7  0x00007f3879fda2c3 in get_files_in_directory (path=<optimized out>, list=0x7fff6e73d308) at /var/tmp/portage/sys-apps/systemd-233-r3/work/systemd-233/src/basic/fs-util.c:458
#8  0x0000562bad2cb114 in test_get_files_in_directory () at /var/tmp/portage/sys-apps/systemd-233-r3/work/systemd-233/src/test/test-fs-util.c:247
#9  main (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/sys-apps/systemd-233-r3/work/systemd-233/src/test/test-fs-util.c:321


basically, we could not get absoulte path of ".". I don't know how to interpret that, neither how to obtain more info.


The tests fail the same way also present in older versions:
sys-apps/systemd-231
sys-apps/systemd-232
sys-apps/systemd-233-r1

The tests do pass in sys-apps/systemd-226-r2, but that's seemingly due to the absence of this test, not because there was no problem.

The tests pass with FEATURES="-usersandbox"


# emerge --info =sys-apps/systemd-233-r3
Portage 2.3.6 (python 3.4.5-final-0, default/linux/amd64/13.0/systemd, gcc-5.4.0, glibc-2.23-r3, 4.9.16-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.16-gentoo-x86_64-Intel-R-_Core-TM-_i5-6600_CPU_@_3.30GHz-with-gentoo-2.3
KiB Mem:    16366528 total,   6662380 free
KiB Swap:   10485756 total,  10485756 free
Timestamp of repository gentoo: Mon, 03 Jul 2017 21:00:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.26.3::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.12.6-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=y --with-bdeps=y --color=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles installsources merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
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 berkdb bzip2 cli cracklib crypt cxx dbus dri fortran gdbm hardened iconv ipv6 modules multilib ncurses nls nptl openmp pam pcre policykit pulseaudio readline seccomp session ssl systemd tcpd udev udisks unicode xattr zlib" ABI_X86="64" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa intel i965 amdgpu radeonsi" XFCE_PLUGINS="brightness clock trash" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Mike Gilbert gentoo-dev 2017-07-05 00:08:14 UTC
I can reproduce with sandbox 2.11-r5 as well.
Comment 2 Mike Gilbert gentoo-dev 2017-07-05 00:17:56 UTC
Created attachment 480814 [details]
backtrace
Comment 3 Mike Gilbert gentoo-dev 2017-07-05 02:36:16 UTC
Created attachment 480816 [details]
reduced testcase

A previous test case in test-fs-util creates a temp directory, chdirs into it, and then removes it.

A later test case then calls opendir(".") from a directory that no longer exists.

Attached is a small test program to reproduce this scenario.
Comment 4 Mike Gilbert gentoo-dev 2017-07-05 02:41:16 UTC

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