Unable to install core snap in an ephemeral boot: cannot create namespace group directory /run/snapd/ns: Bad file descriptor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
AppArmor |
New
|
Undecided
|
Unassigned | ||
snapd |
Triaged
|
High
|
Unassigned |
Bug Description
After trying to install a snap inside an ephemeral boot (MAAS commissioning), I see the following error:
$ sudo snap install core
error: cannot perform the following tasks:
- Run configure hook of "core" snap if present (cannot create namespace group directory /run/snapd/ns: Bad file descriptor)
Here's some more context; I tried with the current snap-confine and snapd in xenial-updates, then tried the package from 17.04 in case a fix had already been uploaded:
$ snap info core
name: core
summary: "snapd runtime environment"
publisher: canonical
description: |
The core runtime environment for snapd
type: core
channels:
stable: 16.04.1 (1222) 79MB -
candidate: 16.04.1 (1222) 79MB -
beta: 16.04.1 (1222) 79MB -
edge: 16.04.1 (1222) 79MB -
$ apt-cache policy snapd
snapd:
Installed: 2.22.3+17.04
Candidate: 2.22.3+17.04
Version table:
*** 2.22.3+17.04 100
100 /var/lib/
2.22.2 500
500 http://
2.0.2 500
500 http://
$ uname -a
Linux maas-ephemeral 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ sudo cat /proc/self/
18 25 0:17 / /sys rw,nosuid,
19 25 0:4 / /proc rw,nosuid,
20 25 0:6 / /dev rw,nosuid,relatime shared:4 - devtmpfs udev rw,size=
21 20 0:14 / /dev/pts rw,nosuid,
22 25 0:18 / /run rw,nosuid,
23 25 8:32 / /media/root-ro ro,relatime shared:2 - squashfs /dev/disk/
24 25 0:19 / /media/root-rw rw,relatime shared:3 - tmpfs tmpfs-root rw
25 0 0:20 / / rw,relatime shared:1 - overlay overlayroot rw,lowerdir=
28 25 0:21 / /lib/modules rw,relatime shared:7 - tmpfs copymods rw
29 18 0:12 / /sys/kernel/
30 20 0:22 / /dev/shm rw,nosuid,nodev shared:6 - tmpfs tmpfs rw
31 22 0:23 / /run/lock rw,nosuid,
32 18 0:24 / /sys/fs/cgroup ro,nosuid,
33 32 0:25 / /sys/fs/
34 18 0:26 / /sys/fs/pstore rw,nosuid,
35 18 0:27 / /sys/firmware/
36 32 0:28 / /sys/fs/
37 32 0:29 / /sys/fs/
38 32 0:30 / /sys/fs/
39 32 0:31 / /sys/fs/
40 32 0:32 / /sys/fs/cgroup/pids rw,nosuid,
41 32 0:33 / /sys/fs/
42 32 0:34 / /sys/fs/
43 32 0:35 / /sys/fs/
44 32 0:36 / /sys/fs/
45 32 0:37 / /sys/fs/
47 20 0:38 / /dev/hugepages rw,relatime shared:27 - hugetlbfs hugetlbfs rw
48 20 0:16 / /dev/mqueue rw,relatime shared:28 - mqueue mqueue rw
49 18 0:7 / /sys/kernel/debug rw,relatime shared:29 - debugfs debugfs rw
50 49 0:9 / /sys/kernel/
51 18 0:39 / /sys/fs/
46 25 0:41 / /var/lib/lxcfs rw,nosuid,
53 22 0:42 / /run/user/1000 rw,nosuid,
sudo strace snap install core: http://
Could you please attach the syslog file after the error happens? The strace is nice but unfortunately we would need the strace of the server (snapd) side of the operation. If you want to do that please make sure to use strace -f as go will spawn a lot of processes - and its going to be very chatty :) The syslog is probably sufficient to get a first idea.