/proc/mounts missing on an XO-4 when using mock
James Cameron
quozl at laptop.org
Fri Feb 21 23:15:55 EST 2014
G'day,
I'm trying to use mock [1] on an XO-4 with OLPC OS 13.2.0-13, which is
a customised Fedora 18.
Mock fails with an error; it cannot find /proc/mounts, presumably in
the chroot it has created. Using os.system('bash)' on the line above
the failure [2], I've proved that /proc is present but contains nothing,
and can't be mounted (-1, EINVAL).
$ mock -r fedora-18-arm --init
INFO: mock.py version 1.1.32 starting...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
Start: lock buildroot
Start: clean chroot
ERROR: [Errno 2] No such file or directory: '/proc/mounts'
Traceback (most recent call last):
File "/usr/sbin/mock", line 561, in <module>
def do_buildsrpm(config_opts, chroot, options, args):
File "/usr/sbin/mock", line 805, in main
chroot.clean()
File "<peak.util.decorators.rewrap wrapping mockbuild.backend.clean at 0x002EA7F0>", line 3, in clean
def clean(self): return __decorated(self)
File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 70, in trace
result = func(*args, **kw)
File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 197, in clean
self._umountall(nowarn=True)
File "<peak.util.decorators.rewrap wrapping mockbuild.backend._umountall at 0x002E5A30>", line 3, in _umountall
def _umountall(self, nowarn): return __decorated(self, nowarn)
File "/usr/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 70, in trace
result = func(*args, **kw)
File "/usr/lib/python2.7/site-packages/mockbuild/backend.py", line 911, in _umountall
mountpoints = open("/proc/mounts").read().strip().split("\n")
IOError: [Errno 2] No such file or directory: '/proc/mounts'
The reproducer is:
a. fs-update 32013o4.zd
b. yum install mock
c. export PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
d. mock -r fedora-18-arm --init
I have done a few things to try to fix the problem, but there has been
no change:
- reproduce on other XO-4s,
- try a fresh install,
- try a fresh install with "yum update",
- try other /etc/mock configurations,
- used olpc-os-builder to rebuild the filesystem without /versions
support, and reinstall,
- reduce the initrd to remove OLPC modules and identify the root
filesystem using kernel command line,
- removed /var/tmp and /var/log from /etc/fstab,
- set TEMPORARY_STATE=no in /etc/sysconfig/readonly-root,
- use a setuid strace to look for interesting failures; none found,
- verified the failure of the unshare syscall is irrelevant (it occurs
on a Fedora ARM system that is not based on OLPC OS),
Curiously, in the debugging shell before the error, the filesystem
does not appear to be particularly pristine, it has OLPC components:
# ls
bin bootpart etc lib mnt proc run sbin srv tmp var
boot dev home media opt root runin security sys usr versions
#
But yet the process does have a file descriptor 3 for
/var/cache/mock/f18-kbuild/yum_cache/yumcache.lock
References:
1. https://fedoraproject.org/wiki/Projects/Mock
2. http://dev.laptop.org/~quozl/z/1WH3vi.txt (a shell before failure)
3. http://dev.laptop.org/~quozl/z/1WH3xZ.txt (a run with -v)
--
James Cameron
http://quozl.linux.org.au/
More information about the Devel
mailing list