-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Windows Version
Microsoft Windows [Version 10.0.26100.7309]
WSL Version
2.6.1.0
Are you using WSL 1 or WSL 2?
- WSL 2
- WSL 1
Kernel Version
6.6.87.2-1
Distro Version
Ubuntu 24.04.3 LTS (Noble Numbat)
Other Software
- VS Code with Remote - WSL extension
- Git credential helper configured via VS Code (
GIT_ASKPASSenvironment variable)
Repro Steps
❯ git push
<3>WSL (40941 - ) ERROR: UtilAcceptVsock:271: accept4 failed 110
^C
To capture detailed trace:
strace -f -o strace.log git pushThe strace log shows the following sequence:
git pushspawns a child process to handle the remote connection- Parent and child communicate via pipes
- Git sends protocol commands (
capabilities,option progress false,list for-push) - While waiting for a response, the WSL interop layer encounters a timeout on
accept4for a vsock - The
read()syscall returnsERESTARTSYSand the process hangs
Relevant strace excerpt:
write(4, "list for-push\n", 14) = 14
read(3, <3>WSL (40941 - ) ERROR: UtilAcceptVsock:271: accept4 failed 110
0x..., 4096) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
Error code 110 = ETIMEDOUT (Connection timed out)
Expected Behavior
Git push should complete successfully without hanging.
Actual Behavior
Git often fails to push to the remote because of a network issue triggered by WSL. The command hangs indefinitely and must be killed with Ctrl+C.
The only temporary fix I've found is restarting VS Code, but the problem eventually returns.
Root Cause Hypothesis:
The vsock (Hyper-V socket) is used for communication between the WSL2 VM and the Windows host. The UtilAcceptVsock function is part of WSL's internal infrastructure handling these connections.
The timeout (error 110) suggests the Windows-side service that should accept the vsock connection is:
- Not responding
- Taking too long to respond
- In a blocked or crashed state
Potential triggers:
- VS Code's Git Credential Helper integration (
GIT_ASKPASSenvironment variable is set) - Windows SSH agent or Credential Manager interop
- WSL networking stack under load or in a degraded state
- Hyper-V socket infrastructure issue between WSL2 VM and Windows host
Environment variables set during failure:
WSL2_GUI_APPS_ENABLED=1WSL_DISTRO_NAME=UbuntuWSL_INTEROP=/run/WSL/457_interopGIT_ASKPASS(pointing to VS Code's credential helper)VSCODE_GIT_ASKPASS_*variables