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

Stuck "shutting down" if system private DNS is enabled but is not reachable #2222

Closed
Mygod opened this issue May 30, 2019 · 0 comments
Closed

Comments

@Mygod
Copy link
Contributor

Mygod commented May 30, 2019

To reproduce this bug:

  1. Use Android 9 or Q beta (master branch required as Enhancements for Android Q beta #2161 should have fixed this for Android Q by using new non-blocking APIs, but still reproducible on Android 9); (I have not tried to reproduce this on Android Q yet)
  2. Enable private DNS (set it to dns.google or something);
  3. Wait for system to verify the private DNS is working (it should show dns.google in system settings below "Private DNS");
  4. Simulate network instability using su -c 'iptables -I INPUT -p tcp --sport 853 -j DROP' (drops all incoming DNS over TLS traffic);
  5. Enable Shadowsocks VPN with route set to bypass China; (so that local DNS resolving is enabled)
  6. Tap test Internet connectivity a lot of times (>64 times to be safe so that IO thread pool would be full);
  7. Attempt to shut down service. (if the bug did not occur, go back to 5)

What happened: All IO threads are blocked at native call android_getaddrinfo, specifically, fread, which never returns.

Curiously, this does not happen for regular DNS traffic as there seems to be timeouts for those, but not for DNS for TLS.

Reported this to AOSP: https://issuetracker.google.com/issues/133874590

@Mygod Mygod closed this as completed in 667a9f9 Jul 18, 2019
bannedbook pushed a commit to bannedbook/SpeedUp.VPN that referenced this issue Dec 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant