Created attachment 387950 [details] output of # strace systemd-nspawn -D /var/shadow/lighthouse --bind=/usr/portage Since upgrading from systemd-216-r1, systemd-nspawn with the --bind argument no longer works. It reports that the container exited: # systemd-nspawn -D /var/shadow/lighthouse --bind=/usr/portage Spawning container lighthouse on /var/shadow/lighthouse. Press ^] three times within 1s to kill container. Container lighthouse failed with error code 1. It works fine, however when using systemd-216-r1. The kernel running is 3.17.1-gentoo-r1 I've created an strace (attached). $ emerge --info sys-apps/systemd Portage 2.2.14 (python 2.7.8-final-0, default/linux/amd64/13.0, gcc-4.8.3, glibc-2.19-r1, 3.17.1-gentoo-r1 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-3.17.1-gentoo-r1-x86_64-Intel-R-_Xeon-R-_CPU_E3-1225_V2_@_3.20GHz-with-gentoo-2.2 KiB Mem: 3856716 total, 829512 free KiB Swap: 4192928 total, 4192928 free Timestamp of tree: Sat, 01 Nov 2014 10:00:01 +0000 ld GNU ld (GNU Binutils) 2.24 app-shells/bash: 4.3_p30 dev-lang/perl: 5.20.1-r2 dev-lang/python: 2.7.8, 3.4.2 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.13.2 sys-apps/sandbox: 2.6-r1 sys-devel/binutils: 2.24-r3 sys-devel/gcc: 4.8.3 sys-devel/gcc-config: 1.8 sys-devel/libtool: 2.4.3-r1 sys-devel/make: 4.1-r1 sys-kernel/linux-headers: 3.17-r1 (virtual/os-headers) sys-libs/glibc: 2.19-r1 Repositories: gentoo ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=core2 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=core2 -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--jobs --autounmask=n --usepkg --binpkg-respect-use=y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news noinfo notitles parallel-fetch protect-owned sandbox sfperms skiprocheck 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="/var/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" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://localhost/portage" USE="amd64 mmx mmxext pam sse sse2 ssse3 systemd unicode" ABI_X86="64" CURL_SSL="openssl" DRACUT_MODULES="btrfs" ELIBC="glibc" GRUB_PLATFORMS="pc" KERNEL="linux" LINGUAS="en ja" NGINX_MODULES_HTTP="auth_basic autoindex fancyindex gzip headers_more proxy rewrite sub upload uwsgi" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" USERLAND="GNU" USE_PYTHON="2.7" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= sys-apps/systemd-217 was built with the following: USE="acl gudev kmod pam -apparmor -audit -cryptsetup -curl -doc -elfutils -gcrypt -http -idn -introspection (-kdbus) -lz4 -lzma -policykit -python -qrcode -seccomp (-selinux) -ssl -terminal -test -vanilla" ABI_X86="64 -32 -x32" PYTHON_SINGLE_TARGET="python2_7 -python3_2 -python3_3 -python3_4" PYTHON_TARGETS="python2_7 -python3_2 -python3_3 -python3_4"
Maybe related with: http://cgit.freedesktop.org/systemd/systemd/commit/?id=1ab19cb167b32967556eefd8f6d3df0e3de7d67d
(In reply to Pacho Ramos from comment #1) > Maybe related with: > http://cgit.freedesktop.org/systemd/systemd/commit/ > ?id=1ab19cb167b32967556eefd8f6d3df0e3de7d67d I believe so. When I remove the target directory, /var/shadow/lighthouse/usr/portage in the above example, then the command succeeds.
Did you try if that patches solves the issue then? ;)
(In reply to Pacho Ramos from comment #3) > Did you try if that patches solves the issue then? ;) I have, and it does. Thanks.
I can also confirm the bug and that the referenced patch resolves it. Seems like a good one to backport.
+*systemd-217-r2 (05 Nov 2014) + + 05 Nov 2014; Mike Gilbert <floppym@gentoo.org> +systemd-217-r2.ebuild: + Backport several patches. Resolves bugs 527832, 527894.
hit the same issue, but even with 217-r2 systemd-nspawn behaves a bit weird for me. I don't have much experience with containers ... maybe I make some mistake. I have the impression that sometimes it works and sometimes not! # /usr/bin/systemd-nspawn -D /mnt/root_rasa –-bind=/usr/portage Spawning container root_rasa on /mnt/root_rasa. Press ^] three times within 1s to kill container. execv() failed: No such file or directory Container root_rasa failed with error code 1. # /usr/bin/systemd-nspawn -D /mnt/root_rasa Spawning container root_rasa on /mnt/root_rasa. Press ^] three times within 1s to kill container. root_rasa ~ # - Pls advise how to share a strace with you. I rebuild systemd and reboot for more tests.
(In reply to Stefan G. Weichinger from comment #7) > I have the impression that sometimes it works and sometimes not! After rebooting it works ... hmmm. Gotta re-test some times now.
(In reply to Stefan G. Weichinger from comment #8) > (In reply to Stefan G. Weichinger from comment #7) > > > I have the impression that sometimes it works and sometimes not! > > After rebooting it works ... hmmm. Gotta re-test some times now. # /usr/bin/systemd-nspawn –quiet –keep-unit –b -D /mnt/root_rasa –-bind=/usr/portage Directory /root lacks the binary to execute or doesn't look like a binary tree. Refusing. It seems not to use the given directory with "-D" ... And even when I cd there: # cd /mnt/root_rasa/ # /usr/bin/systemd-nspawn –quiet –keep-unit –b -D /mnt/root_rasa –-bind=/usr/portage Spawning container root_rasa on /mnt/root_rasa. Press ^] three times within 1s to kill container. execv() failed: No such file or directory Container root_rasa failed with error code 1. And without --bind (so maybe a different bug!): # /usr/bin/systemd-nspawn –quiet –keep-unit –b -D /mnt/root_rasa Spawning container root_rasa on /mnt/root_rasa. Press ^] three times within 1s to kill container. execv() failed: No such file or directory Container root_rasa failed with error code 1. pls advise, thanks
(In reply to Stefan G. Weichinger from comment #9) > (In reply to Stefan G. Weichinger from comment #8) > > (In reply to Stefan G. Weichinger from comment #7) > > > > > I have the impression that sometimes it works and sometimes not! > > > > After rebooting it works ... hmmm. Gotta re-test some times now. > > # /usr/bin/systemd-nspawn –quiet –keep-unit –b -D /mnt/root_rasa > –-bind=/usr/portage > Directory /root lacks the binary to execute or doesn't look like a binary > tree. Refusing. > > It seems not to use the given directory with "-D" ... > > And even when I cd there: > > # cd /mnt/root_rasa/ > > # /usr/bin/systemd-nspawn –quiet –keep-unit –b -D /mnt/root_rasa > –-bind=/usr/portage > Spawning container root_rasa on /mnt/root_rasa. > Press ^] three times within 1s to kill container. > execv() failed: No such file or directory > > Container root_rasa failed with error code 1. > > And without --bind (so maybe a different bug!): > > # /usr/bin/systemd-nspawn –quiet –keep-unit –b -D /mnt/root_rasa > Spawning container root_rasa on /mnt/root_rasa. > Press ^] three times within 1s to kill container. > execv() failed: No such file or directory > > Container root_rasa failed with error code 1. > > pls advise, thanks This might be a different bug. The issue that I had seems to be fixed with the patch/-r2.
My issues seem to come from a corrupt btrfs .. currently trying to fix things.
*** Bug 528912 has been marked as a duplicate of this bug. ***