<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [systemd-nspawn] out of memory and su system errors"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=76412">76412</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[systemd-nspawn] out of memory and su system errors
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ullysses.a.eoff@intel.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=96119" name="attach_96119" title="strace for first issue">attachment 96119</a> <a href="attachment.cgi?id=96119&action=edit" title="strace for first issue">[details]</a></span>
strace for first issue

I updated to systemd 211 (which should have the fix for <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - systemd-nspawn: run command as user in i686 container on x86_64 OS fails"
   href="show_bug.cgi?id=75733">bug 75733</a>, if I'm not
mistaken) from rawhide on my base Fedora 20 x86_64 OS, then rebooted.  I am now
having a few new issues when trying to run commands as a user in a 32-bit
(i686) container on an x86_64 host OS.  These issues do not happen if the
container is a 64-bit (x86_64) container.

#### Issue 1 ####

Running systemd-nspawn with -u <user> option to execute a command when <user>
is part of the "wheel" group in the container.

$ uname -r
  3.13.6-200.fc20.x86_64
$ su -
$ mkdir /srv/mycontainer-i686
$ mkdir -p /srv/mycontainer-i686/etc/yum/vars
$ echo i386 > /srv/mycontainer-i686/etc/yum/vars/basearch
$ echo i686 > /srv/mycontainer-i686/etc/yum/vars/arch
$ yum -y --releasever=20 --nogpg --installroot=/srv/mycontainer-i686
--disablerepo='*' --enablerepo=fedora install systemd passwd yum fedora-release
vim-minimal sudo
$ systemd-nspawn -D /srv/mycontainer-i686 adduser jail
$ systemd-nspawn -D /srv/mycontainer-i686 passwd -d jail
$ systemd-nspawn -u jail -D /srv/mycontainer-i686 whoami
  Spawning container mycontainer-i686 on /srv/mycontainer-i686. Press ^] three
times within 1s to abort execution.
  jail
$ systemd-nspawn -D /srv/mycontainer-i686 usermod -a -G wheel jail
$ systemd-nspawn -u jail -D /srv/mycontainer-i686 whoami
  Spawning container mycontainer-i686 on /srv/mycontainer-i686. Press ^] three
times within 1s to abort execution.
  Out of memory.

  Container mycontainer-i686 failed with error code 1.

#### Issue 2 ####

Running systemd-nspawn as root to execute an "su <user> -c <command>" command.

$ uname -r
  3.13.6-200.fc20.x86_64
$ su -
$ mkdir /srv/mycontainer-i686
$ mkdir -p /srv/mycontainer-i686/etc/yum/vars
$ echo i386 > /srv/mycontainer-i686/etc/yum/vars/basearch
$ echo i686 > /srv/mycontainer-i686/etc/yum/vars/arch
$ yum -y --releasever=20 --nogpg --installroot=/srv/mycontainer-i686
--disablerepo='*' --enablerepo=fedora install systemd passwd yum fedora-release
vim-minimal sudo
$ systemd-nspawn -D /srv/mycontainer-i686 adduser jail
$ systemd-nspawn -D /srv/mycontainer-i686 passwd -d jail
$ systemd-nspawn -D /srv/mycontainer-i686 su jail -c whoami
  Spawning container mycontainer-i686 on /srv/mycontainer-i686. Press ^] three
times within 1s to abort execution.
  su: System error

  Container mycontainer-i686 failed with error code 1.


I've attached straces for both of the issues if that helps.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>