[Lxc-users] Problems on Ubuntu 11.04 (strace included)

adeadhat adeadhat at hotmail.com
Wed Jul 13 20:25:03 UTC 2011


On 07/13/2011 03:18 PM, adeadhat wrote:
> My host system is Ubuntu 11.04
>
> root at ubuntu1:~# lxc-monitor -n deb1
> 'deb1' changed state to [STARTING]
> 'deb1' changed state to [RUNNING]
>
> root at ubuntu1:~# lxc-console -n deb1
>
> Type<Ctrl+a q>  to exit the console
>
>
>
> loginsdfsdfsdf^C^C^C
>
>
> ^ Here the virtual console is unresponsive. Here is the strace output
> from my lx-console session:
>
> setsockopt(15, SOL_SOCKET, SO_PASSCRED, [1], 4) = 0
> epoll_ctl(13, EPOLL_CTL_ADD, 15, {EPOLLIN, {u32=139381800,
> u64=139381800}}) = 0
> epoll_wait(13, {{EPOLLIN, {u32=139381800, u64=139381800}}}, 10, -1) = 1
> recvmsg(15, {msg_name(0)=NULL, msg_iov(1)=[{"\0\0\0\0\377\377\377\377",
> 8}], msg_controllen=24, {cmsg_len=24, cmsg_level=SOL_SOCKET,
> cmsg_type=SCM_CREDENTIALS{pid=30535, uid=0, gid=0}}, msg_flags=0}, 0) = 8
> sendmsg(15, {msg_name(0)=NULL, msg_iov(1)=[{"\1\0\0\0", 4}],
> msg_controllen=16, {cmsg_len=16, cmsg_level=SOL_SOCKET,
> cmsg_type=SCM_RIGHTS, {4}}, msg_flags=0}, 0) = 4
> epoll_wait(13,
>
>
> When I lxc-console strace shows the process is opening a socket.
>
> recvmsg(15, {msg_name(0)=NULL, msg_iov(1)=[{"\0\0\0\0\377\377\377\377",
> 8}], msg_controllen=24, {cmsg_len=24, cmsg_level=SOL_SOCKET,
> cmsg_type=SCM_CREDENTIALS{pid=30645, uid=0, gid=0}}, msg_flags=0}, 0) = 8
> sendmsg(15, {msg_name(0)=NULL, msg_iov(1)=[{"\1\0\0\0", 4}],
> msg_controllen=16, {cmsg_len=16, cmsg_level=SOL_SOCKET,
> cmsg_type=SCM_RIGHTS, {4}}, msg_flags=0}, 0) = 4
> epoll_wait(13, {{EPOLLIN|EPOLLHUP, {u32=139381800,
> u64=13222343338143697960}}}, 10, -1) = 1
> recvmsg(15, {msg_name(0)=NULL, msg_iov(1)=[{"\0\0\0\0\377\377\377\377",
> 8}], msg_controllen=24, {cmsg_len=24, cmsg_level=SOL_SOCKET,
> cmsg_type=SCM_CREDENTIALS{pid=0, uid=0, gid=0}}, msg_flags=0}, 0) = 0
> epoll_ctl(13, EPOLL_CTL_DEL, 15, NULL)  = 0
>
> However any data I type and enter in, the process does nothing. Upon
> issuing a CtrlA+q strace shoes the process performs a close():
>
> epoll_ctl(13, EPOLL_CTL_DEL, 15, NULL)  = 0
> close(15)                               = 0
>
> So it looks like the problem is a strange one. Here is some helpful
> information.
>
> root at ubuntu1:~# cat /etc/fstab | grep -i cgroup
> cgroup  /dev/cgroup  cgroup  cpuacct,memory,devices,cpu,freezer,blkio  0  0
>
> I'm using the lxc-debian scripts contained here:
> git://git.nigel.mcnie.name/git/lxc-debian.git
>
> Overall just odd behavior - it also aborts startup if lxc-monitor isn't
> running.
>
>
>
> ------------------------------------------------------------------------------
> AppSumo Presents a FREE Video for the SourceForge Community by Eric
> Ries, the creator of the Lean Startup Methodology on "Lean Startup
> Secrets Revealed." This video shows you how to validate your ideas,
> optimize your ideas and identify your business strategy.
> http://p.sf.net/sfu/appsumosfdev2dev
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users
>
>

Just as a followup here is the config files for the container:

config:
lxc.utsname = deb1
lxc.tty = 4
lxc.pts = 1024
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0
lxc.network.name = eth0
lxc.network.mtu = 1500
lxc.mount = fstab
lxc.cgroup.devices.deny = a
# /dev/null and zero
lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm
# consoles
lxc.cgroup.devices.allow = c 5:1 rwm
lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 4:0 rwm
lxc.cgroup.devices.allow = c 4:1 rwm
# /dev/{,u}random
lxc.cgroup.devices.allow = c 1:9 rwm
lxc.cgroup.devices.allow = c 1:8 rwm
lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 5:2 rwm
# rtc
lxc.cgroup.devices.allow = c 254:0 rwm

A log from startup:

root at ubuntu1:/var/lib/lxc/deb1# cat damn.log
       lxc-start 1310587249.574 ERROR    lxc_cgroup - Device or resource 
busy - failed to remove previous cgroup '/dev/cgroup/deb1'
       lxc-start 1310587249.661 ERROR    lxc_start - failed to spawn 'deb1'
       lxc-start 1310587249.662 ERROR    lxc_cgroup - Device or resource 
busy - failed to remove cgroup '/dev/cgroup/deb1'







More information about the lxc-users mailing list