Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

socket(AF_VSOCK, SOCK_STREAM|SOCK_CLOEXEC, 0) = -1 ENOSYS (Function not implemented) #12268

Open
1 of 2 tasks
wanglong001 opened this issue Nov 14, 2024 · 7 comments
Open
1 of 2 tasks

Comments

@wanglong001
Copy link

Windows Version

Microsoft Windows [Version 10.0.22631.4460]

WSL Version

2.3.26.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

Linux version 5.15.167.4-microsoft-standard-WSL2

Distro Version

Ubuntu 22.04

Other Software

Docker version 27.3.1, build ce12230

Repro Steps

Cross-compile Linux service on Windows, then run it on Docker.

In Windows

SET GOOS=linux 
go build -o .\run_server .

run server in Docker

./run_server

Expected Behavior

no exception

Actual Behavior

root@b3b95375ee86:/app/51# ./run_server
<3>WSL (6598) ERROR: UtilBindVsockAnyPort:287: socket failed 38

strace logs

munmap(0x7f853149d000, 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, [5563])             = 0
getpgid(0)                              = 5563
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=52, ws_col=179, 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) = -1 ENOSYS (Function not implemented)
                             getpid()                                = 5566
                                                                           writev(2, [{iov_base="<3>WSL (5566) ERROR: UtilBindVso"..., iov_len=64}, {iov_base=NULL, iov_len=0}], 2<3>WSL (5566) ERROR: UtilBindVsockAnyPort:287: socket failed 38
                                                              ) = 64
                                                                    ioctl(3, SNDCTL_TMR_START or TCSETS, {B38400 opost isig icanon echo ...}) = 0
close(3)                                = 0

Diagnostic Logs

