[SRU] Slow startup with zram-config installed (/dev/zram0) or encrypted swap

Bug #1781746 reported by Lech Jabłoński
48
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Default settings and artwork for Baltix OS
Confirmed
High
Mantas Kriaučiūnas
initramfs-tools (Debian)
Fix Released
Unknown
initramfs-tools (Ubuntu)
Fix Released
Medium
Unassigned
Bionic
Triaged
Undecided
Unassigned

Bug Description

[Impact]

Ubuntu 18.04 startup slowdowns for 30-120 seconds when zram swap is enabled (for example zram-config installed) or swap is encrypted.
Today lots of users have SSD instead of HDD disk drives and use zram swap instead of swap partition or swap file, but if initrd is generated when zram swap is enabled then system can become "unbootable" from the user's perspective (Users with SSD storage doesn't wait 2 or more minutes...)

This bug is already fixed in Debian initramfs-tools ver 0.132, please accept this simple 3 lines patch from Debian into Ubuntu 18.04 LTS
https://salsa.debian.org/kernel-team/initramfs-tools/commit/312393b0cf1231125eeff3d1a2b6b778a935c21d

[Test Case]
Install zram-config package and regenerate and initrd, for example with
sudo update-initramfs -u

When generating initrd I get this message in terminal:

I: The initramfs will attempt to resume from /dev/zram0
I: (UUID=e380356c-767e-4265-98da-8be62ad28569)
I: Set the RESUME variable to override this.###########################################.................]

So the local-premount script in initramfs was waiting for a swap device that was not available, until it timed out. The relevant message was gave up waiting for suspend/resume device.

[Regression Potential]

None, patch simply adds case for /dev/zram*:

60 case "$resume_auto" in
61 /dev/zram*)
62 ephemeral=true
63 ;;
64 esac

[Other Info]
Manual method to disable this (as resuming from swap is not possible with an encrypted or zram swap): modify file /etc/initramfs-tools/conf.d/resume - add (or change) line
RESUME=none
(instead of the UUID that was here) will disable waiting for a resume device.
and run sudo update-initramfs -u to apply the changes.

Revision history for this message
Balint Reczey (rbalint) wrote :

I believe this bug was only accidentally reported against pkgbinarymangler.

affects: pkgbinarymangler (Ubuntu) → initramfs-tools (Ubuntu)
summary: - Slow startup with encrypted swap
+ Slow startup with zram-config installed (/dev/zram0) or encrypted swap
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Slow startup with zram-config installed (/dev/zram0) or encrypted swap

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

Changed in initramfs-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

This issue is fixed in Debian, initramfs-tools version 0.132, please accept this simple, 3 lines patch from Debian into Ubuntu 18.04

https://salsa.debian.org/kernel-team/initramfs-tools/commit/312393b0cf1231125eeff3d1a2b6b778a935c21d

tags: added: bionic patch patch-accepted-debian
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in zram-config (Ubuntu):
status: New → Confirmed
description: updated
summary: - Slow startup with zram-config installed (/dev/zram0) or encrypted swap
+ [SRU] Slow startup with zram-config installed (/dev/zram0) or encrypted
+ swap
Changed in initramfs-tools (Debian):
status: Unknown → Fix Released
Changed in baltix-default-settings:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Mantas Kriaučiūnas (mantas)
tags: added: rls-bb-incoming
Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

What can I do to speed-up inclusion of simple, 3 lines patch from Debian into Ubuntu 18.04 LTS ?

https://salsa.debian.org/kernel-team/initramfs-tools/commit/312393b0cf1231125eeff3d1a2b6b778a935c21d

Revision history for this message
Brian Murray (brian-murray) wrote :

While it does appear to be a simple 3 line patch and may apply cleanly the resume hook seems to have been modified heavily and the ephemeral variable does not appear in the rest of the hook, so while it would be set nothing would change with the behavior.

tags: added: rls-dd-incoming
removed: rls-bb-incoming
Mathew Hodson (mhodson)
Changed in initramfs-tools (Ubuntu):
importance: Undecided → Medium
no longer affects: zram-config (Ubuntu)
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Unsubscribing the sponsors team after Brian's comment.

tags: added: rls-ee-incoming
removed: rls-dd-incoming
Changed in initramfs-tools (Ubuntu):
status: Confirmed → Fix Released
Changed in initramfs-tools (Ubuntu Bionic):
status: New → Triaged
tags: added: rls-bb-notfixing
removed: rls-ee-incoming
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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