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

Mygod opened this issue May 30, 2019 · 0 comments


Copy link

commented May 30, 2019

To reproduce this bug:

  1. Use Android 9 or Q beta (master branch required as #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 or something);
  3. Wait for system to verify the private DNS is working (it should show 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:

@Mygod Mygod closed this in 667a9f9 Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.