time="2024-11-14T10:16:22.759464238+08:00" level=info msg="Starting up"
time="2024-11-14T10:16:22.761085133+08:00" level=info msg="containerd not running, starting managed containerd"
time="2024-11-14T10:16:22.761540281+08:00" level=info msg="started new containerd process" address=/var/run/docker/containerd/containerd.sock module=libcontainerd pid=4529
time="2024-11-14T10:16:22.776230712+08:00" level=info msg="starting containerd" revision=61f9fd88f79f081d64d6fa3bb1a0dc71ec870523 version=1.6.24
time="2024-11-14T10:16:22.783982004+08:00" level=info msg="loading plugin \"io.containerd.content.v1.content\"..." type=io.containerd.content.v1
time="2024-11-14T10:16:22.784031440+08:00" level=info msg="loading plugin \"io.containerd.snapshotter.v1.aufs\"..." type=io.containerd.snapshotter.v1
time="2024-11-14T10:16:22.789081321+08:00" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.aufs\"..." error="aufs is not supported (modprobe aufs failed: exit status 1 \"modprobe: FATAL: Module aufs not found in directory /lib/modules/5.15.167.4-microsoft-standard-WSL2\\n\"): skip plugin" type=io.containerd.snapshotter.v1
time="2024-11-14T10:16:22.789113045+08:00" level=info msg="loading plugin \"io.containerd.snapshotter.v1.btrfs\"..." type=io.containerd.snapshotter.v1
time="2024-11-14T10:16:22.789251873+08:00" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.btrfs\"..." error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs (ext4) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
time="2024-11-14T10:16:22.789260698+08:00" level=info msg="loading plugin \"io.containerd.snapshotter.v1.devmapper\"..." type=io.containerd.snapshotter.v1
time="2024-11-14T10:16:22.789269368+08:00" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.devmapper" error="devmapper not configured"
time="2024-11-14T10:16:22.789274527+08:00" level=info msg="loading plugin \"io.containerd.snapshotter.v1.native\"..." type=io.containerd.snapshotter.v1
time="2024-11-14T10:16:22.789290496+08:00" level=info msg="loading plugin \"io.containerd.snapshotter.v1.overlayfs\"..." type=io.containerd.snapshotter.v1
time="2024-11-14T10:16:22.789346974+08:00" level=info msg="loading plugin \"io.containerd.snapshotter.v1.zfs\"..." type=io.containerd.snapshotter.v1
time="2024-11-14T10:16:22.789429533+08:00" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.zfs\"..." error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
time="2024-11-14T10:16:22.789436260+08:00" level=info msg="loading plugin \"io.containerd.metadata.v1.bolt\"..." type=io.containerd.metadata.v1
time="2024-11-14T10:16:22.789444911+08:00" level=warning msg="could not use snapshotter devmapper in metadata plugin" error="devmapper not configured"
time="2024-11-14T10:16:22.789449421+08:00" level=info msg="metadata content store policy set" policy=shared
time="2024-11-14T10:16:22.789530094+08:00" level=info msg="loading plugin \"io.containerd.differ.v1.walking\"..." type=io.containerd.differ.v1
time="2024-11-14T10:16:22.789539726+08:00" level=info msg="loading plugin \"io.containerd.event.v1.exchange\"..." type=io.containerd.event.v1
time="2024-11-14T10:16:22.789545655+08:00" level=info msg="loading plugin \"io.containerd.gc.v1.scheduler\"..." type=io.containerd.gc.v1
time="2024-11-14T10:16:22.789558824+08:00" level=info msg="loading plugin \"io.containerd.service.v1.introspection-service\"..." type=io.containerd.service.v1
time="2024-11-14T10:16:22.789566324+08:00" level=info msg="loading plugin \"io.containerd.service.v1.containers-service\"..." type=io.containerd.service.v1
time="2024-11-14T10:16:22.789573110+08:00" level=info msg="loading plugin \"io.containerd.service.v1.content-service\"..." type=io.containerd.service.v1
time="2024-11-14T10:16:22.789591839+08:00" level=info msg="loading plugin \"io.containerd.service.v1.diff-service\"..." type=io.containerd.service.v1
time="2024-11-14T10:16:22.789601782+08:00" level=info msg="loading plugin \"io.containerd.service.v1.images-service\"..." type=io.containerd.service.v1
time="2024-11-14T10:16:22.789609349+08:00" level=info msg="loading plugin \"io.containerd.service.v1.leases-service\"..." type=io.containerd.service.v1
time="2024-11-14T10:16:22.789616107+08:00" level=info msg="loading plugin \"io.containerd.service.v1.namespaces-service\"..." type=io.containerd.service.v1
time="2024-11-14T10:16:22.789622315+08:00" level=info msg="loading plugin \"io.containerd.service.v1.snapshots-service\"..." type=io.containerd.service.v1
time="2024-11-14T10:16:22.789628375+08:00" level=info msg="loading plugin \"io.containerd.runtime.v1.linux\"..." type=io.containerd.runtime.v1
time="2024-11-14T10:16:22.789644969+08:00" level=info msg="loading plugin \"io.containerd.runtime.v2.task\"..." type=io.containerd.runtime.v2
time="2024-11-14T10:16:22.789662541+08:00" level=info msg="loading plugin \"io.containerd.monitor.v1.cgroups\"..." type=io.containerd.monitor.v1
time="2024-11-14T10:16:22.789892657+08:00" level=info msg="loading plugin \"io.containerd.service.v1.tasks-service\"..." type=io.containerd.service.v1
time="2024-11-14T10:16:22.789920434+08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.introspection\"..." type=io.containerd.grpc.v1
time="2024-11-14T10:16:22.789928819+08:00" level=info msg="loading plugin \"io.containerd.internal.v1.restart\"..." type=io.containerd.internal.v1
time="2024-11-14T10:16:22.789970740+08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.containers\"..." type=io.containerd.grpc.v1
time="2024-11-14T10:16:22.789978943+08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.content\"..." type=io.containerd.grpc.v1
time="2024-11-14T10:16:22.789990942+08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.diff\"..." type=io.containerd.grpc.v1
time="2024-11-14T10:16:22.789999590+08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.events\"..." type=io.containerd.grpc.v1
time="2024-11-14T10:16:22.790006758+08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.healthcheck\"..." type=io.containerd.grpc.v1
time="2024-11-14T10:16:22.790013015+08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.images\"..." type=io.containerd.grpc.v1
time="2024-11-14T10:16:22.790020836+08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.leases\"..." type=io.containerd.grpc.v1
time="2024-11-14T10:16:22.790026835+08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.namespaces\"..." type=io.containerd.grpc.v1
time="2024-11-14T10:16:22.790034844+08:00" level=info msg="loading plugin \"io.containerd.internal.v1.opt\"..." type=io.containerd.internal.v1
time="2024-11-14T10:16:22.790057467+08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.snapshots\"..." type=io.containerd.grpc.v1
time="2024-11-14T10:16:22.790063124+08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.tasks\"..." type=io.containerd.grpc.v1
time="2024-11-14T10:16:22.790068853+08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.version\"..." type=io.containerd.grpc.v1
time="2024-11-14T10:16:22.790074754+08:00" level=info msg="loading plugin \"io.containerd.tracing.processor.v1.otlp\"..." type=io.containerd.tracing.processor.v1
time="2024-11-14T10:16:22.790082529+08:00" level=info msg="skip loading plugin \"io.containerd.tracing.processor.v1.otlp\"..." error="no OpenTelemetry endpoint: skip plugin" type=io.containerd.tracing.processor.v1
time="2024-11-14T10:16:22.790088223+08:00" level=info msg="loading plugin \"io.containerd.internal.v1.tracing\"..." type=io.containerd.internal.v1
time="2024-11-14T10:16:22.790098358+08:00" level=error msg="failed to initialize a tracing processor \"otlp\"" error="no OpenTelemetry endpoint: skip plugin"
time="2024-11-14T10:16:22.791073925+08:00" level=info msg=serving... address=/var/run/docker/containerd/containerd-debug.sock
time="2024-11-14T10:16:22.801546900+08:00" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock.ttrpc
time="2024-11-14T10:16:22.811653529+08:00" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock
time="2024-11-14T10:16:22.811696348+08:00" level=info msg="containerd successfully booted in 0.035841s"
time="2024-11-14T10:16:22.838995804+08:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
time="2024-11-14T10:16:22.840790002+08:00" level=info msg="Loading containers: start."
time="2024-11-14T10:16:22.845008373+08:00" level=info msg="unable to detect if iptables supports xlock: 'iptables --wait -L -n': `iptables v1.8.7 (nf_tables): table `filter' is incompatible, use 'nft' tool.`" error="exit status 1"
time="2024-11-14T10:16:24.537411122+08:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
time="2024-11-14T10:16:25.204381129+08:00" level=info msg="Loading containers: done."
time="2024-11-14T10:16:25.212858049+08:00" level=warning msg="WARNING: No blkio throttle.read_bps_device support"
time="2024-11-14T10:16:25.212872471+08:00" level=warning msg="WARNING: No blkio throttle.write_bps_device support"
time="2024-11-14T10:16:25.212875672+08:00" level=warning msg="WARNING: No blkio throttle.read_iops_device support"
time="2024-11-14T10:16:25.212878207+08:00" level=warning msg="WARNING: No blkio throttle.write_iops_device support"
time="2024-11-14T10:16:25.212890509+08:00" level=info msg="Docker daemon" commit=311b9ff graphdriver=overlay2 version=24.0.7
time="2024-11-14T10:16:25.212908722+08:00" level=info msg="Daemon has completed initialization"
time="2024-11-14T10:16:25.237600561+08:00" level=info msg="API listen on /var/run/docker.sock"
Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How 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 script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

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

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@wanglong001
Copy link
Author

wanglong001 commented Nov 14, 2024

The similar issues mentioned above do not resolve my problem.

I don't encounter this issue when starting the service with Python.

@wanglong001
Copy link
Author

/question

Copy link

Diagnostic information
Found '/question', adding tag 'question'

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 18, 2024

/logs

@wanglong001
Copy link
Author

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

If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue.

Thank you!

WslLogs-2024-11-21_15-44-28.zip

Copy link

The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.

Diagnostic information
.wslconfig found
Detected appx version: 2.3.26.0
Found no WSL traces in the logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants