Red Hat Bugzilla – Bug 247324
livecd-creator runs out of loopback devices
Last modified: 2013-03-05 22:51:30 EST
Description of problem:
When running livecd-creator multiple times, it can eventually run out of loop
Version-Release number of selected component (if applicable): livecd-tools-009-1.fc7
Maybe hard. I only ran into this after doing many, many livecd builds on a
system, sometimes more than one at a time, some of which I canceled (ctrl-c)
before they were complete.
Steps to Reproduce:
1. Run lots of livecd builds
2. Cancel some of them
3. Maybe run more than one at a time?
losetup: could not find any free loop device
Error creating Live CD : Failed to loopback mount
'/var/tmp/livecd-creator-BOnxs8/data/os.img' : Failed to allocate loop device
[root@kandor ~]# mount
/dev/loop0 on /var/tmp/livecd-creator-zEbpYi/install_root type ext3 (rw)
/sys on /var/tmp/livecd-creator-zEbpYi/install_root/sys type none (rw,bind)
/proc on /var/tmp/livecd-creator-zEbpYi/install_root/proc type none (rw,bind)
/dev on /var/tmp/livecd-creator-zEbpYi/install_root/dev type none (rw,bind)
/dev/pts on /var/tmp/livecd-creator-zEbpYi/install_root/dev/pts type none (rw,bi
/selinux on /var/tmp/livecd-creator-zEbpYi/install_root/selinux type none (rw,bi
/var/tmp/livecd-creator-zEbpYi/yum-cache on /var/tmp/livecd-creator-zEbpYi/insta
ll_root/var/cache/yum type none (rw,bind)
[...lots more loopback stuff...]
Warm and toasty livecd image. livecd-creator should free the loopback device
when I cancel.
I was able to recover from this by unmounting each of the things mounted under
the loopback device's mount point, then the loopback device in question.
Almost forgot: I also had to run losetup -d <looback_device> once I'd unmounted
Depending on where the ctrl-c gets caught, we may or may not be able to do
anything about it. KeyboardInterrupt handling is .. painful at best especially
when you start throwing in rpm's signal handling just to make things extra special.
At the same time, I've fixed a pile of places where we could end up not
unmounting things in git. So trying to reproduce with the current git tip might
Haven't seen a stale mount in a while. If you reproduce one, please give a good
reproducer and I'll catch it and make sure we clean it up.
This is still happening as of livecd-creator in F13.
happened in F14 too. loop7 seems to be busy.
Just create and recreate a livecd a few times and you'll see ;)