[lxc-devel] lxc-start hangs when starting a new container

Daniel Lezcano dlezcano at fr.ibm.com
Wed Jul 1 12:59:51 UTC 2009


Matty wrote:
> On Wed, Jul 1, 2009 at 4:12 AM, Daniel Lezcano<dlezcano at fr.ibm.com> wrote:
>> Matty wrote:
>>> I have an lxc container that keeps hanging when I run 'lxc-start -n
>>> <GUEST NAME>'. When I strace lxc-start, I see the following:
>>>
>>> $ strace lxc-start -n test
>>>   ..............
>>> open("/usr/local/var/lib/lxc/test/state", O_WRONLY) = 13
>>> flock(13, LOCK_EX)                      = 0
>>> ftruncate(13, 0)                        = 0
>>> write(13, "RUNNING"..., 7)              = 7
>>> close(13)                               = 0
>>> socket(PF_FILE, SOCK_DGRAM, 0)          = 13
>>> sendto(13,
>>> "\0\0\0\0test\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
>>> 4104, 0, {sa_family=AF_FILE, path=@"lxc-monitor"...}, 110) = -1
>>> ECONNREFUSED (Connection refused)
>>> close(13)                               = 0
>>> close(13)                               = -1 EBADF (Bad file descriptor)
>>> close(14)                               = 0
>>> socket(PF_FILE, SOCK_STREAM, 0)         = 13
>>> bind(13, {sa_family=AF_FILE, path=@"test"...}, 110) = 0
>>> listen(13, 100)                         = 0
>>> fcntl(13, F_SETFD, FD_CLOEXEC)          = 0
>>> epoll_create(1)                         = 14
>>> epoll_ctl(14, EPOLL_CTL_ADD, 12, {EPOLLIN, {u32=17707440, u64=17707440}})
>>> = 0
>>> epoll_ctl(14, EPOLL_CTL_ADD, 13, {EPOLLIN, {u32=17707504, u64=17707504}})
>>> = 0
>>>
>>> I starting the container with 2.6.[29-31pre] kernels and with the
>>> latest lxc code, and they all appear to exhibit this behavior. Has
>>> anyone seen this before? Any idea what the lxc-monitor socket is used
>>> for?
> 
>> can you give more information about the container itself ?
> 
> Sure thing. This is a Fedora 11 container I created with lxc-fedora.
> Are there specific details you're after? If so, I will be glad to send
> them to you.
> 
>> What is the configuration ?
> 
> I used the defaults provided by lxc-fedora, though I disabled udev
> (commented out the udev line in rc.sysinit) to allow the container to
> boot.

Did you added the tty to the rootfs ?

chroot rootfs.test1 /bin/bash
cd /dev
MAKEDEV tty

After doing that, you can start the container again and check if you are 
able to log to the container via lxc-console -n test1 command.

By the way, lxc-fedora script is not finished and not working well :(

>> Is it an application or a distro you are trying to launch ?
> 
> This is a distribution.
> 
>> Can you strace with the "-f" option, please ?
> 
> Sure thing. I attached the full strace output to this e-mail as strace.txt.gz.

Thanks.
   -- Daniel





More information about the lxc-devel mailing list