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

the computer will block all networking after using this vpn view the first page of youtube.com #1

Open
5ngs94jzqw opened this issue Jun 3, 2019 · 0 comments

Comments

@5ngs94jzqw
Copy link

5ngs94jzqw commented Jun 3, 2019

The computer will block all networking after using this vpn view the home page of youtube.com.(may be the vpn client is too away from the vpn server, rtt is above 100ms)
The VpnPlugin.Encapsulate/Decapsulate will not be called any more.
The disconnect button will block, and do not have any effect.
When this bug happened there will be 700-800 threads in the ToyVpn.exe
All those threads blocking at VpnChannel.ProcessEventAsync except mainThread from the threads window of vs2017

Workaround:

  • Add code in VpnBackgroundTask::Run (IBackgroundTask.Run) to tracking the concurrent callers number in the process, if the concurrent callers is above 1 (a small number like 10 is also ok),then return this VpnBackgroundTask::Run function and do not call VpnChannel.ProcessEventAsync.(ignore this task request)(ask those huge number of rubbish threads exit quickly.)

  • Ignore task request after connect , do not cause any network packet lost.

  • Only process one taskInstance in one process will cause only the first connect work, second click on connect will not work.

  • Add Mutex lock to the whole function of IBackgroundTask.Run will not workaround this problem. It looks ignore the task request is the key of this workaround.

Environment:
vs 2017
OS build 17763.503

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

No branches or pull requests

1 participant