Score:0

`snap list` hangs (missing /run/snapd.socket): should I report?

at flag

I have Ubuntu running under WSL2. This works fine for the most part, but snap list is hanging with no error. I ran strace snap list and saw this:

/run/snapd.socket"}, 20) = -1 ENOENT (No such file or directory)
write(7, "\0", 1)                       = 1
futex(0x55c51b93cec8, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
...

Seems the daemon is not running? I am wondering if this is bug report worthy, or if WSL2 does some weird stuff that makes it inapplicable?

System

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy

Other output from strace:

read(8, "initrd=\\initrd.img WSL_ROOT_INIT"..., 512) = 162
read(8, "", 350)                        = 0
epoll_ctl(4, EPOLL_CTL_DEL, 8, 0xc0004ffa5c) = 0
close(8)                                = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/usr/bin/snap", 128) = 13
newfstatat(AT_FDCWD, "/snap/snapd/current/usr/bin/snap", 0xc000194858, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/core/current/usr/bin/snap", 0xc000194928, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/bin/snap", 0xc0001949f8, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/var/lib/snapd/maintenance.json", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/var/lib/snapd/maintenance.json", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
futex(0xc000034d48, FUTEX_WAKE_PRIVATE, 1) = 1
getuid()                                = 1000
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 8
connect(8, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(8)                                = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 8
connect(8, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(8)                                = 0
newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=510, ...}, 0) = 0
newfstatat(AT_FDCWD, "/", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 8
newfstatat(8, "", {st_mode=S_IFREG|0644, st_size=510, ...}, AT_EMPTY_PATH) = 0
read(8, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 510
read(8, "", 4096)                       = 0
newfstatat(8, "", {st_mode=S_IFREG|0644, st_size=510, ...}, AT_EMPTY_PATH) = 0
close(8)                                = 0
openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 8
newfstatat(8, "", {st_mode=S_IFREG|0644, st_size=1501, ...}, AT_EMPTY_PATH) = 0
lseek(8, 0, SEEK_SET)                   = 0
read(8, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 1501
close(8)                                = 0
openat(AT_FDCWD, "/home/carlerik/.snap/auth.json", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
futex(0xc000100148, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x5557cf729ec8, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x5557cf729a80, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x5557cf729ec8, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0xc000100148, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x5557cf729a80, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x5557cf729ec8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Resource temporarily unavailable)
at flag
The last answer relating to WSL2 actually fixed my issue, so yes. https://askubuntu.com/a/1251175/165026
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.