install-finish task might fail due to failed unmount
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OEM Priority Project |
New
|
Undecided
|
Unassigned | ||
snapd |
Fix Released
|
Critical
|
Unassigned |
Bug Description
In subiquity, when running install-finish task to apply gadget snap to the storage, the defer function of writeFilesystem
Following is the snippet of the debug log:
Jun 29 15:32:49 ubuntu snapd[2738]: logger.go:92: DEBUG: starting install-finish for "classic" (using encryption: true) on map[pc:
Jun 29 15:32:49 ubuntu snapd[2738]: logger.go:92: DEBUG: writing content to partitions
Jun 29 15:32:49 ubuntu snapd[2738]: logger.go:92: DEBUG: OnDiskStructure
Jun 29 15:32:49 ubuntu snapd[2738]: logger.go:92: DEBUG: OnDiskStructure
Jun 29 15:32:49 ubuntu snapd[2738]: logger.go:92: DEBUG: OnDiskStructure
Jun 29 15:32:49 ubuntu snapd[2738]: logger.go:92: DEBUG: OnDiskStructure
Jun 29 15:32:49 ubuntu snapd[2738]: logger.go:92: DEBUG: OnDiskStructure
Jun 29 15:32:49 ubuntu snapd[2738]: logger.go:92: DEBUG: finding layout for "/dev/nvme0n1p1"
Jun 29 15:32:49 ubuntu snapd[2738]: logger.go:92: DEBUG: when applying layout to disk structure: laidOutStruct.
Jun 29 15:32:49 ubuntu snapd[2738]: logger.go:92: DEBUG: writing content on partition /dev/nvme0n1p1
Jun 29 15:32:49 ubuntu snapd[2738]: logger.go:92: DEBUG: mounting "/dev/nvme0n1p1" in "/run/snapd/
Jun 29 15:32:50 ubuntu systemd[1]: run-snapd-
Jun 29 15:32:50 ubuntu snapd[2738]: logger.go:92: DEBUG: finding layout for "/dev/nvme0n1p3"
Jun 29 15:32:50 ubuntu snapd[2738]: logger.go:92: DEBUG: when applying layout to disk structure: laidOutStruct.
Jun 29 15:32:50 ubuntu snapd[2738]: logger.go:92: DEBUG: writing content on partition /dev/nvme0n1p3
Jun 29 15:32:50 ubuntu snapd[2738]: logger.go:92: DEBUG: mounting "/dev/nvme0n1p3" in "/run/snapd/
Jun 29 15:32:50 ubuntu systemd[1]: run-snapd-
Jun 29 15:32:50 ubuntu snapd[2738]: logger.go:92: DEBUG: finding layout for "/dev/nvme0n1p4"
Jun 29 15:32:50 ubuntu snapd[2738]: logger.go:92: DEBUG: when applying layout to disk structure: laidOutStruct.
Jun 29 15:32:50 ubuntu snapd[2738]: logger.go:92: DEBUG: writing content on partition /dev/mapper/
Jun 29 15:32:50 ubuntu snapd[2738]: logger.go:92: DEBUG: mounting "/dev/mapper/
Jun 29 15:32:50 ubuntu kernel: EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
Jun 29 15:32:50 ubuntu snapd[2738]: logger.go:92: DEBUG: unmounting "/run/snapd/
Jun 29 15:32:50 ubuntu systemd[1]: Unmounting /run/snapd/
Jun 29 15:32:50 ubuntu systemd[1]: run-snapd-
Jun 29 15:32:50 ubuntu systemd[1]: Unmounted /run/snapd/
Jun 29 15:32:50 ubuntu snapd[2738]: logger.go:92: DEBUG: unmounting "/run/snapd/
Jun 29 15:32:50 ubuntu systemd[1]: Unmounting /run/snapd/
Jun 29 15:32:50 ubuntu systemd[1]: run-snapd-
Jun 29 15:32:50 ubuntu systemd[1]: Unmounted /run/snapd/
Jun 29 15:32:50 ubuntu snapd[2738]: logger.go:92: DEBUG: 2023-06-
Jun 29 15:32:50 ubuntu snapd[2738]: taskrunner.go:289: [change 6 "Finish setup of run system for \"classic\"" task] failed: cannot write content: device or resource busy
tags: | added: oem-priority originate-from-2024577 xinyi |
description: | updated |
Changed in snapd: | |
status: | In Progress → Fix Released |
As an additional data point, mwhudson mentioned the following: /github. com/mwhudson/ livefs- editor/ issues/ 25)
so fwiw my favourite (but unverified) theory is that this is some kind of refcounting bug in overlayfs that prevents unmounts that should be allowed
(related https:/
So we could try the same as https:/ /github. com/mwhudson/ livefs- editor/ pull/26 - i.e. on umount error just umount lazy.