[Bug 1938414] [NEW] Local live-build fails to build images due to chroot/dev/* umount failures

Łukasz Zemczak 1938414 at bugs.launchpad.net
Thu Jul 29 09:02:03 UTC 2021


Public bug reported:

[Impact]

When running image builds locally by either running live-build directly
or using `ubuntu-image classic`, the builds will almost always fail at
one stage with an error similar to this:

umount: <PATH>/chroot/dev/shm: target is busy.

This is due to the fact that chroot/dev is bind-mounted, and during unmount, when someone is physically using the build host, umount operations on this tree can be impossible.
Without this basically using ubuntu-image locally to build your own image and/or running test automation on certain infrastructure bits can be impossible.

[Test Case]

(best done in a VM)
* On a focal machine, install ubuntu-image + livecd-rootfs from -proposed.
* Get the gadget: git clone https://github.com/snapcore/pc-amd64-gadget.git -b classic
* Prime the gadget: cd pc-amd64-gadget/; snapcraft prime
* Start the image build: cd ../; sudo ubuntu-image classic -d -O out/ -p ubuntu-cpc -a amd64 -s focal
* Wait for the image to finish building, observe that that the image build succeeded and image files are available in the out/ directory

Without the fix the build will not succeed.

[Where problems could occur]

I can't think of a scenario that could go wrong here. If there is any
regression, it would most likely manifest as another image build
failure. Regression potential is low here, especially that livecd-rootfs
is only used for image builds.

** Affects: livecd-rootfs (Ubuntu)
     Importance: Medium
     Assignee: Łukasz Zemczak (sil2100)
         Status: Fix Committed

** Affects: livecd-rootfs (Ubuntu Focal)
     Importance: High
     Assignee: Łukasz Zemczak (sil2100)
         Status: New

** Also affects: livecd-rootfs (Ubuntu Focal)
   Importance: Undecided
       Status: New

** Changed in: livecd-rootfs (Ubuntu Focal)
     Assignee: (unassigned) => Łukasz Zemczak (sil2100)

** Changed in: livecd-rootfs (Ubuntu Focal)
   Importance: Undecided => High

** Changed in: livecd-rootfs (Ubuntu)
   Importance: High => Medium

** Changed in: livecd-rootfs (Ubuntu)
       Status: New => Fix Committed

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

Title:
  Local live-build fails to build images due to chroot/dev/* umount
  failures

Status in livecd-rootfs package in Ubuntu:
  Fix Committed
Status in livecd-rootfs source package in Focal:
  New

Bug description:
  [Impact]

  When running image builds locally by either running live-build
  directly or using `ubuntu-image classic`, the builds will almost
  always fail at one stage with an error similar to this:

  umount: <PATH>/chroot/dev/shm: target is busy.

  This is due to the fact that chroot/dev is bind-mounted, and during unmount, when someone is physically using the build host, umount operations on this tree can be impossible.
  Without this basically using ubuntu-image locally to build your own image and/or running test automation on certain infrastructure bits can be impossible.

  [Test Case]

  (best done in a VM)
  * On a focal machine, install ubuntu-image + livecd-rootfs from -proposed.
  * Get the gadget: git clone https://github.com/snapcore/pc-amd64-gadget.git -b classic
  * Prime the gadget: cd pc-amd64-gadget/; snapcraft prime
  * Start the image build: cd ../; sudo ubuntu-image classic -d -O out/ -p ubuntu-cpc -a amd64 -s focal
  * Wait for the image to finish building, observe that that the image build succeeded and image files are available in the out/ directory

  Without the fix the build will not succeed.

  [Where problems could occur]

  I can't think of a scenario that could go wrong here. If there is any
  regression, it would most likely manifest as another image build
  failure. Regression potential is low here, especially that livecd-
  rootfs is only used for image builds.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/livecd-rootfs/+bug/1938414/+subscriptions




More information about the foundations-bugs mailing list