umount_partition e2fsck call fails with ${rootfs_dev_mapper} in use

Bug #1960537 reported by John Chittum
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
livecd-rootfs (Ubuntu)
Fix Released
High
John Chittum
Bionic
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Impish
Fix Released
Undecided
Unassigned
Jammy
Fix Released
High
John Chittum

Bug Description

When running builds locally or within launchpad, cloud-images are starting to fail in many places with the following error:

```
+ udevadm settle
+ '[' -n /dev/mapper/loop0p1 -a -b /dev/mapper/loop0p1 ']'
+ '[' -e /etc/mtab ']'
+ e2fsck -y -E discard /dev/mapper/loop0p1
e2fsck 1.45.5 (07-Jan-2020)
/dev/mapper/loop0p1 is in use.
e2fsck: Cannot continue, aborting.
```

This call happens on calls to `umount_disk_image` which then calls `umount_partition`.

`dmsetup info` reports (as an example)

```
Name: loop3p1
State: ACTIVE
Read Ahead: 256
Tables present: LIVE
Open count: 1
Event number: 0
Major, minor: 253, 0
Number of targets: 1
UUID: part1-devnode_7:3_Wh5pYvM
```

This shows that there's an open file handle on loop3p1.

This was first noticed in Jammy builds. After a fair amount of debugging by jchittum, no root cause was found. However, a workaround was added to the failing CPC hook:

sleep 30

Trial and error found that shorter sleeps still failed.

Due to the ephemeral nature, I [jchittum] have been unable to find a root cause. The file handle cleans itself up quickly enough that even when I'm on a node watching the build, I haven't been able to track down an exact cause due to the handle releasing in a short time.

[Test case]
The autopkgtests should continue to pass.
For focal, the daily image builds should continue to pass.
For all series, the CPC team will need to confirm that this has not regressed their builds, as they downstream from the livecd-rootfs in the archive using cloud sauce scripts.

Changed in livecd-rootfs (Ubuntu Jammy):
assignee: nobody → John Chittum (jchittum)
status: New → In Progress
importance: Undecided → High
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello John, or anyone else affected,

Accepted livecd-rootfs into impish-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.742.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-impish to verification-done-impish. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-impish. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in livecd-rootfs (Ubuntu Jammy):
status: In Progress → Fix Committed
Changed in livecd-rootfs (Ubuntu Impish):
status: New → Fix Committed
tags: added: verification-needed verification-needed-impish
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello John, or anyone else affected,

Accepted livecd-rootfs into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.664.38 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in livecd-rootfs (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed-focal
Changed in livecd-rootfs (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello John, or anyone else affected,

Accepted livecd-rootfs into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.525.57 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.755

---------------
livecd-rootfs (2.755) jammy; urgency=medium

  [ Brian Murray ]
  * Add the casper package instead of the lupin-casper package as the
    installer for Windows is a project that is no longer supported and lupin
    is being removed the archive in LP: 1960457.

  [ John Chittum ]
  * Add sleep due to e2fsck error in umount_partition. LP: #1960537

 -- Brian Murray <email address hidden> Thu, 10 Feb 2022 13:54:42 -0800

Changed in livecd-rootfs (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
John Chittum (jchittum) wrote :

package from https://launchpad.net/ubuntu/+source/livecd-rootfs/2.742.3 , the Impish upload has been verified against a currently failing CPC build

1. downloaded package
2. untarred locally
3. checked out CPC's extras code for Impish (cpc_packaging.extra)
4. using `ubuntu-old-fashioned` , executed a build for CPC's azure hook:

bartender --hook-extras-dir ~/dev01/cloudware/cpc_packaging.extra --livecd-rootfs-dir /home/jchittum/dev01/troubleshooting/various-rootfs/2.742.3/livecd-rootfs --build-provider aws --aws-keypair-name jchittum-cpc-jenkins -- --series impish --project ubuntu-cpc --image-target azure

5. Observed the sleep 30 was run in the build log
6. observed that the Azure hook completed successfully

Revision history for this message
John Chittum (jchittum) wrote :

package from https://launchpad.net/ubuntu/+source/livecd-rootfs/2.664.38 , the Focal upload has been verified against a currently failing CPC build

1. downloaded package
2. untarred locally
3. checked out CPC's extras code for Focal (cpc_packaging.extra)
4. using `ubuntu-old-fashioned` , executed a build for CPC's azure hook:

bartender --hook-extras-dir ~/dev01/cloudware/cpc_packaging.extra --livecd-rootfs-dir /home/jchittum/dev01/troubleshooting/various-rootfs/2.664.38/livecd-rootfs --build-provider aws --aws-keypair-name jchittum-cpc-jenkins -- --series impish --project ubuntu-cpc --image-target azure

5. Observed the sleep 30 was run in the build log
6. observed that the Azure hook completed successfully

Revision history for this message
John Chittum (jchittum) wrote :

package from https://launchpad.net/ubuntu/+source/livecd-rootfs/2.525.57, the Bionic upload has been verified against a currently failing CPC build

1. downloaded package
2. untarred locally
3. checked out CPC's extras code for Bionic(cpc_packaging.extra)
4. using `ubuntu-old-fashioned` , executed a build for CPC's azure hook:

bartender --hook-extras-dir ~/dev01/cloudware/cpc_packaging.extra --livecd-rootfs-dir /home/jchittum/dev01/troubleshooting/various-rootfs/2.525.57/livecd-rootfs --build-provider aws --aws-keypair-name jchittum-cpc-jenkins -- --series impish --project ubuntu-cpc --image-target azure

5. Observed the sleep 30 was run in the build log
6. observed that the Azure hook completed successfully

tags: added: verification-done-bionic verification-done-focal verification-done-impish
removed: verification-needed-bionic verification-needed-focal verification-needed-impish
tags: added: verification-done
removed: verification-needed
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for livecd-rootfs has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.664.38

---------------
livecd-rootfs (2.664.38) focal; urgency=medium

  * Add sleep due to e2fsck error in umount_partition. LP: #1960537

 -- Brian Murray <email address hidden> Thu, 10 Feb 2022 15:41:28 -0800

Changed in livecd-rootfs (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.525.57

---------------
livecd-rootfs (2.525.57) bionic; urgency=medium

  * Add sleep due to e2fsck error in umount_partition. LP: #1960537

 -- Brian Murray <email address hidden> Thu, 10 Feb 2022 15:55:55 -0800

Changed in livecd-rootfs (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.742.3

---------------
livecd-rootfs (2.742.3) impish; urgency=medium

  * Add sleep due to e2fsck error in umount_partition. LP: #1960537

 -- Brian Murray <email address hidden> Thu, 10 Feb 2022 15:28:29 -0800

Changed in livecd-rootfs (Ubuntu Impish):
status: Fix Committed → 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.