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

fix: connection leaks #624

Merged
merged 6 commits into from
Sep 26, 2024
Merged

fix: connection leaks #624

merged 6 commits into from
Sep 26, 2024

Conversation

mzz2017
Copy link
Contributor

@mzz2017 mzz2017 commented Sep 8, 2024

Background

Many users have reported continuous memory growth in dae, possibly due to coroutine leaks.

This phenomenon is even more obvious when the network is disconnected. A very suspicious object is that our dialer does not implement DialContext, resulting in the timeout mechanism not being triggered when calling down.

This PR attempts to fix this problem.

image

Checklist

Full Changelogs

  • Implement DialContext for dialers.
  • Close misclosed underlay UDP connection for tuic/juicity.

Issue Reference

Closes #[issue number]

Test Result

@mzz2017 mzz2017 requested a review from a team as a code owner September 8, 2024 15:18
@dae-prow
Copy link
Contributor

dae-prow bot commented Sep 17, 2024

❌ Your branch is currently out-of-sync to main. No worry, I will fix it for you.

@mzz2017 mzz2017 changed the title fix: implement DialContext for dialers to reduce the risk of leaks fix: connection leaks Sep 18, 2024
@dae-prow
Copy link
Contributor

dae-prow bot commented Sep 18, 2024

❌ Your branch is currently out-of-sync to main. No worry, I will fix it for you.

@mzz2017 mzz2017 force-pushed the mzz/fix_dial_context branch from eed06b3 to 2ca199c Compare September 18, 2024 14:58
@QiuSimons
Copy link

这个patch甚至解决了在低性能arm机型上,当dae的上游dns是udp协议的时候,暴力用dnsbenchmark会导致dae死透,dns无响应的问题
btw,这两个commit,需要在wing那边做对应适配(dae-wing/dae/run.go#L139)
c3c06c4
768595b

dae-prow[bot]
dae-prow bot previously approved these changes Sep 26, 2024
Copy link
Contributor

@dae-prow dae-prow bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 Since the PR has been fully tested, please consider merging it.

@dae-prow
Copy link
Contributor

dae-prow bot commented Sep 26, 2024

❌ Your branch is currently out-of-sync to main. No worry, I will fix it for you.

@mzz2017 mzz2017 merged commit 218ae3f into main Sep 26, 2024
29 checks passed
@mzz2017 mzz2017 deleted the mzz/fix_dial_context branch September 26, 2024 14:40
sumire88 pushed a commit that referenced this pull request Sep 27, 2024
Co-authored-by: dae-prow[bot] <136105375+dae-prow[bot]@users.noreply.github.com>
(cherry picked from commit 218ae3f)
@mzz2017 mzz2017 added this to the dae 0.7.2 milestone Sep 27, 2024
mzz2017 added a commit that referenced this pull request Sep 27, 2024
Co-authored-by: dae-prow[bot] <136105375+dae-prow[bot]@users.noreply.github.com>
@digua-cn
Copy link

digua-cn commented Oct 8, 2024

0.7.4 版本 vless协议不能用 是什么情况

@mzz2017
Copy link
Contributor Author

mzz2017 commented Oct 8, 2024

@digua-cn 先用 0.8.0 吧

@dae-prow dae-prow bot mentioned this pull request Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants