vpnkit-bridge.exe having too many handles open #5841
Comments
grepfruit commented Feb 21, 2020
Expected behavior
vpnkit-bridge.exe has a reasonable amount of handles and a reasonable active memory working set.
Actual behavior
vpnkit-bridge.exe has 563153 system handles as reported by Task Manager and a working set of 625272K, which seems like too much.
Information
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered:
jaireth commented Mar 29, 2020
dfoster-cb911 commented Mar 29, 2020
Getting this myself 😭
Windows Version: Windows 10 Pro
Docker Desktop Version: 2.2.0.4(43472)
Are you running inside a virtualized Windows e.g. on a cloud server or on a mac VM: No
cjrh commented Apr 3, 2020
Windows Version: Windows 10 Pro
Docker Desktop Version: 2.2.0.5 (43884)
grepfruit commented Apr 3, 2020
cjrh commented Apr 5, 2020
Running this and filtering for the named pipe docker_engine_linux every few seconds:
The column headers, not shown above because grep removes them, are:
As I said in my previous comment, this rate of increase in the instances is much lower when I have not connected PyCharm to docker. PyCharm connects to docker via the legacy tcp://localhost:2375 endpoint.
In the docker log file, I have copied below a section that corresponds to a similar time window as the output from PipeList above, to show that something, presumably PyCharm, is frequently hitting the docker API endpoint to read the current state. I imagine this is how PyCharm maintains its state to reflect docker state:
log file: C:\Users\caleb\AppData\Roaming\Docker\log\vm\docker.log
(There is an offest of 10 hours because the PS dates are in UTC+10 and the docker logs are in UTC).
So it looks like each of these GET requests is allocating resources but not freeing them when the response is returned.
That is what we’re seeing in task manager:
Vpnkit exe что это
VPN-friendly networking devices for HyperKit
Binary artefacts are built by CI:
VPNKit is a set of tools and services for helping HyperKit VMs interoperate with host VPN configurations.
Building on Unix (including Mac)
If you are an existing opam user then you can either build against your existing opam package universe, or the custom universe contained in this repo. To use the custom universe, ensure that you unset your OPAMROOT environment variable:
The first build will take a little longer as it will build all the package dependencies first.
When the build succeeds the vpnkit.exe binary should be available in the current directory.
Building on Windows
First install the OCaml environment with Cygwin. Note that although the Cygwin tools are needed for the build scripts, Cygwin itself will not be linked to the final executable.
Inside the OCaml64 (Cygwin) shell, unset the OPAMROOT environment and build by:
The first build will take a little longer as it will build all the package dependencies first.
When the build succeeds the vpnkit.exe binary should be available in the current directory.
Running with hyperkit
First ask vpnkit to listen for ethernet connections on a local Unix domain socket:
Why is this needed?
VPNKit, part of HyperKit attempts to work nicely with VPN software by intercepting the VM traffic at the Ethernet level, parsing and understanding protocols like NTP, DNS, UDP, TCP and doing the «right thing» with respect to the host’s VPN configuration.
VPNKit operates by reconstructing Ethernet traffic from the VM and translating it into the relevant socket API calls on OSX or Windows. This allows the host application to generate traffic without requiring low-level Ethernet bridging support.
VPNKit is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.
Contributions are welcome under the terms of this license. You may wish to browse the weekly reports to read about overall activity in the repository.
About
A toolkit for embedding VPN capabilities in your application



