An early boot component fails under lxc (linux containers)

Bug #461438 reported by Michael B. Trausch on 2009-10-26
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
mountall (Ubuntu)
Undecided
Unassigned
upstart (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: mountall

When running latest Karmic under lxc (linux containers), the startup yields:

mbt@saffron:/srv/vm/trausch.us/spicerack.trausch.us$ sudo lxc-start --name spicerack.trausch.us
mount: mount point /dev/shm does not exist
mountall: mount /dev/shm [19] terminated with status 32
mountall: Filesystem could not be mounted: /dev/shm
mount: mount point /dev/shm does not exist
mountall: mount /dev/shm [23] terminated with status 32
mountall: Filesystem could not be mounted: /dev/shm

At this point, the container hangs and proceeds no further. This did not happen with Karmic from ~70 days ago. This is with mountall 1.0 in Karmic.

Michael B. Trausch (mtrausch) wrote :

To reproduce:

 # Install Ubuntu server, Karmic.
 # Install linux containers (lxc).
 # Debootstrap a new Karmic directory that will be used for the container.
 # When the debootstrap is complete, setup an lxc.conf and create the vm with lxc-create.
 # Start the vm with lxc-start.
 # The VM will never truly start; init is as far as it goes.

I'm trying to capture some debugging data, as this is impacting me and I need it fixed like, well, yesterday ;-). However, I'm having an awfully hard time getting anywhere that makes sense.

Michael B. Trausch (mtrausch) wrote :

This is looking more and more like an upstart failure at early bootup. Will attach an strace that shows where the boot process ends momentarily.

summary: - mountall fails under lxc (linux containers)
+ An early boot component fails under lxc (linux containers)
Michael B. Trausch (mtrausch) wrote :

This is the output from strace for the upstart process which is fork'd/exec'd from lxc. I will attach output from Upstart when run by way of "exec init -v" from a shell whose PID is 1 in a few minutes.

Michael B. Trausch (mtrausch) wrote :

root@saffron:~# lxc-start --name spicerack.trausch.us /bin/bash
root@spicerack:~# exec init -v
Loading configuration from /etc/init.conf
Loading configuration from /etc/init
init: Handling startup event
init: mountall goal changed from stop to start
init: mountall state changed from waiting to starting
init: hostname goal changed from stop to start
init: hostname state changed from waiting to starting
init: Handling starting event
init: hwclock goal changed from stop to start
init: hwclock state changed from waiting to starting
init: Handling starting event
init: hostname state changed from starting to pre-start
init: hostname state changed from pre-start to spawned
init: hostname main process (11)
init: hostname state changed from spawned to post-start
init: hostname state changed from post-start to running
init: Handling starting event
init: hwclock state changed from starting to pre-start
init: hwclock state changed from pre-start to spawned
init: hwclock main process (12)
init: hwclock state changed from spawned to post-start
init: hwclock state changed from post-start to running
init: Handling started event
init: Handling started event
init: hostname main process (11) exited normally
init: hostname goal changed from start to stop
init: hostname state changed from running to stopping
init: Handling stopping event
init: hostname state changed from stopping to killed
init: hostname state changed from killed to post-stop
init: hostname state changed from post-stop to waiting
init: Handling stopped event
init: hwclock main process (12) exited normally
init: hwclock goal changed from start to stop
init: hwclock state changed from running to stopping
init: Handling stopping event
init: hwclock state changed from stopping to killed
init: hwclock state changed from killed to post-stop
init: hwclock state changed from post-stop to waiting
init: Handling stopped event
init: mountall state changed from starting to pre-start
init: mountall state changed from pre-start to spawned
init: mountall main process (13)
init: mountall main process (13) executable changed
init: mountall main process (13) exited normally
init: mountall goal changed from start to stop
init: mountall state changed from spawned to stopping
init: Handling stopping event
init: mountall state changed from stopping to killed
init: mountall state changed from killed to post-stop
init: mountall post-stop process (14)
init: mountall post-stop process (14) exited normally
init: mountall state changed from post-stop to waiting
init: Handling stopped event

This is where upstart stops when booting within LXC on an Ubuntu server, on Karmic.

Michael B. Trausch (mtrausch) wrote :

If it matters, I'm on #upstart on FreeNode if anyone comes across this and wishes to have me try to collect information in some way in near-real-time.

Michael B. Trausch (mtrausch) wrote :

This is the core dump of the upstart process that is failing. The PID of the core file (27138) is the PID of upstart as seen outside the container; within the container, it has PID 1.

Michael B. Trausch (mtrausch) wrote :

root@spicerack:~# exec /sbin/init -v
Loading configuration from /etc/init.conf
Loading configuration from /etc/init
init: Handling startup event
init: mountall goal changed from stop to start
init: mountall state changed from waiting to starting
init: hostname goal changed from stop to start
init: hostname state changed from waiting to starting
init: Handling starting event
init: hwclock goal changed from stop to start
init: hwclock state changed from waiting to starting
init: Handling starting event
init: hostname state changed from starting to pre-start
init: hostname state changed from pre-start to spawned
init: hostname main process (11)
init: hostname state changed from spawned to post-start
init: hostname state changed from post-start to running
init: Handling starting event
init: hwclock state changed from starting to pre-start
init: hwclock state changed from pre-start to spawned
init: hwclock main process (12)
init: hwclock state changed from spawned to post-start
init: hwclock state changed from post-start to running
init: Handling started event
init: Handling started event
init: hostname main process (11) exited normally
init: hostname goal changed from start to stop
init: hostname state changed from running to stopping
init: Handling stopping event
init: hostname state changed from stopping to killed
init: hostname state changed from killed to post-stop
init: hostname state changed from post-stop to waiting
init: Handling stopped event
init: hwclock main process (12) exited normally
init: hwclock goal changed from start to stop
init: hwclock state changed from running to stopping
init: Handling stopping event
init: hwclock state changed from stopping to killed
init: hwclock state changed from killed to post-stop
init: hwclock state changed from post-stop to waiting
init: Handling stopped event
init: mountall state changed from starting to pre-start
init: mountall state changed from pre-start to spawned
init: mountall main process (13)
init: mountall main process (13) executable changed
init: Connection from private client
init: mountall main process (13) became new process (14)
init: mountall main process (14) executable changed
init: mountall state changed from spawned to post-start
init: mountall state changed from post-start to running
init: Handling started event
init: Handling mount event
init: Handling mount event
init: Handling mount event
init: Handling mount event
init: Handling mount event

Michael B. Trausch (mtrausch) wrote :

Using the following script seems to make the system work just fine:

Oct 27 13:13:44 <Keybuk> initctl emit virtual-filesystems
Oct 27 13:13:46 <Keybuk> initctl emit local-filesystems
Oct 27 13:13:48 <Keybuk> initctl emit remote-filesystems
Oct 27 13:13:55 <Keybuk> initctl emit filesystem
Oct 27 13:13:56 <Keybuk> exit 0

As I have the container running now, which I need, I'm good. I'm going to create a new container later today to replicate the setup and attempt to continue troubleshooting.

This is caused by the strange way that containers work, they're not really Linux systems - the external template used to make the filesystem should take this into account and replace the appropriate pieces (udev, mountall, etc.)

Changed in upstart (Ubuntu):
status: New → Won't Fix
Changed in mountall (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers