moby / moby/vpnkit

vpnkit is using all available Sockets on windows

Open
#493 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
OCaml
Stars
1.2k
Forks
214
PR merge metrics
No merged PRs in 30d

Description

It's been months that I have this issue.

When working with Docker on Windows, after some hours of works, I have many connections error. (All with the no buffer space available maximum connections reached error).

Recently, I tried the powershell command Get-NetTCPConnection, and I can see that I got more than 50k Socket opened with vpnkit.exe with a Bound state.

The BOUND state is the state a socket shows after it is created and the 'bind()' call is made, but none of the 'listen()', 'accept()', 'connect()' or 'close()' calls have been made. The confusion is that it is not a TCP state, it is a socket state, but it appears in the field that 'netstat' usually uses for TCP state info.

When killing vpnkit.exe process, everything's back to normal... for a moment, then I have to re-kill vpnkit.exe.

I'm not sure how to exactly pinpoint this issue. Is there anything doable ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with Docker on Windows and inspect vpnkit.exe using PowerShell's Get-NetTCPConnection, focusing on sockets in the Bound state. Use the reported connection exhaustion as the failure signal; done means vpnkit no longer accumulates tens of thousands of bound sockets and Docker connections remain usable over time.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml, powershell
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.