New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 738542 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Do not start a scan on DefaultNetwork change if Internet connection exists

Project Member Reported by hansberry@chromium.org, Jun 30 2017

Issue description

We need to block either the notification or a new scan for some amount of time (30-60 seconds?) after any host connection attempt (regardless of success/failure).
 
Summary: Host scans are triggered under incorrect circumstances (was: A host scan is kicked off right after a host connection fails)
Additionally, another scan is kicked off anytime a network disconnection occurs, even if a Tether connection is in progress.

Example:
1) Connect to Ethernet.
2) Connect to Tether.
3) Disconnect Ethernet, but maintain Tether connection.

Expected: No scan.
Actual: Scan triggered.
Owner: hansberry@chromium.org
Status: Assigned (was: Available)
Summary: Correct host scan behavior when a Tether connection is in progress or exists (was: Host scans are triggered under incorrect circumstances)
Expectations of the fix for this issue:

a) do not begin a host scan on DefaultNetwork loss if a Tether connection is in progress.
b) do not display any host scan notifications if a host connection is in progress or exists.
Summary: Do not start a scan on DefaultNetwork change if Internet connection exists (was: Correct host scan behavior when a Tether connection is in progress or exists)
Fix part (b) from comment #2 will be fixed as part of https://bugs.chromium.org/p/chromium/issues/detail?id=738108.

Repurposing this bug to be simply: do not start a scan in DefaultNetworkChanged() if there still is a default network. Currently, we start a new scan on all DefaultNetworkChanged() calls.

https://cs.chromium.org/chromium/src/chromeos/components/tether/host_scan_scheduler.cc?q=DefaultNetworkChanged
Owner: lesliewatkins@chromium.org
Status: Started (was: Assigned)
This actually works as intended.

The problem is that when Ethernet is disconnected, the default network doesn't immediately change to Tether. OnNetworkConnectionStateChanged is called when Ethernet is still considered the default network, which results in this log:

[10694:10694:0802/123856.528782:ERROR:device_event_log_impl.cc(156)] [12:38:56.528] Network: network_state_handler.cc:1502 Default network in unexpected state: Ethernet (/service/997)State: idle

This clears the default network temporarily, which is what triggers a scan.

(see https://cs.chromium.org/chromium/src/chromeos/network/network_state_handler.cc?rcl=bc18f3cd2ed47b1df4700934a5fb659ad29ab6b7&l=1487)

Status: WontFix (was: Started)
Status: Assigned (was: WontFix)
This isn't working as intended. We shouldn't be starting a scan in this case.
Status: Started (was: Assigned)
Project Member

Comment 10 by bugdroid1@chromium.org, Aug 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6c644529bf5dc1886a2dd0dbdc24f12029eeca08

commit 6c644529bf5dc1886a2dd0dbdc24f12029eeca08
Author: Leslie Watkins <lesliewatkins@chromium.org>
Date: Thu Aug 03 20:42:28 2017

Do not start a scan when the Default network changes unless both the Default network and the Tether network are disconnected.

This is done to prevent a scan from starting when Ethernet and Tether are both connected, and then Ethernet is disconnected (but Tether remains connected).

This CL also ensures a scan on login, regardless of whether or not the Default network is connected.

Bug: 672263,  738542 
Change-Id: I062fdc3dc825df6a6e986db80964fa92732774f7
Reviewed-on: https://chromium-review.googlesource.com/598940
Commit-Queue: Leslie Watkins <lesliewatkins@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491834}
[modify] https://crrev.com/6c644529bf5dc1886a2dd0dbdc24f12029eeca08/chromeos/components/tether/host_scan_scheduler.cc
[modify] https://crrev.com/6c644529bf5dc1886a2dd0dbdc24f12029eeca08/chromeos/components/tether/host_scan_scheduler.h
[modify] https://crrev.com/6c644529bf5dc1886a2dd0dbdc24f12029eeca08/chromeos/components/tether/host_scan_scheduler_unittest.cc
[modify] https://crrev.com/6c644529bf5dc1886a2dd0dbdc24f12029eeca08/chromeos/components/tether/host_scanner.h
[modify] https://crrev.com/6c644529bf5dc1886a2dd0dbdc24f12029eeca08/chromeos/components/tether/initializer.cc

Labels: Merge-Request-61
Status: Fixed (was: Started)
Status: Started (was: Fixed)
Not fixed until it's been merged.
Labels: -Merge-Request-61 Merge-Approved-61
Approving merge to M61 Chrome OS.
Status: Fixed (was: Started)
Status: Started (was: Fixed)
Not fixed until it's been merged.
Project Member

Comment 17 by bugdroid1@chromium.org, Aug 4 2017

Labels: -merge-approved-61 merge-merged-3163
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4b0b385ad5eba8d657b9a20061b5c2c239e1afd3

commit 4b0b385ad5eba8d657b9a20061b5c2c239e1afd3
Author: Kyle Horimoto <khorimoto@google.com>
Date: Fri Aug 04 01:16:00 2017

Do not start a scan when the Default network changes unless both the Default network and the Tether network are disconnected.

This is done to prevent a scan from starting when Ethernet and Tether are both connected, and then Ethernet is disconnected (but Tether remains connected).

This CL also ensures a scan on login, regardless of whether or not the Default network is connected.

TBR=lesliewatkins@chromium.org

(cherry picked from commit 6c644529bf5dc1886a2dd0dbdc24f12029eeca08)

Bug: 672263,  738542 
Change-Id: I062fdc3dc825df6a6e986db80964fa92732774f7
Reviewed-on: https://chromium-review.googlesource.com/598940
Commit-Queue: Leslie Watkins <lesliewatkins@chromium.org>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#491834}
Reviewed-on: https://chromium-review.googlesource.com/601421
Cr-Commit-Position: refs/branch-heads/3163@{#302}
Cr-Branched-From: ff259bab28b35d242e10186cd63af7ed404fae0d-refs/heads/master@{#488528}
[modify] https://crrev.com/4b0b385ad5eba8d657b9a20061b5c2c239e1afd3/chromeos/components/tether/host_scan_scheduler.cc
[modify] https://crrev.com/4b0b385ad5eba8d657b9a20061b5c2c239e1afd3/chromeos/components/tether/host_scan_scheduler.h
[modify] https://crrev.com/4b0b385ad5eba8d657b9a20061b5c2c239e1afd3/chromeos/components/tether/host_scan_scheduler_unittest.cc
[modify] https://crrev.com/4b0b385ad5eba8d657b9a20061b5c2c239e1afd3/chromeos/components/tether/host_scanner.h
[modify] https://crrev.com/4b0b385ad5eba8d657b9a20061b5c2c239e1afd3/chromeos/components/tether/initializer.cc

Status: Fixed (was: Started)

Comment 19 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment