pmbootstrap shutdown confused by deleted /dev/loop3p2 node
Created by: zhuowei
I received this error when running pmbootstrap shutdown
:
(007366) [23:02:19] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/mnt/install
(007366) [23:02:19] (native) % losetup --json --list
{
"loopdevices": [
{"name": "/dev/loop0", "sizelimit": "0", "offset": "0", "autoclear": "0", "ro": "0", "back-file": "/media/zhuowei/redhd/docs/pmbootstrap/chroot_native/home/user/*", "dio": "0"},
{"name": "/dev/loop1", "sizelimit": "0", "offset": "0", "autoclear": "0", "ro": "0", "back-file": "/media/zhuowei/redhd/docs/pmbootstrap/chroot_native/home/user/*", "dio": "0"},
{"name": "/dev/loop2", "sizelimit": "0", "offset": "0", "autoclear": "0", "ro": "0", "back-file": "/media/zhuowei/redhd/docs/pmbootstrap/chroot_native/home/user/*", "dio": "0"},
{"name": "/dev/loop3", "sizelimit": "0", "offset": "0", "autoclear": "0", "ro": "0", "back-file": "/home/user/rootfs/huawei-angler.img", "dio": "0"}
]
}
(007366) [23:02:19] (native) umount /dev/loop3
(007366) [23:02:19] (native) % losetup -d /dev/loop3
(007366) [23:02:19] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/var/cache/distfiles
(007366) [23:02:19] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/var/cache/apk
(007366) [23:02:19] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/sys/devices
(007366) [23:02:19] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/sys/dev
(007366) [23:02:19] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/sys/bus/usb/devices
(007366) [23:02:19] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/proc
(007366) [23:02:19] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/mnt/rootfs_huawei-angler
(007366) [23:02:19] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/home/user/packages/user
(007366) [23:02:19] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/home/user/git
(007366) [23:02:19] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/home/user/.ccache
(007366) [23:02:20] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/home/user/.abuild
(007366) [23:02:20] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/etc/apk/keys
(007366) [23:02:20] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/dev/loop7
(007366) [23:02:20] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/dev/loop6
(007366) [23:02:20] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/dev/loop5
(007366) [23:02:20] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/dev/loop4
(007366) [23:02:20] % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/dev/loop3p2\040(deleted)
umount: /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/dev/loop3p2\040(deleted): not found
(007366) [23:02:20] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(007366) [23:02:20] NOTE: The failed command's output is above the ^^^ line in the logfile: /media/zhuowei/redhd/docs/pmbootstrap/log.txt
(007366) [23:02:20] ERROR: Command failed: % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/dev/loop3p2\040(deleted)
(007366) [23:02:20] Run 'pmbootstrap log' for details.
(007366) [23:02:20] See also: <https://postmarketos.org/troubleshooting>
(007366) [23:02:20] Traceback (most recent call last):
File "/media/zhuowei/redhd/docs/repos/pmbootstrap/pmb/helpers/run.py", line 45, in core
stderr=args.logfd)
File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', 'umount', '/media/zhuowei/redhd/docs/pmbootstrap/chroot_native/dev/loop3p2\\040(deleted)']' returned non-zero exit status 1
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/media/zhuowei/redhd/docs/repos/pmbootstrap/pmb/__init__.py", line 53, in main
getattr(frontend, args.action)(args)
File "/media/zhuowei/redhd/docs/repos/pmbootstrap/pmb/helpers/frontend.py", line 174, in shutdown
pmb.chroot.shutdown(args)
File "/media/zhuowei/redhd/docs/repos/pmbootstrap/pmb/chroot/shutdown.py", line 93, in shutdown
pmb.helpers.mount.umount_all(args, args.work)
File "/media/zhuowei/redhd/docs/repos/pmbootstrap/pmb/helpers/mount.py", line 107, in umount_all
pmb.helpers.run.root(args, ["umount", mountpoint])
File "/media/zhuowei/redhd/docs/repos/pmbootstrap/pmb/helpers/run.py", line 85, in root
return user(args, cmd, log, working_dir, return_stdout, check)
File "/media/zhuowei/redhd/docs/repos/pmbootstrap/pmb/helpers/run.py", line 76, in user
return core(args, cmd, msg, log, return_stdout, check, working_dir)
File "/media/zhuowei/redhd/docs/repos/pmbootstrap/pmb/helpers/run.py", line 58, in core
raise RuntimeError("Command failed: " + log_message) from exc
RuntimeError: Command failed: % sudo umount /media/zhuowei/redhd/docs/pmbootstrap/chroot_native/dev/loop3p2\040(deleted)