WSL icon indicating copy to clipboard operation
WSL copied to clipboard

calling exe from ssh on WSL2 will cause `UtilAcceptVsock:244: accept4 failed 110`

Open anatawa12 opened this issue 3 years ago • 29 comments

Version

Microsoft Windows [Version 10.0.22000.795]

WSL Version

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

5.10.102.1

Distro Version

Ubuntu 22.04

Other Software

Visual Studio/2022/Community

Repro Steps

  1. setup & start the ssh server via systemctl

  2. run some exe included in VisualStudio on ssh

     $ "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\bin\HostX64\x64\cl.exe"
     $ "/mnt/c/Windows/system32/cmd.exe"
    

Expected Behavior

run cl.exe successfully

Actual Behavior

error

anatawa12@wsl-2204:~$ "/mnt/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.30.30705/bin/HostX64/x64/cl.exe"
<3>init: (4870) ERROR: UtilAcceptVsock:244: accept4 failed 110
                                                              anatawa12@wsl-2204:~$
anatawa12@wsl-2204:~$ "/mnt/c/Windows/system32/cmd.exe"
<3>init: (6522) ERROR: UtilAcceptVsock:244: accept4 failed 110
                                                              anatawa12@wsl-2204:~$

Diagnostic Logs

execve("/mnt/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.30.30705/bin/HostX64/x64/cl.exe", ["/mnt/c/Program Files/Microsoft V"...], 0x7fffdcfb4f38 /* 26 vars */) = 0
arch_prctl(ARCH_SET_FS, 0x356ce0)       = 0
set_tid_address(0x356d18)               = 5428
brk(NULL)                               = 0x5ab000
brk(0x5ac000)                           = 0x5ac000
gettid()                                = 5428
gettid()                                = 5428
gettid()                                = 5428
gettid()                                = 5428
sched_getaffinity(0, 128, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) = 32
brk(0x5ad000)                           = 0x5ad000
getpid()                                = 5428
getcwd("/home/anatawa12", 4096)         = 16
uname({sysname="Linux", nodename="wsl-2204", ...}) = 0
getcwd("/home/anatawa12", 4096)         = 16
open("/mnt/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.30.30705/bin/HostX64/x64/cl.exe", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_PATH) = 3
readlink("/proc/self/fd/3", "/mnt/c/Program Files/Microsoft V"..., 4095) = 108
fstat(3, {st_mode=S_IFREG|0555, st_size=403904, ...}) = 0
stat("/mnt/c/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.30.30705/bin/HostX64/x64/cl.exe", {st_mode=S_IFREG|0555, st_size=403904, ...}) = 0
close(3)                                = 0
open("/proc/self/mountinfo", O_RDONLY)  = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="226 85 8:32 / / rw,relatime - ex"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="oexec,relatime - cgroup cgroup r"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="fs none rw,mode=755\n248 247 0:42"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="mnt/c rw,noatime - 9p drvfs rw,d"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="tl fusectl rw\n267 226 8:32 /snap"..., iov_len=1024}], 2) = 1004
readv(3, [{iov_base="", iov_len=0}, {iov_base="", iov_len=1024}], 2) = 0
close(3)                                = 0
getcwd("/home/anatawa12", 4096)         = 16
open("/proc/self/mountinfo", O_RDONLY)  = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="226 85 8:32 / / rw,relatime - ex"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="oexec,relatime - cgroup cgroup r"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="fs none rw,mode=755\n248 247 0:42"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="mnt/c rw,noatime - 9p drvfs rw,d"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="tl fusectl rw\n267 226 8:32 /snap"..., iov_len=1024}], 2) = 1004
readv(3, [{iov_base="", iov_len=0}, {iov_base="", iov_len=1024}], 2) = 0
close(3)                                = 0
getppid()                               = 5425
access("/run/WSL/5425_interop", F_OK)   = -1 ENOENT (No such file or directory)
open("/proc/5425/stat", O_RDONLY)       = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="5425 (strace) S 530 5425 530 348"..., iov_len=1024}], 2) = 320
brk(0x5ae000)                           = 0x5ae000
close(3)                                = 0
access("/run/WSL/530_interop", F_OK)    = -1 ENOENT (No such file or directory)
open("/proc/530/stat", O_RDONLY)        = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="530 (bash) S 529 530 530 34817 5"..., iov_len=1024}], 2) = 331
close(3)                                = 0
access("/run/WSL/529_interop", F_OK)    = -1 ENOENT (No such file or directory)
open("/proc/529/stat", O_RDONLY)        = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="529 (sshd) R 424 424 424 0 -1 41"..., iov_len=1024}], 2) = 167
close(3)                                = 0
access("/run/WSL/424_interop", F_OK)    = -1 ENOENT (No such file or directory)
open("/proc/424/stat", O_RDONLY)        = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="424 (sshd) S 344 424 424 0 -1 41"..., iov_len=1024}], 2) = 179
close(3)                                = 0
access("/run/WSL/344_interop", F_OK)    = -1 ENOENT (No such file or directory)
open("/proc/344/stat", O_RDONLY)        = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="344 (sshd) S 1 344 344 0 -1 4194"..., iov_len=1024}], 2) = 169
close(3)                                = 0
access("/run/WSL/1_interop", F_OK)      = 0
socket(AF_UNIX, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/run/WSL/1_interop"}, 110) = 0
write(3, "\22\0\0\0\10\0\0\0", 8)       = 8
poll([{fd=3, events=POLLIN}], 1, 10000) = 1 ([{fd=3, revents=POLLIN|POLLHUP}])
read(3, "Ubuntu-22.04", 256)            = 12
close(3)                                = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TIOCGPGRP, [5425])             = 0
getpgid(0)                              = 5425
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x1), ...}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x1), ...}) = 0
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x1), ...}) = 0
ioctl(0, TIOCGWINSZ, {ws_row=50, ws_col=361, ws_xpixel=5054, ws_ypixel=1700}) = 0
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 -opost -isig -icanon -echo ...}) = 0
                                                                                 dup(0)                                  = 3
                                                                                                                            socket(AF_VSOCK, SOCK_STREAM|SOCK_CLOEXEC, 0) = 4
                                                                                                                                                                             bind(4, {sa_family=AF_VSOCK, svm_cid=VMADDR_CID_ANY, svm_port=VMADDR_PORT_ANY, svm_flags=0}, 16) = 0
                                                                                                                                                                                                                                                                                 getsockname(4, {sa_family=AF_VSOCK, svm_cid=VMADDR_CID_ANY, svm_port=0x3aaa0d52, svm_flags=0}, [16]) = 0
                listen(4, 4)                            = 0
                                                           socket(AF_UNIX, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = 5
                                                                                                              connect(5, {sa_family=AF_UNIX, sun_path="/run/WSL/1_interop"}, 110) = 0
                                                                                                                                                                                     write(5, "\6\0\0\0T\1\0\0R\r\252:\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 340) = 340
                                                                                                                                                                                                                                                                              poll([{fd=4, events=POLLIN}], 1, 10000) = 0 (Timeout)
                                                                                                                                                                                                                                                                                                                                   getpid()                                = 5428
        writev(2, [{iov_base="<3>init: (5428) ERROR: UtilAccep"..., iov_len=63}, {iov_base=NULL, iov_len=0}], 2<3>init: (5428) ERROR: UtilAcceptVsock:244: accept4 failed 110
                                                                                                                                                                             ) = 63
                                                                                                                                                                                   close(5)                                = 0
                                                                                                                                                                                                                              close(4)                                = 0
                                                                                                                                                                                                                                                                         ioctl(3, SNDCTL_TMR_START or TCSETS, {B38400 opost isig icanon echo ...}) = 0
close(3)                                = 0
exit_group(-1)                          = ?
+++ exited with 255 +++
anatawa12@wsl-2204:~$
anatawa12@wsl-2204:~$ strace -ff "/mnt/c/Windows/system32/cmd.exe"
execve("/mnt/c/Windows/system32/cmd.exe", ["/mnt/c/Windows/system32/cmd.exe"], 0x7ffe74a603b8 /* 26 vars */) = 0
arch_prctl(ARCH_SET_FS, 0x356ce0)       = 0
set_tid_address(0x356d18)               = 6654
brk(NULL)                               = 0x895000
brk(0x896000)                           = 0x896000
gettid()                                = 6654
gettid()                                = 6654
gettid()                                = 6654
gettid()                                = 6654
sched_getaffinity(0, 128, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) = 32
brk(0x897000)                           = 0x897000
getpid()                                = 6654
getcwd("/home/anatawa12", 4096)         = 16
uname({sysname="Linux", nodename="wsl-2204", ...}) = 0
getcwd("/home/anatawa12", 4096)         = 16
open("/mnt/c/Windows/system32/cmd.exe", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_PATH) = 3
readlink("/proc/self/fd/3", "/mnt/c/Windows/system32/cmd.exe", 4095) = 31
fstat(3, {st_mode=S_IFREG|0555, st_size=331776, ...}) = 0
stat("/mnt/c/Windows/system32/cmd.exe", {st_mode=S_IFREG|0555, st_size=331776, ...}) = 0
close(3)                                = 0
open("/proc/self/mountinfo", O_RDONLY)  = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="226 85 8:32 / / rw,relatime - ex"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="oexec,relatime - cgroup cgroup r"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="fs none rw,mode=755\n248 247 0:42"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="mnt/c rw,noatime - 9p drvfs rw,d"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="tl fusectl rw\n267 226 8:32 /snap"..., iov_len=1024}], 2) = 1004
readv(3, [{iov_base="", iov_len=0}, {iov_base="", iov_len=1024}], 2) = 0
close(3)                                = 0
getcwd("/home/anatawa12", 4096)         = 16
open("/proc/self/mountinfo", O_RDONLY)  = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="226 85 8:32 / / rw,relatime - ex"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="oexec,relatime - cgroup cgroup r"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="fs none rw,mode=755\n248 247 0:42"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="mnt/c rw,noatime - 9p drvfs rw,d"..., iov_len=1024}], 2) = 1024
readv(3, [{iov_base="", iov_len=0}, {iov_base="tl fusectl rw\n267 226 8:32 /snap"..., iov_len=1024}], 2) = 1004
readv(3, [{iov_base="", iov_len=0}, {iov_base="", iov_len=1024}], 2) = 0
close(3)                                = 0
getppid()                               = 6651
access("/run/WSL/6651_interop", F_OK)   = -1 ENOENT (No such file or directory)
open("/proc/6651/stat", O_RDONLY)       = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="6651 (strace) S 530 6651 530 348"..., iov_len=1024}], 2) = 320
brk(0x898000)                           = 0x898000
close(3)                                = 0
access("/run/WSL/530_interop", F_OK)    = -1 ENOENT (No such file or directory)
open("/proc/530/stat", O_RDONLY)        = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="530 (bash) S 529 530 530 34817 6"..., iov_len=1024}], 2) = 330
close(3)                                = 0
access("/run/WSL/529_interop", F_OK)    = -1 ENOENT (No such file or directory)
open("/proc/529/stat", O_RDONLY)        = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="529 (sshd) R 424 424 424 0 -1 41"..., iov_len=1024}], 2) = 167
close(3)                                = 0
access("/run/WSL/424_interop", F_OK)    = -1 ENOENT (No such file or directory)
open("/proc/424/stat", O_RDONLY)        = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="424 (sshd) S 344 424 424 0 -1 41"..., iov_len=1024}], 2) = 179
close(3)                                = 0
access("/run/WSL/344_interop", F_OK)    = -1 ENOENT (No such file or directory)
open("/proc/344/stat", O_RDONLY)        = 3
readv(3, [{iov_base="", iov_len=0}, {iov_base="344 (sshd) S 1 344 344 0 -1 4194"..., iov_len=1024}], 2) = 169
close(3)                                = 0
access("/run/WSL/1_interop", F_OK)      = 0
socket(AF_UNIX, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/run/WSL/1_interop"}, 110) = 0
write(3, "\22\0\0\0\10\0\0\0", 8)       = 8
poll([{fd=3, events=POLLIN}], 1, 10000) = 1 ([{fd=3, revents=POLLIN|POLLHUP}])
read(3, "Ubuntu-22.04", 256)            = 12
close(3)                                = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TIOCGPGRP, [6651])             = 0
getpgid(0)                              = 6651
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x1), ...}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x1), ...}) = 0
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x1), ...}) = 0
ioctl(0, TIOCGWINSZ, {ws_row=50, ws_col=361, ws_xpixel=5054, ws_ypixel=1700}) = 0
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 -opost -isig -icanon -echo ...}) = 0
                                                                                 dup(0)                                  = 3
                                                                                                                            socket(AF_VSOCK, SOCK_STREAM|SOCK_CLOEXEC, 0) = 4
                                                                                                                                                                             bind(4, {sa_family=AF_VSOCK, svm_cid=VMADDR_CID_ANY, svm_port=VMADDR_PORT_ANY, svm_flags=0}, 16) = 0
                                                                                                                                                                                                                                                                                 getsockname(4, {sa_family=AF_VSOCK, svm_cid=VMADDR_CID_ANY, svm_port=0x3aaa0d55, svm_flags=0}, [16]) = 0
                listen(4, 4)                            = 0
                                                           socket(AF_UNIX, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = 5
                                                                                                              connect(5, {sa_family=AF_UNIX, sun_path="/run/WSL/1_interop"}, 110) = 0
                                                                                                                                                                                     write(5, "\6\0\0\0\272\0\0\0U\r\252:\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 186) = 186
                                                                                                                                                                                                                                                                                 poll([{fd=4, events=POLLIN}], 1, 10000) = 0 (Timeout)
                                                                                                                                                                                                                                                                                                                                      getpid()                                = 6654
           writev(2, [{iov_base="<3>init: (6654) ERROR: UtilAccep"..., iov_len=63}, {iov_base=NULL, iov_len=0}], 2<3>init: (6654) ERROR: UtilAcceptVsock:244: accept4 failed 110
                                                                                                                                                                                ) = 63
                                                                                                                                                                                      close(5)                                = 0
                                                                                                                                                                                                                                 close(4)                                = 0
                                                                                                                                                                                                                                                                            ioctl(3, SNDCTL_TMR_START or TCSETS, {B38400 opost isig icanon echo ...}) = 0
close(3)                                = 0
exit_group(-1)                          = ?
+++ exited with 255 +++
anatawa12@wsl-2204:~$

WslLogs-2022-08-03_15-54-53.zip

anatawa12 avatar Aug 02 '22 14:08 anatawa12

/logs

benhillis avatar Aug 02 '22 21:08 benhillis

Hello! Could you please provide more logs to help us better diagnose your issue?

To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging

Thank you!

ghost avatar Aug 02 '22 21:08 ghost

I've uploaded wsl logs.

anatawa12 avatar Aug 03 '22 06:08 anatawa12

Thanks for the logs. The issue here is that sshd is not tied to a wsl.exe or wslhost.exe on the windows side (which handles interop requests). I have some thoughts on how to fix this, let me think about it a bit.

benhillis avatar Aug 03 '22 16:08 benhillis

looks like i have the same issue

Program Files (x86)/Gpg4win/bin🔒
❯ ./pinentry.exe
<3>WSL (1330) ERROR: UtilAcceptVsock:246: accept4 failed 110

Program Files (x86)/Gpg4win/bin🔒 took 10s
❯ strace -ff ./pinentry.exe
execve("./pinentry.exe", ["./pinentry.exe"], 0x7fff08717ee8 /* 38 vars */) = 0
arch_prctl(ARCH_SET_FS, 0x3e0470)       = 0
set_tid_address(0x3e0410)               = 1512
gettid()                                = 1512
gettid()                                = 1512
gettid()                                = 1512
gettid()                                = 1512
brk(NULL)                               = 0xe75000
brk(0xe77000)                           = 0xe77000
mmap(0xe75000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xe75000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa653000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa652000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa651000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa650000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa64f000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa64e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa64d000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa64c000
sched_getaffinity(0, 128, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) = 32
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa64a000
getpid()                                = 1512
getpid()                                = 1512
uname({sysname="Linux", nodename="wsl", ...}) = 0
getcwd("/mnt/c/Program Files (x86)/Gpg4win/bin", 4096) = 39
readlink("pinentry.exe", 0x7fff593ccdd0, 4096) = -1 EINVAL (无效的参数)
getcwd("/mnt/c/Program Files (x86)/Gpg4win/bin", 4097) = 39
open("/proc/self/mountinfo", O_RDONLY|O_LARGEFILE) = 3
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa649000
read(3, "74 80 0:27 / /mnt/wsl rw,relatim"..., 1024) = 1024
read(3, "ode=000\n105 80 0:53 / /run rw,no"..., 1024) = 1024
read(3, "emory rw,nosuid,nodev,noexec,rel"..., 1024) = 1024
read(3, "dir=/systemvhd,upperdir=/system/"..., 1024) = 1024
read(3, ",mmap,access=client,msize=262144"..., 1024) = 46
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0x7f66fa649000, 4096)            = 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa646000
getcwd("/mnt/c/Program Files (x86)/Gpg4win/bin", 4096) = 39
munmap(0x7f66fa646000, 16384)           = 0
getcwd("/mnt/c/Program Files (x86)/Gpg4win/bin", 4096) = 39
open("/proc/self/mountinfo", O_RDONLY|O_LARGEFILE) = 3
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa649000
read(3, "74 80 0:27 / /mnt/wsl rw,relatim"..., 1024) = 1024
read(3, "ode=000\n105 80 0:53 / /run rw,no"..., 1024) = 1024
read(3, "emory rw,nosuid,nodev,noexec,rel"..., 1024) = 1024
read(3, "dir=/systemvhd,upperdir=/system/"..., 1024) = 1024
read(3, ",mmap,access=client,msize=262144"..., 1024) = 46
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0x7f66fa649000, 4096)            = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TIOCGPGRP, [1509])             = 0
getpgid(0)                              = 1509
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}) = 0
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}) = 0
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}) = 0
ioctl(0, TIOCGWINSZ, {ws_row=35, ws_col=150, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 -opost -isig -icanon -echo ...}) = 0
                                                                                 dup(0)                                  = 3
                                                                                                                            socket(AF_VSOCK, SOCK_STREAM|SOCK_CLOEXEC, 0) = 4
                       bind(4, {sa_family=AF_VSOCK, svm_cid=VMADDR_CID_ANY, svm_port=VMADDR_PORT_ANY, svm_flags=0}, 16) = 0
                                                                                                                           getsockname(4, {sa_family=AF_VSOCK, svm_cid=VMADDR_CID_ANY, svm_port=0x8e4f9223, svm_flags=0}, [16]) = 0
                                                                             listen(4, 4)                            = 0
                                                                                                                        getppid()
          = 1509
                access("/run/WSL/1509_interop", F_OK)   = -1 ENOENT (没有那个文件或目录)
                                                                                        open("/proc/1509/stat", O_RDONLY|O_LARGEFILE) = 5
                                                                                                                                         mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa649000
                                                                            read(5, "1509 (strace) S 9 1509 9 34816 1"..., 1024) = 316
                                                                                                                                      close(5)                                = 0
                           munmap(0x7f66fa649000, 4096)            = 0
                                                                      access("/run/WSL/9_interop", F_OK)      = -1 ENOENT (没有那个文件或目录)
                                                                                                                                              open("/proc/9/stat", O_RDONLY|O_LARGEFILE) = 5
                                      mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa649000
                                                                                                                               read(5, "9 (bash) S 8 9 9 34816 1509 4194"..., 1024) = 322
                                   close(5)                                = 0
                                                                              munmap(0x7f66fa649000, 4096)            = 0
                                                                                                                         access("/run/WSL/8_interop", F_OK)      = -1 ENOENT (没有那个文件或目录)
                                           open("/proc/8/stat", O_RDONLY|O_LARGEFILE) = 5
                                                                                         mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa649000
                            read(5, "8 (init) R 7 7 7 0 -1 4194624 20"..., 1024) = 164
                                                                                      close(5)                                = 0
                                                                                                                                 munmap(0x7f66fa649000, 4096)            = 0
                      access("/run/WSL/7_interop", F_OK)      = -1 ENOENT (没有那个文件或目录)
                                                                                              open("/proc/7/stat", O_RDONLY|O_LARGEFILE) = 5
                                                                                                                                            mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f66fa649000
                                                                               read(5, "7 (init) S 1 7 7 0 -1 4194624 21"..., 1024) = 164
                                                                                                                                         close(5)                                = 0
                              munmap(0x7f66fa649000, 4096)            = 0
                                                                         access("/run/WSL/1_interop", F_OK)      = 0
                                                                                                                    socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 5
              connect(5, {sa_family=AF_UNIX, sun_path="/run/WSL/1_interop"}, 110) = 0
                                                                                     write(5, "\7\0\0\0001\1\0\0#\222O\216\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 305) = 305
                            poll([{fd=4, events=POLLIN}], 1, 10000) = 0 (Timeout)
                                                                                 getpid()                                = 1512
                                                                                                                               writev(2, [{iov_base="<3>WSL (1512) ERROR: UtilAcceptV"..., iov_len=61}, {iov_base=NULL, iov_len=0}], 2<3>WSL (1512) ERROR: UtilAcceptVsock:246: accept4 failed 110
                                                                                                                                            ) = 61
                                                                                                                                                  close(5)                                = 0
                                       close(4)                                = 0
                                                                                  ioctl(3, SNDCTL_TMR_START or TCSETS, {B38400 opost isig icanon echo ...}) = 0
close(3)                                = 0
munmap(0x7f66fa64d000, 4096)            = 0
munmap(0x7f66fa64e000, 4096)            = 0
munmap(0x7f66fa64f000, 4096)            = 0
munmap(0x7f66fa650000, 4096)            = 0
munmap(0x7f66fa651000, 4096)            = 0
munmap(0x7f66fa653000, 4096)            = 0
exit_group(1)                           = ?
+++ exited with 1 +++

WslLogs-2023-02-06_03-22-30.zip When can we fix it?

shoucandanghehe avatar Feb 05 '23 19:02 shoucandanghehe

I'm facing this issue with Docker Desktop running from under WSL

<3>WSL (5984) ERROR: UtilAcceptVsock:248: accept4 failed 110

But not always, randomly.

speller avatar Mar 05 '23 13:03 speller

I'm also getting same issue randomly

2<3>WSL (13815) ERROR: UtilAcceptVsock:248: accept4 failed 110

logs:

socket(AF_VSOCK, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3
bind(3, {sa_family=AF_VSOCK, sa_data="\0\0\377\377\377\377\377\377\377\377\0\0\0\0"}, 16) = 0
getsockname(3, {sa_family=AF_VSOCK, sa_data="\0\0l\345Q\201\377\377\377\377\0\0\0\0"}, [16]) = 0
listen(3, 4)                            = 0
access("/run/WSL/19860_interop", F_OK)  = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 4
connect(4, {sa_family=AF_UNIX, sun_path="/run/WSL/19860_interop"}, 110) = 0
write(4, "\7\0\0\0[\1\0\0l\345Q\201\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 347) = 347
poll([{fd=3, events=POLLIN}], 1, 10000) = 0 (Timeout)
getpid()                                = 13815
writev(2, [{iov_base="<3>WSL (13815) ERROR: UtilAccept"..., iov_len=62}, {iov_base=NULL, iov_len=0}], 2<3>WSL (13815) ERROR: UtilAcceptVsock:248: accept4 failed 110
) = 62
close(4)                                = 0
close(3) 

mbilal100 avatar Mar 08 '23 05:03 mbilal100

I'm getting this issue intermittently with Docker Desktop

<3>WSL (1965) ERROR: UtilAcceptVsock:248: accept4 failed 110

WslLogs-2023-04-03_10-54-32.zip

max-dekock avatar Apr 03 '23 18:04 max-dekock

everytime execute "code .", it's always give a prompt like this "<3>WSL (51) ERROR: UtilAcceptVsock:248: accept4 failed 110" WslLogs-2023-04-06_13-44-57.zip we need to solve this problem, it's too annoying

John-zhan avatar Apr 06 '23 05:04 John-zhan

I'm also randomly getting similar issues.

In my case, I get an error(UtilAcceptVsock:248: accept4 failed 110) when I login to Ubuntu. I am using fish-shell as our Ubuntu login shell. config.fish contains the following: set -x WINDOWS_HOME_DIRECTORY (wslpath (wslvar USERPROFILE))

log is here: WslLogs-2023-04-08_22-14-38.zip

mimikun avatar Apr 07 '23 09:04 mimikun

Interesting I'm receiving the same issue <3>WSL (20931) ERROR: UtilAcceptVsock:248: accept4 failed 110

birdup000 avatar Apr 07 '23 23:04 birdup000

Hello! Could you please provide more logs to help us better diagnose your issue?

To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging

Thank you!

here's my logs WslLogs-2023-04-07_18-12-23.zip

birdup000 avatar Apr 07 '23 23:04 birdup000

As with others above, I've started getting this infrequently with some work I'm doing with Docker - previously I've been using docker for just local development which was mainly docker compose up powered which has never had this problem but this new work is related to deploying containers to ECS which involves docker build and docker push both of which are failing intermittently with this error.

My understanding is that the docker CLI on WSL is at some point talking to at least one exe managed by Docker for Windows, which could be why I'm hitting this (since everything else I'm doing is pure Ubuntu).

@OneBlue @benhillis I've not done any log collecting since it looks like there's a fair few already posted, but if either of you want to prioritize this I'm happy to be a guinea pig again to try and get any extra information you might need.

G-Rath avatar Apr 09 '23 22:04 G-Rath

In my case, enabling the interop option in wsl.conf solved the problem.
It may not be a solution in every case, but I hope it helps someone.

https://learn.microsoft.com/en-us/windows/wsl/wsl-config#interop-settings

[interop]
enable = true

ghost avatar Apr 10 '23 01:04 ghost

In my case, enabling the interop option in wsl.conf solved the problem. It may not be a solution in every case, but I hope it helps someone.

https://learn.microsoft.com/en-us/windows/wsl/wsl-config#interop-settings

[interop]
enable = true

yeah man you get it. the problem about my wsl has been fix through this method

John-zhan avatar Apr 10 '23 14:04 John-zhan

In my case, enabling the interop option in wsl.conf solved the problem. It may not be a solution in every case, but I hope it helps someone. https://learn.microsoft.com/en-us/windows/wsl/wsl-config#interop-settings

[interop]
enable = true

yeah man you get it. the problem about my wsl has been fix through this method

I have no idea how this setting can solve the problem, because the value enable doesn't exist in the official documentation.

There is a value enabled and its default true.

bigfree avatar Apr 12 '23 07:04 bigfree

I get this on occasion and removing "credsStore": "desktop.exe" from ~/.docker/config.json fixes it.

MitchellBot avatar Jun 06 '23 18:06 MitchellBot

I had the same problem and @MitchellBot's solution fixed it for me. Thanks a lot.

sherif-elmetainy avatar Jun 18 '23 09:06 sherif-elmetainy

Bizarrely, I got this error too when running an exe from WSL2 (in my case, git-credential-wincred.exe) and the "solves all" quick fix of restarting WSL apparently worked for me as well. i.e. from a command prompt:

wsl --shutdown
wsl

Also worth a shot for anyone else. Interestingly, this was only an issue for me after applying a Docker Desktop upgrade as well. Very odd.

patricknelson avatar Nov 15 '23 03:11 patricknelson

In my case, enabling the interop option in wsl.conf solved the problem.就我而言,在wsl.conf中启用互操作选项解决了问题。 It may not be a solution in every case, but I hope it helps someone.它可能不是每种情况下的解决方案,但我希望它对某人有所帮助。

https://learn.microsoft.com/en-us/windows/wsl/wsl-config#interop-settings

[interop]
enable = true

my hero!

Rcardu avatar Nov 22 '23 09:11 Rcardu

Bizarrely, I got this error too when running an exe from WSL2 (in my case, git-credential-wincred.exe) and the "solves all" quick fix of restarting WSL apparently worked for me as well. i.e. from a command prompt:

wsl --shutdown
wsl

Also worth a shot for anyone else. Interestingly, this was only an issue for me after applying a Docker Desktop upgrade as well. Very odd.

This worked for the similar issue that I had. The ERROR code was UtilAcceptVsock:250 instead of UtilAcceptVsock:246.

Moscode avatar Jul 03 '24 11:07 Moscode

Still getting this error when trying to run a llamafile in WSL2. @benhillis quick mention to see if this is on the team's radar?

ColumbusAI avatar Sep 13 '24 02:09 ColumbusAI

In my case, enabling the interop option in wsl.conf solved the problem. It may not be a solution in every case, but I hope it helps someone. https://learn.microsoft.com/en-us/windows/wsl/wsl-config#interop-settings

[interop]
enable = true

yeah man you get it. the problem about my wsl has been fix through this method

I have no idea how this setting can solve the problem, because the value enable doesn't exist in the official documentation.

There is a value enabled and its default true.

@bigfree is correct. Adding this to your config will cause a wsl: Unknown key 'interop.enable' error.

Bizarrely, I got this error too when running an exe from WSL2 (in my case, git-credential-wincred.exe) and the "solves all" quick fix of restarting WSL apparently worked for me as well. i.e. from a command prompt:

wsl --shutdown
wsl

Also worth a shot for anyone else. Interestingly, this was only an issue for me after applying a Docker Desktop upgrade as well. Very odd.

This is what worked for me.

kodie avatar Sep 19 '24 14:09 kodie

To clarify, the error I receive is this:

<3>WSL (5984) ERROR: UtilAcceptVsock:248: accept4 failed 110

It is not resolved by enabling or disabling Interop as I have tried both methods.

ColumbusAI avatar Sep 19 '24 18:09 ColumbusAI

I had the same issue and I remarked that most of WSL RAM was used I stopped one vscode that was taking more than 4GB of memory ! I re-run vscode and this error disappeared

fchastanet avatar Oct 21 '24 07:10 fchastanet

From microsoft/wslg#1308

I am running NixOS 24.05 and this issue happens to me when trying to use win32yank.exe from WSL.

nouritsu avatar Feb 21 '25 23:02 nouritsu

I sometimes get this error when running docker builds. Docker is using the WSL 2 based engine:

$ docker compose build --no-cache web api
[+] Building 12.6s (4/4) FINISHED                                                                        
 => [internal] load local bake definitions                                                          0.0s
 => => reading from stdin 977B                                                                      0.0s
 => [api internal] load build definition from Dockerfile                                            0.1s
 => => transferring dockerfile: 565B                                                                0.1s
 => [web internal] load build definition from Dockerfile                                            0.1s
 => => transferring dockerfile: 685B                                                                0.1s
 => ERROR [api internal] load metadata for docker.io/library/node:20-alpine                        11.0s
------
 > [api internal] load metadata for docker.io/library/node:20-alpine:
------
<3>WSL (15068) ERROR: UtilAcceptVsock:250: accept4 failed 110

Dockerfile:1

--------------------

   1 | >>> FROM node:20-alpine

   2 |     

   3 |     # Optional: tools for healthchecks or debugging

--------------------

target api: failed to solve: error getting credentials - err: exit status 1, out: ``

A restart of my computer sorts it, but's very annoying.

davelowndes avatar Oct 04 '25 03:10 davelowndes

This is the best incantation I know to restart WSL as background job without leaving an Administrator PowerShell console open:

wsl --shutdown; Start-Process wsl

Then close the PowerShell console.

mslinn avatar Nov 03 '25 01:11 mslinn

I also had same issue while opening the VSCode through WSL window.

  1. Opened the CMD promp ran: wsl --shutdown (it restarted the docker window).
  2. Closed the WSL window and reopened it.
  3. Now I did "code ." it worked.

Thanks.

MadhaviGunapati610 avatar Nov 14 '25 11:11 MadhaviGunapati610