Hi Ritesh, On Fri, Apr 21, 2017 at 6:58 PM, Ritesh Raj Sarraf <r...@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