eoan to focal upgrade hangs when lvm snapshot is present

Bug #1876506 reported by David Wittman on 2020-05-02
86
This bug affects 6 people
Affects Status Importance Assigned to Milestone
memtest86+ (Ubuntu)
Critical
Unassigned
Focal
Critical
Unassigned
os-prober (Ubuntu)
Critical
Unassigned
Focal
Critical
Unassigned

Bug Description

[Impact]
Upgrading on LVM systems with snapshots hangs

[Test case]

- Install VM with eoan, LVM
- Create snapshot of root
- Upgrade memtest86+ to focal (download deb and apt install it is enough)

This hangs, when it shouldn't.

[Regression potential]
The change to memtest86+ closes file descriptor 3 when invoking update-grub like other callers do, which fixes the issue. File descriptor 3 is the debconf socket. If update-grub would need to communicate with debconf, it couldn't anymore. But seeing that we do this everywhere else, this should be fine.

[Original bug report]

When upgrading from 19.10 (w/ LVM + encypted disks) to 20.04, the installer hangs when trying to probe an LVM snapshot volume created before the upgrade.

Steps to reproduce:

lvcreate -s -L 20G -n preupgrade /dev/vgubuntu/root
do-release-upgrade -d

The installer will hang after the following message:

/usr/sbin/grub-probe: error: unknown filesystem.
Found Ubuntu 19.10 (19.10) on /dev/mapper/vgubuntu-preupgrade
done

Resolution:

Killing the grub-mount process which is probing the LVM snapshot seems to unhang the installer and allow the upgrade to complete without issue.

David Wittman (david-wittman) wrote :
David Wittman (david-wittman) wrote :

Here's a screenshot of where it hangs. This was on a fresh 19.10 install on VirtualBox using the LVM + Encryption set up via the installer, but the same thing happened on my desktop upgrade.

tags: added: rls-ff-incoming
Julian Andres Klode (juliank) wrote :

What does lvs say?

My (thin) snapshots have the "s(k)ip activation" flag set, but IIRC, os-prober tried to probe them all, hence I removed os-prober.

I guess os-prober should just ignore lvm volumes with skip activation, maybe also snapshot volumes too (though not sure if just skip activation makes more sense).

Changed in ubuntu-release-upgrader (Ubuntu Focal):
importance: Undecided → High
Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → High
tags: removed: rls-ff-incoming
David Wittman (david-wittman) wrote :

@juliank well, it's full now but here's what my snapshot (pre-20.04) looks like in `lvs`:

```
  LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
  pre-20.04 vgubuntu swi-I-s--- 20.00g root 100.00
  root vgubuntu owi-aos--- 400.00g
  swap_1 vgubuntu -wi-ao---- 976.00m
```

tags: added: id-5ecfe91fc5987a8563b27f1f
Steve Langasek (vorlon) on 2020-06-17
affects: ubuntu-release-upgrader (Ubuntu) → grub2 (Ubuntu)
Changed in grub2 (Ubuntu Focal):
milestone: none → ubuntu-20.04.1
affects: grub2 (Ubuntu) → os-prober (Ubuntu)
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in os-prober (Ubuntu Focal):
status: New → Confirmed
Changed in os-prober (Ubuntu):
status: New → Confirmed
Julian Andres Klode (juliank) wrote :

bug 1887373 suggests it is hanging in memtest86+ postinst

affects: os-prober (Ubuntu) → memtest86+ (Ubuntu)
Julian Andres Klode (juliank) wrote :

The whole lvm snapshot thing was a strawman, the output says done, so we are finished with grub-mkconfig, and it's not hanging there.

Changed in memtest86+ (Ubuntu Focal):
importance: High → Critical
Changed in memtest86+ (Ubuntu):
importance: High → Critical
Julian Andres Klode (juliank) wrote :

The maintainer script becomes a zombie, because perl -w ... debconf/frontend ... memtest86+.postinst is stuck in a read() from fd 9, which is a pipe.

affects: memtest86+ (Ubuntu) → ubuntu
affects: ubuntu → debconf (Ubuntu)
affects: debconf (Ubuntu) → os-prober (Ubuntu)
k3dar7 (k3dar7) wrote :

same problem while upgrade from bionic

lunix (bob-l-lewis) wrote :

I apologize if this is not relevant to this blocking bug. I am trying to help a friend.
Machine is dual boot Windows 10 and Ubuntu 18.04 Has Extended Partition where Ubuntu went into Parition 5. Machine worked fine with 18.04. Tried upgrade offered to Ubuntu 19,04 which failed and won't no longer boots to Ubuntu selection from GRUB but Windows still boots. Tried a fresh install of 20.04 which resulted in:

error: file '/boot/grub/i386-pc/normal.mod' not found.
Entering rescue mode...

So won't boot either OS now.

I am hopeful to do a fresh install of Ubuntu 18.04-5 next in hopes that the machine will work again. Attached is the Disk partitioning table if this is of interest.

description: updated
description: updated
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package memtest86+ - 5.01-3.1ubuntu4

---------------
memtest86+ (5.01-3.1ubuntu4) groovy; urgency=medium

  * Close FD 3 when invoking update-grub (LP: #1876506)

 -- Julian Andres Klode <email address hidden> Tue, 18 Aug 2020 12:23:25 +0200

Changed in memtest86+ (Ubuntu):
status: New → Fix Released

Hello David, or anyone else affected,

Accepted memtest86+ into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/memtest86+/5.01-3.1ubuntu2.1 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 memtest86+ (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed verification-needed-focal
Julian Andres Klode (juliank) wrote :

Reset my testing VM to basic eoan, added focal-proposed, and upgraded memtest86+ to 5.01-3.1ubuntu2.1 from focal-proposed, which worked. For comparison, yesterday's run against 5.01-3ubuntu1 from the release pocket did not work.

Changed in memtest86+ (Ubuntu Focal):
importance: Undecided → Critical
Changed in memtest86+ (Ubuntu):
importance: Undecided → Critical
tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal

The version of memtest86+ in the proposed pocket of Focal that was purported to fix this bug report has been removed because one or more bugs that were to be fixed by the upload have failed verification and been in this state for more than 10 days.

Changed in memtest86+ (Ubuntu Focal):
status: Fix Committed → Won't Fix
Changed in memtest86+ (Ubuntu Focal):
status: Won't Fix → Confirmed
Łukasz Zemczak (sil2100) wrote :

Chris, why did you remove this SRU? The .changes file only had this bug included and this was verification-done, without any reports of it causing any issues (at least not on this bug). Why was this removed instead of released to -updates? This bug is an upgrade-blocker for 20.04.1.

Hello David, or anyone else affected,

Accepted memtest86+ into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/memtest86+/5.01-3.1ubuntu2.1 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 memtest86+ (Ubuntu Focal):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-focal
removed: verification-done verification-done-focal
Łukasz Zemczak (sil2100) wrote :

Meanwhile, I have re-published the old package into focal-proposed. As this is the *exact* same binary package (as I have republished it from the deleted state), Julian's earlier verification from comment #14 still stands. No re-verification is needed.

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package memtest86+ - 5.01-3.1ubuntu2.1

---------------
memtest86+ (5.01-3.1ubuntu2.1) focal; urgency=medium

  * Close FD 3 when invoking update-grub (LP: #1876506)

 -- Julian Andres Klode <email address hidden> Tue, 18 Aug 2020 12:46:05 +0200

Changed in memtest86+ (Ubuntu Focal):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for memtest86+ 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.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers