I've observed failures building dib images for some time where the loopback fails to unmount as part of clean-up, after the image has been created. Example of a build out of bifrost:
'/httpboot/deployment_image.d/dib-manifests'\n'/tmp/dib_build.Fe6LldX9/mnt//etc/dib-manifests/dib-manifest-git-deployment_image' -> '/httpboot/deployment_image.d/dib-manifests/dib-manifest-git-deployment_image'\n'/tmp/dib_build.Fe6LldX9/mnt//etc/dib-manifests/dib_environment' -> '/httpboot/deployment_image.d/dib-manifests/dib_environment'\n'/tmp/dib_build.Fe6LldX9/mnt//etc/dib-manifests/dib_arguments' -> '/httpboot/deployment_image.d/dib-manifests/dib_arguments'\n'/tmp/dib_build.Fe6LldX9/mnt//etc/dib-manifests/dib-manifest-dpkg-deployment_image' -> '/httpboot/deployment_image.d/dib-manifests/dib-manifest-dpkg-deployment_image'\nUnmount /tmp/dib_build.Fe6LldX9/mnt/sys\nUnmount /tmp/dib_build.Fe6LldX9/mnt/proc\nUnmount /tmp/dib_build.Fe6LldX9/mnt/dev/pts\nUnmount /tmp/dib_build.Fe6LldX9/mnt/dev\nConverting image using qemu-img convert\nImage file /httpboot/deployment_image.qcow2 created...\nERROR: failed to umount the /tmp/dib_image.2jsRrOG7 tmpfs mount point"
While the image is successfully created, DIB returns a return code indicating failure, which causes the caller basing logic on the return code to fail.