Leaks loop mounts on error

Bug #814256 reported by James Westby
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
Undecided
Guilherme Salgado

Bug Description

In bug 813296 Dave reported that linaro-media-create was leaking loop mounts on error. We shouldn't do that.

Thanks,

James

Related branches

Changed in linaro-image-tools:
assignee: nobody → Guilherme Salgado (salgado)
status: New → In Progress
Changed in linaro-image-tools:
status: In Progress → Fix Committed
Revision history for this message
Paul Larson (pwlars) wrote :

Not sure if you want to track this here, or treat it as a new problem, but I tried todays image/hwpack (20110723) with the latest linaro-media-create and got it to leak loopback devs again. Here's the traceback:

Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 26 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
`/tmp/tmpLRavw0/binary/usr/lib/u-boot/omap4_panda/u-boot.bin' -> `/tmp/tmpLRavw0/boot-disc/u-boot.bin'
Traceback (most recent call last):
  File "/home/plars/work/linaro/linaro-image-tools/linaro-media-create", line 161, in <module>
    args.is_live, args.is_lowmem, args.consoles)
  File "/home/plars/work/linaro/linaro-image-tools/linaro_image_tools/media_create/boards.py", line 483, in populate_boot
    rootfs_uuid, boot_disk, boot_device_or_file)
  File "/home/plars/work/linaro/linaro-image-tools/linaro_image_tools/media_create/boards.py", line 570, in make_boot_files
    cls.set_appropriate_serial_tty(chroot_dir)
  File "/home/plars/work/linaro/linaro-image-tools/linaro_image_tools/media_create/boards.py", line 560, in set_appropriate_serial_tty
    minor_version = re.match('.*2\.6\.([0-9]{2}).*', basename).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
loop: can't delete device /dev/loop0: Device or resource busy
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/plars/work/linaro/linaro-image-tools/linaro_image_tools/media_create/partitions.py", line 234, in undo
    cmd_runner.run(['losetup', '-d', device], as_root=True).wait()
  File "/home/plars/work/linaro/linaro-image-tools/linaro_image_tools/cmd_runner.py", line 100, in wait
    raise SubcommandNonZeroReturnValue(self._my_args, returncode)
SubcommandNonZeroReturnValue: Sub process "['losetup', '-d', '/dev/loop0']" returned a non-zero value: 1
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/home/plars/work/linaro/linaro-image-tools/linaro_image_tools/media_create/partitions.py", line 234, in undo
    cmd_runner.run(['losetup', '-d', device], as_root=True).wait()
  File "/home/plars/work/linaro/linaro-image-tools/linaro_image_tools/cmd_runner.py", line 100, in wait
    raise SubcommandNonZeroReturnValue(self._my_args, returncode)
linaro_image_tools.cmd_runner.SubcommandNonZeroReturnValue: Sub process "['losetup', '-d', '/dev/loop0']" returned a non-zero value: 1

Revision history for this message
Guilherme Salgado (salgado) wrote : Re: [Bug 814256] Re: Leaks loop mounts on error

Although the symptom is the same, the root cause is a different one, so
I've filed bug 815885 for that.

Changed in linaro-image-tools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.