Disable IPv6 on older phones |
|||
Issue descriptionCertain Android phones (Samsung phones including S4, S5, S6 on L and earlier, depending on carrier) blackhole ipv6 packets when the screen is locked - basically dropping an interface. This is an issue with long-lived connections that basically stall out. https://bugs.chromium.org/p/chromium/issues/detail?id=696569 addresses this for Cronet by exposing an experimental API which can disable IPv6, but it's up to Cronet embedders to choose when to do it. Given that this is a general phone/device issue, it might be good to bring this logic into Chrome/Cronet's net stack natively. There are two possible solutions: - Only allow IPv4 addresses. - Allow A/AAAA, but connect to IPv4 addresses unless IPv6 is the only option (sad eyeballs)
,
Mar 3 2017
Agreed with all those constraints.
,
Mar 8 2017
(Android devices running Android 6.0.1 or later should have passed the ConnectivityScreenOffTestActivity CTS test, which checks for this misbehaviour.)
,
Apr 4 2017
I looked at this. Given how the code is currently structured, the "sad eyeballs" suggestion would be a mess to implement when using the system resolver, but disallowing ipv6 entirely under the conditions Paul listed is very feasible. I can plumb it through as a Cronet-only feature if people don't want it in Chrome, but my preference is for adding it in Chrome and keeping an eye on metrics.
,
Apr 4 2017
Before we do anything, can we find out how whether this is a problem for Chrome? Adding a workaround is easy, but removing it can be hard. Can we make sure the code complexity is justified?
,
Apr 4 2017
I don't expect this to be a net change in code complexity, since this is just adding a few simple checks in one place and it'll allow us to revert https://codereview.chromium.org/2709393007/. And we're pretty sure we need a better solution in Cronet than what we have right now, so the code is going to get added anyway, the question is whether we want it enabled in Chrome or not.
,
Apr 4 2017
I don't know a way of telling from metrics whether this is causing a problem right now. We'll be able to watch for changes once it's implemented, though.
,
Apr 5 2017
We may want to measure the impact of this problem before taking action that might have adverse side-effects. I don't imagine Chrome performing many network requests while the screen is locked. net::UrlRequest::OnSuspend() cancels requests when the device suspends and net::HttpNetworkLayer::OnSuspend() closes idle connections on Windows; these actions should decrease the number of network requests active when the screen is locked.
,
Apr 5 2017
OnSuspend() doesn't exist on Android: https://cs.chromium.org/chromium/src/base/power_monitor/power_monitor_device_source_android.cc?l=28 The use case mentioned in issue 644515 seems like one that might be affected by the IPv6 issue, but I can't think of a good way to measure impact without running an experiment. So I'll have to implement the workaround in a way that can be turned on only for Cronet anyway, because it's definitely needed there, and then it'll be there to run an experiment in Chrome with if we want to in the future.
,
Mar 23 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by pauljensen@chromium.org
, Mar 3 2017