Ephemeral containers have "/rootfs" prefix in /proc/self/maps entries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Invalid
|
Medium
|
Bryan Wu | ||
Precise |
Invalid
|
Undecided
|
Unassigned | ||
Quantal |
Invalid
|
Medium
|
Bryan Wu | ||
lxc (Ubuntu) |
Fix Released
|
High
|
Serge Hallyn | ||
Precise |
Fix Released
|
High
|
Serge Hallyn | ||
Quantal |
Fix Released
|
High
|
Serge Hallyn |
Bug Description
=======
SRU Justification (for lxc workaround)
1. Impact: /proc/self/maps and /proc/self/fd entries in ephemeral containers
are prefixed with '/rootfs'. Software which uses these paths to find
plugins or other files will break.
2. Development fix (workaround): The prepended paths lead to the root dentry
of the overlayfs mount. So lxc-start-ephemeral is changed to make the
container rootfs / the root of the overlay mount.
3. Stable fix: same as development fix.
4. Test case:
sudo lxc-create -t ubuntu -n q1
sudo lxc-start-ephemeral -o q1
In another terminal, follow the instructions to open a console to the
ephemeral container. Therein log in as ubuntu/ubuntu, and do:
cat /proc/self/maps
ls -l /proc/self/fd/
and check whether entries are prefixed with '/rootfs'
5. Regression potential: Customized containers (especially which have custom
made directories under /var/lib/
a problem we could place all of /var/lib/
another empty tmpfs, however that is not free.
=======
Ephemeral containers (but not non-ephemeral ones) have all of their /proc/*/maps entries prefixed with "/rootfs". One problem this causes is that graphviz uses /proc/self/maps to locate its plugins. That means that some of the plugins can not be loaded.
To reproduce the problem with dot, run this command:
dot -Tcmapx < /dev/null
No output is expected, however because of the bug this output is produced:
Format: "cmapx" not recognized. Use one of: dia hpgl mif mp pcl pic vtx
A workaround for the problem with graphviz is to make the plugins available at the path it is expecting:
mkdir -p /rootfs/usr/lib
ln -s /usr/lib/graphviz /rootfs/
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.95-0ubuntu1
Architecture: i386
DistroRelease: Ubuntu 12.04
HibernationDevice: RESUME=
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
MachineType: LENOVO 4313CTO
Package: lxc
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
RfKill:
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
StagingDrivers: mei
Tags: precise staging
Uname: Linux 3.2.0-20-
UpgradeStatus: Upgraded to precise on 2012-01-24 (63 days ago)
UserGroups: adm admin cdrom dialout libvirtd lpadmin plugdev sambashare
dmi.bios.date: 10/26/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 6MET81WW (1.41 )
dmi.board.name: 4313CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.name: 4313CTO
dmi.product.
dmi.sys.vendor: LENOVO
Changed in lxc (Ubuntu): | |
importance: | Low → High |
Changed in linux (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in linux (Ubuntu): | |
assignee: | nobody → Bryan Wu (cooloney) |
description: | updated |
Changed in lxc (Ubuntu Precise): | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Serge Hallyn (serge-hallyn) |
Changed in lxc (Ubuntu Precise): | |
status: | Triaged → In Progress |
Thanks. That's curious. I'm marking low priority as it has a workaround, please raise if you feel appropriate.