Public bug reported:

Version: 0.29-0ubuntu3 (from ppa:snappy-dev/tools, on a trusty host)

I noticed that in some automated tests I'm running, I kept running out of 
loopback devices, but if I ran ubuntu-device-flash by hand, they were cleaned 
up just fine.  What I found was that this happens if the path where the image 
is being built is long (example: 
/tmp/run/1ac55ddc-772b-4db5-9504-216d89ca7890_2015-09-10T17\:20\:13.136147/snappy.img).
When I would build an image in a long path like that, then check /dev/mapper, I 
would see something like:
$ ls /dev/mapper/ -l
total 0
crw------- 1 root root  10, 236 Sep 10 17:21 control
brw-rw---- 1 root disk 252,   0 Sep 10 16:59 loop0p1
brw-rw---- 1 root disk 252,   1 Sep 10 16:59 loop0p2
brw-rw---- 1 root disk 252,   2 Sep 10 16:59 loop0p3
brw-rw---- 1 root disk 252,   3 Sep 10 16:59 loop0p4
brw-rw---- 1 root disk 252,   4 Sep 10 16:59 loop0p5
brw-rw---- 1 root disk 252,   5 Sep 10 16:59 loop1p1
brw-rw---- 1 root disk 252,   6 Sep 10 16:59 loop1p2
brw-rw---- 1 root disk 252,   7 Sep 10 16:59 loop1p3
brw-rw---- 1 root disk 252,   8 Sep 10 16:59 loop1p4
brw-rw---- 1 root disk 252,   9 Sep 10 16:59 loop1p5

I could remove them by doing:
sudo kpartx -d /dev/loop0
sudo kpartx -d /dev/loop1
sudo losetup -d /dev/loop0
sudo losetup -d /dev/loop1

So I'm not sure why ubuntu-device-flash was unable to remove them, but I
found that if I run it with the image built in a shorter path,
everything is cleaned up properly.

** Affects: goget-ubuntu-touch (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1494419

Title:
  ubuntu-device-flash can leak loopback devices if image is in a long
  path

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/goget-ubuntu-touch/+bug/1494419/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to