[Pkg-uml-pkgs] Bug#410154: checking /dev/shm inside a chroot

bdb at forbidden.co.uk bdb at forbidden.co.uk
Thu Feb 8 17:09:57 CET 2007


Actually, theres already code in uml thats trying to do this. It works
by parsing /proc/mounts, which is rather misleading inside a chroot?  This
could arguably be called a kernel bug with chroot....

So it breaks precsisely if /dev/shm is mounted outside the chroot, and not mounted inside.

Its not obvious the kernel really provides a better way.

Perhaps statvfs on /dev and /dev/shm and checking if the fsid is different???
(Tries to run tests...)

But wait a minute.... I had the outside's /dev bind-mounted inside the chroot.
That was already a tmpfs, belonging to udev.

Whats the difference between the udev tmpfs and the separate one normally on
/dev/shm?

....

Aha!! Its the free space setting. The udev tmpfs is mounted with a very small
maximum size. That explains how uml was able to run for a short while
before crashing.

So perhaps the /dev/shm check should actually be one that checks the free space.

Ok, I guess the bug should be that one doesn't get a good warning message
when a mmap fails because of size limits on /dev/shm.

-- 
Brian_Brunswick__bdb at forbidden.co.uk__Video_Software_Architect____Disclaimer




More information about the Pkg-uml-pkgs mailing list