[Bug 1200318] Re: lxc-create does not clean up lock file on failure

Robie Basak 1200318 at bugs.launchpad.net
Mon Jul 15 15:17:05 UTC 2013


$ sudo lsof /var/lock/subsys/lxc-ubuntu 
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME
udevd   6564 root  200w   REG   0,17        0 598420 /run/lock/subsys/lxc-ubuntu

$ sudo LANG=C strace -fo /tmp/strace.log lxc-create -n saucy -t ubuntu
-- -r saucy -d

lxc-create: No config file specified, using the default config /etc/lxc/default.conf
+ '[' -n '' ']'
+ '[' armhf == i686 ']'
+ '[' armhf = i386 -a armhf = amd64 ']'
+ '[' armhf = armhf -o armhf = armel ']'
+ '[' armhf '!=' armhf -a armhf '!=' armel ']'
+ '[' armhf = powerpc -a armhf '!=' powerpc ']'
+ which debootstrap
+ '[' -z /var/lib/lxc/saucy ']'
++ id -u
+ '[' 0 '!=' 0 ']'
+ config=/var/lib/lxc/saucy/config
+ grep -q '^lxc.rootfs' /var/lib/lxc/saucy/config
+ rootfs=/var/lib/lxc/saucy/rootfs
+ install_ubuntu /var/lib/lxc/saucy/rootfs saucy 0
+ rootfs=/var/lib/lxc/saucy/rootfs
+ release=saucy
+ flushcache=0
+ cache=/var/cache/lxc/saucy
+ mkdir -p /var/lock/subsys/
+ flock -x 200
*** [hang] ***
^Clxc-create: aborted

strace.log attached.

I'm not really clear what's going on here. If I then run, outside of
lxc-create (but after it has failed once):

$ sudo lsof /var/lock/subsys/lxc-ubuntu 
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME
udevd   6564 root  200w   REG   0,17        0 598420 /run/lock/subsys/lxc-ubuntu
$ sudo flock -x /var/lock/subsys/lxc-ubuntu true
*** [hang] ***

Could this be a kernel bug? This is on linux-image-3.8.0-23-generic
3.8.0-23.34.

** Attachment added: "strace.log"
   https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1200318/+attachment/3737614/+files/strace.log

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/1200318

Title:
  lxc-create does not clean up lock file on failure

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1200318/+subscriptions



More information about the Ubuntu-server-bugs mailing list