loop device leak

Bug #1896822 reported by Scott Little
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Scott Little

Bug Description

Brief Description
-----------------
update-efiboot-image sometimes fails to release the loop device on failure or interrupt.

losetup -a
/dev/loop0: []: (/localdisk/loadbuild/me/starlingx-0/export/efiboot.img (deleted))

Severity
--------
Major: Loop devices are eventually exhausted causing build failures and other possible issues with the build machine

Steps to Reproduce
------------------
Run update-efiboot-image and interupt it with CTRL-C after it says a mount has been created.

Expected Behavior
------------------
unmount and release the loop device.

Actual Behavior
----------------
loop device is either left mounted, or is otherwise not released.

Reproducibility
---------------
Intermittent

System Configuration
--------------------
N/A

Branch/Pull Time/Commit
-----------------------
all branches

Last Pass
---------
N/A

Timestamp/Logs
--------------
N/A

Test Activity
-------------
Build

Workaround
----------
manual detection and release

losetup -a
udisksctl unmount -b /dev/loop0
udisksctl loop-delete -b /dev/loop0

or

losetup -a
sudo umount /dev/loop0
sudo sudo losetup -d /dev/loop0

Scott Little (slittle1)
Changed in starlingx:
assignee: nobody → Scott Little (slittle1)
Ghada Khalil (gkhalil)
tags: added: stx.build
Ghada Khalil (gkhalil)
tags: added: stx.5.0
tags: removed: stx.5.0
Revision history for this message
Ghada Khalil (gkhalil) wrote :

stx.5.0 / medium priority - intermittent build failures

Changed in starlingx:
importance: Undecided → Medium
tags: added: stx.5.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to root (master)

Reviewed: https://review.opendev.org/753830
Committed: https://git.openstack.org/cgit/starlingx/root/commit/?id=895d1bcf11d787039fe7ee93f25dd161d71d79a5
Submitter: Zuul
Branch: master

commit 895d1bcf11d787039fe7ee93f25dd161d71d79a5
Author: Scott Little <email address hidden>
Date: Wed Sep 23 15:08:58 2020 -0400

    Fix update-efiboot-image loop device leak

    If update-efiboot-image exits abnormally or is terminated
    from an external signal, it has been observed to leave
    dangling mounts and/or fails to release the loop device.
    Over time, all loop devices can be consumed on the build host.

    This update adds an exit handler to ensure release of the
    mount and loop device.

    Closes-Bug: 1896822
    Change-Id: I1891df134ae583750ca1d4858bdc2402e6a67ff6
    Signed-off-by: Scott Little <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.