Bug 247324 - livecd-creator runs out of loopback devices
Summary: livecd-creator runs out of loopback devices
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: livecd-tools
Version: 7
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Zeuthen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-07-06 23:04 UTC by Robin Norwood
Modified: 2013-03-06 03:51 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-09-13 15:12:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Robin Norwood 2007-07-06 23:04:29 UTC
Description of problem:

When running livecd-creator multiple times, it can eventually run out of loop
devices.


Version-Release number of selected component (if applicable): livecd-tools-009-1.fc7


How reproducible:

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?
  
Actual results:

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
for '/var/tmp/livecd-creator-BOnxs8/data/os.img'





[root@kandor ~]# mount

[...normal stuff...]

/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
nd)
/selinux on /var/tmp/livecd-creator-zEbpYi/install_root/selinux type none (rw,bi
nd)
/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...]

Expected results:

Warm and toasty livecd image.  livecd-creator should free the loopback device
when I cancel.


Additional info:

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.

Comment 1 Robin Norwood 2007-07-06 23:08:04 UTC
Almost forgot: I also had to run losetup -d <looback_device> once I'd unmounted
everything.

Comment 2 Jeremy Katz 2007-07-07 02:43:43 UTC
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
be worthwhile.   

Comment 3 Jeremy Katz 2007-09-13 15:12:02 UTC
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.

Comment 4 Fabian A. Scherschel 2010-08-02 08:55:43 UTC
This is still happening as of livecd-creator in F13.

Comment 5 Renich Bon Ciric 2011-05-11 18:33:30 UTC
happened in F14 too. loop7 seems to be busy.

Just create and recreate a livecd a few times and you'll see ;)


Note You need to log in before you can comment on or make changes to this bug.