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) = 1futex(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 -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 22.04.1 LTSRelease: 22.04Codename: jammyOther output from strace:
read(8, "initrd=\\initrd.img WSL_ROOT_INIT"..., 512) = 162read(8, "", 350) = 0epoll_ctl(4, EPOLL_CTL_DEL, 8, 0xc0004ffa5c) = 0close(8) = 0readlinkat(AT_FDCWD, "/proc/self/exe", "/usr/bin/snap", 128) = 13newfstatat(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) = 1getuid() = 1000socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 8connect(8, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)close(8) = 0socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 8connect(8, {sa_family=AF_UNIX, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)close(8) = 0newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=510, ...}, 0) = 0newfstatat(AT_FDCWD, "/", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 8newfstatat(8, "", {st_mode=S_IFREG|0644, st_size=510, ...}, AT_EMPTY_PATH) = 0read(8, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 510read(8, "", 4096) = 0newfstatat(8, "", {st_mode=S_IFREG|0644, st_size=510, ...}, AT_EMPTY_PATH) = 0close(8) = 0openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 8newfstatat(8, "", {st_mode=S_IFREG|0644, st_size=1501, ...}, AT_EMPTY_PATH) = 0lseek(8, 0, SEEK_SET) = 0read(8, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 1501close(8) = 0openat(AT_FDCWD, "/home/carlerik/.snap/auth.json", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)futex(0xc000100148, FUTEX_WAKE_PRIVATE, 1) = 1futex(0x5557cf729ec8, FUTEX_WAIT_PRIVATE, 0, NULL) = 0futex(0x5557cf729a80, FUTEX_WAKE_PRIVATE, 1) = 1futex(0x5557cf729ec8, FUTEX_WAIT_PRIVATE, 0, NULL) = 0futex(0xc000100148, FUTEX_WAKE_PRIVATE, 1) = 1futex(0x5557cf729a80, FUTEX_WAKE_PRIVATE, 1) = 1futex(0x5557cf729ec8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Resource temporarily unavailable)