Debian Bug report logs -
#860894
kpartx: kpartx returns error even when loop device is deleted successfully
Reply or subscribe to this bug.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#860894; Package kpartx.
(Fri, 21 Apr 2017 13:03:07 GMT) (full text, mbox, link).
Acknowledgement sent
to Balint Reczey <balint.reczey@canonical.com>:
New Bug report received and forwarded. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>.
(Fri, 21 Apr 2017 13:03:07 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Package: kpartx
Version: 0.6.4-5
Severity: wishlist
Tags: patch
Dear Maintainers,
Sometimes kpartx reports errors during handling partition while at the
end deleting the loop device succeeds:
$ kpartx -v -d binary/boot/disk-uefi.ext4
device-mapper: remove ioctl on loop0p1 failed: Device or resource busy
del devmap : loop0p15
del devmap : loop0p14
loop deleted : /dev/loop0
$
# here we have $? != 0
# (from: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1684090)
Please find the patch attached which ignores earlier errors after loop
deletion is done.
Cheers,
Balint
--
Balint Reczey
Debian & Ubuntu Developer
[make-kpartx-loop-deleted-succeed.patch (text/x-patch, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#860894; Package kpartx.
(Fri, 21 Apr 2017 17:03:05 GMT) (full text, mbox, link).
Acknowledgement sent
to rrs@debian.org:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>.
(Fri, 21 Apr 2017 17:03:05 GMT) (full text, mbox, link).
Message #10 received at 860894@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Control: tag -1 +moreinfo
Hello Balint,
On Fri, 2017-04-21 at 15:00 +0200, Balint Reczey wrote:
> Sometimes kpartx reports errors during handling partition while at the
> end deleting the loop device succeeds:
>
You mention "Sometimes". Is it to assume that the issue is not persistently
reproducible ? What steps to follow if I were to reproduce this locally ?
> $ kpartx -v -d binary/boot/disk-uefi.ext4
> device-mapper: remove ioctl on loop0p1 failed: Device or resource busy
> del devmap : loop0p15
> del devmap : loop0p14
> loop deleted : /dev/loop0
> $
> # here we have $? != 0
> # (from: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1684090)
>
> Please find the patch attached which ignores earlier errors after loop
> deletion is done.
I tried it locally and cannot reproduce it.
rrs@learner:/tmp$ sudo kpartx -av foo.img
add map loop2p1 (254:6): 0 1024000 linear 7:2 2048
add map loop2p2 (254:7): 0 1071104 linear 7:2 1026048
2017-04-21 / 22:25:44 ♒♒♒ ☺
rrs@learner:/tmp$ sudo kpartx -v -d foo.img
del devmap : loop2p2
del devmap : loop2p1
loop deleted : /dev/loop2
2017-04-21 / 22:25:49 ♒♒♒ ☺
And I don't see the behavior wrong in what you shared, where partition 1 failed
to delete.
--
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
[signature.asc (application/pgp-signature, inline)]
Added tag(s) moreinfo.
Request was from Ritesh Raj Sarraf <rrs@debian.org>
to 860894-submit@bugs.debian.org.
(Fri, 21 Apr 2017 17:03:05 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#860894; Package kpartx.
(Fri, 21 Apr 2017 17:12:05 GMT) (full text, mbox, link).
Acknowledgement sent
to Balint Reczey <balint.reczey@canonical.com>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>.
(Fri, 21 Apr 2017 17:12:05 GMT) (full text, mbox, link).
Message #17 received at 860894@bugs.debian.org (full text, mbox, reply):
Hi Ritesh,
On Fri, Apr 21, 2017 at 6:58 PM, Ritesh Raj Sarraf <rrs@debian.org> wrote:
> Control: tag -1 +moreinfo
>
>
> Hello Balint,
>
> On Fri, 2017-04-21 at 15:00 +0200, Balint Reczey wrote:
>> Sometimes kpartx reports errors during handling partition while at the
>> end deleting the loop device succeeds:
>>
>
> You mention "Sometimes". Is it to assume that the issue is not persistently
> reproducible ? What steps to follow if I were to reproduce this locally ?
I could not reproduce it locally, but it keeps appearing on Ubuntu's
autopkg testbeds:
http://autopkgtest.ubuntu.com/packages/livecd-rootfs/zesty/amd64
>
>> $ kpartx -v -d binary/boot/disk-uefi.ext4
>> device-mapper: remove ioctl on loop0p1 failed: Device or resource busy
>> del devmap : loop0p15
>> del devmap : loop0p14
>> loop deleted : /dev/loop0
>> $
>> # here we have $? != 0
>> # (from: https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1684090)
>>
>> Please find the patch attached which ignores earlier errors after loop
>> deletion is done.
>
> I tried it locally and cannot reproduce it.
>
> rrs@learner:/tmp$ sudo kpartx -av foo.img
> add map loop2p1 (254:6): 0 1024000 linear 7:2 2048
> add map loop2p2 (254:7): 0 1071104 linear 7:2 1026048
> 2017-04-21 / 22:25:44 ♒♒♒ ☺
>
> rrs@learner:/tmp$ sudo kpartx -v -d foo.img
> del devmap : loop2p2
> del devmap : loop2p1
> loop deleted : /dev/loop2
> 2017-04-21 / 22:25:49 ♒♒♒ ☺
>
>
> And I don't see the behavior wrong in what you shared, where partition 1 failed
> to delete.
Yes, it is hard to trigger. :-\
Cheers,
Balint
--
Balint Reczey
Debian & Ubuntu Developer
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sun Aug 20 18:48:59 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.