mount namespace issues
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Fix Released
|
High
|
Zygmunt Krynicki |
Bug Description
On a customer project we are seeing various mount namespace errors that seem to prevent installing from seed on first boot, and interface manual connection.
ERROR cannot update mount namespace of snap "THESNAP": cannot update preserved namespace of snap "THESNAP":
[...]
umount "/lib/ld-
I'll email the complete debug first boot log to Ian and Zygmunt (due to private poject)
The snap has a layout:
layout:
/lib/
bind-file: $SNAP/lib/
And uses the gnome-3-28 extension:
ui:
extensions: [gnome-3-28]
Regarding global plugs/slots we have:
slots:
x11-slot:
interface: x11
plugs:
station0:
interface: serial-port
logind:
bus: system
interface: dbus
name: org.freedesktop
[ . . . ]
hooks:
install:
plugs:
- snapd-control
- hardware-observe
configure:
plugs: []
post-refresh:
plugs: [snapd-control]
And spread among apps the following plugs:
- snapd-control
- network
- i2c
- opengl
- audio-playback
- wayland
- network-manager
- network-observe
- network-bind
- network-control
- shutdown
- snapd-control (we have an potential queueing issue with post-refresh and app using this)
- station0
- logind
And this slot: (which should be changed to network-bind with no slot I think)
slots: [ x11-slot ]
When I try to manually connect i2c to a slot defined in the gadget, I also get a namespace error:
"user@linux:~$ snap connect THESNAP:i2c GADGET:i2c-1
error: cannot perform the following tasks:
- Connect THESNAP:i2c to GADGET:i2c-1 (cannot update mount namespace of snap "THESNAP": cannot update preserved namespace of snap "THESNAP":
-----
update.go:85: cannot change mount namespace according to change unmount (/snap/
cannot update snap namespace: device or resource busy"
user@linux:~$ snap version
snap 2.45.3.1
snapd 2.45.3.1
series 16
kernel 4.15.0-1004-fde
Changed in snapd: | |
assignee: | nobody → Zygmunt Krynicki (zyga) |
Changed in snapd: | |
status: | New → In Progress |
Changed in snapd: | |
importance: | Undecided → High |
milestone: | none → 2.46 |
Changed in snapd: | |
status: | In Progress → Fix Committed |
I managed to reproduce the symptom but I was unable to reproduce the whole flow. I'm working through the kernel side co confirm my theory and to test a snapd-side fix. Following that I will explore an idea that may fix this without changing snapd, so that the customer snap can be unblocked.