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

Issue 625387 link

Starred by 6 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

shill: Stop assuming "kFailureOutOfRange" when we get disconnected while configuring

Project Member Reported by kirtika@chromium.org, Jul 2 2016

Issue description

Rework this piece of code in WiFi::ServiceDisconnected that assumes if we got disconnected while connecting and the failure is not bad credentials, the failure must be out-of-range: 

      // Disconnected due to inability to connect to service, most likely
      // due to roaming out of range.
      LOG(ERROR) << "Disconnected due to inability to connect to the service.";
      affected_service->SetFailure(Service::kFailureOutOfRange);


This generates UI notifications that can be frustrating to the user if they are really near an AP. 
This was seen in feedback report: https://feedback.corp.google.com/product/208/neutron?lView=rd&lReport=10595271390
where the reported signal strength was -36 (pretty good)
while this error was logged.
 
Many user issues on CBC could be prevented, or solved faster, with better UI notifications.

Common complaint is that "out of range" occurs while sitting next to router. So this improvement would be greatly appreciated.

#CBC-RS/TC-watchlist

Comment 2 Deleted

Comment 3 by dymp...@gmail.com, Sep 8 2016

#CBC-RS/TC-watchlist 

Comment 4 by kirtika@google.com, Dec 13 2016

Cc: yoshi@chromium.org

Comment 5 by kirtika@google.com, Dec 24 2016

Attaching system logs from feedback report: https://feedback.corp.google.com/product/208/neutron?lView=rd&lReport=50653162073


We displayed out-of-range here several times, when the real reason was available from supplicant (bad password): 


[1100:1100:1222/141501.041745:ERROR:device_event_log_impl.cc(140)] [14:15:01.041] Network: network_state_handler.cc:619 DefaultNetworkPropertyUpdated: BFJNS.Error = "out-of-range"
[1100:1100:1222/141505.163432:ERROR:device_event_log_impl.cc(140)] [14:15:05.163] Network: network_state_handler.cc:619 NetworkPropertyUpdated: BFJNS.Error = "out-of-range"
[1100:1100:1222/141544.723985:ERROR:device_event_log_impl.cc(140)] [14:15:44.723] Network: network_state_handler.cc:619 DefaultNetworkPropertyUpdated: BFJNS.Error = "out-of-range"
[1100:1100:1222/141548.947610:ERROR:device_event_log_impl.cc(140)] [14:15:48.947] Network: network_state_handler.cc:619 NetworkPropertyUpdated: BFJNS.Error = "out-of-range"
[1100:1100:1222/141606.515178:ERROR:device_event_log_impl.cc(140)] [14:16:06.514] Network: network_state_handler.cc:619 DefaultNetworkPropertyUpdated: BFJNS.Error = "out-of-range"
[1100:1100:1222/141610.696186:ERROR:device_event_log_impl.cc(140)] [14:16:10.695] Network: network_state_handler.cc:619 NetworkPropertyUpdated: BFJNS.Error = "out-of-range"
[1100:1100:1222/141650.215843:ERROR:device_event_log_impl.cc(140)] [14:16:50.215] Network: network_state_handler.cc:619 DefaultNetworkPropertyUpdated: BFJNS.Error = "out-of-range"
[1100:1100:1222/141700.435629:ERROR:device_event_log_impl.cc(140)] [14:17:00.432] Network: network_state_handler.cc:619 NetworkPropertyUpdated: BFJNS.Error = "out-of-range"
[1100:1100:1222/141736.975946:ERROR:device_event_log_impl.cc(140)] [14:17:36.975] Network: network_state_handler.cc:619 DefaultNetworkPropertyUpdated: BFJNS.Error = "out-of-range"
[1100:1100:1222/141741.091050:ERROR:device_event_log_impl.cc(140)] [14:17:41.090] Network: network_state_handler.cc:619 NetworkPropertyUpdated: BFJNS.Error = "out-of-range"
[1100:1100:1222/141806.706210:ERROR:device_event_log_impl.cc(140)] [14:18:06.706] Network: network_state_handler.cc:619 DefaultNetworkPropertyUpdated: BFJNS.Error = "out-of-range"
[1100:1100:1222/141810.944934:ERROR:device_event_log_impl.cc(140)] [14:18:10.944] Network: network_state_handler.cc:619 NetworkPropertyUpdated: BFJNS.Error = "out-of-range"
[1100:1100:1222/141829.356525:ERROR:device_event_log_impl.cc(140)] [14:18:29.355] Network: network_state_handler.cc:619 DefaultNetworkPropertyUpdated: BFJNS.Error = "out-of-range"
[1100:1100:1222/141833.465701:ERROR:device_event_log_impl.cc(140)] [14:18:33.465] Network: network_state_handler.cc:619 NetworkPropertyUpdated: BFJNS.Error = "out-of-range"

system_logs.txt
10.6 MB View Download
Components: Internals>Network
Components: -Internals>Network OS>Systems>Network

Comment 8 by yoshi@chromium.org, Jan 3 2018

Cc: -yoshi@chromium.org

Comment 9 by kirtika@google.com, Jan 10 2018

Cc: keta...@chromium.org cernekee@chromium.org benchan@chromium.org
ketakid@ reported a situation where connecting to Google-A shows "out-of-range" error code permanently, even when the system is connected to Google-A. 
That's probably a switch statement somewhere falling through to the default failure code. 

The fix for this needs a proper mapping b/w possible wpa_supplicant error codes and shill-supported error codes, shill should receive the true code via dbus and then propagate it upwards if needed (i.e. only out of range in the 'true' case should go to UI).

Comment 10 by ketakid@google.com, Jan 10 2018

I just filed a feedback report with logs and a screenshot.
Labels: Hotlist-ConOps-CrOS
(Bulk Edit) Adding the new conops Chrome OS hotlist to all open issues with the "#CBC-RS/TC-watchlist" tag, our former tracking tag.
Cc: dwmclary@chromium.org
Since this can happen in a number of config failures, it seems like we should have a message like:

"There was a problem configuring your connection."
Or
"Could not configure connection to the network."


My preference is for the former, but I'm open to other suggestions.

Comment 15 Deleted

Project Member

Comment 16 by bugdroid1@chromium.org, Aug 3

Labels: merge-merged-wpa_supplicant-2.6
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/hostap/+/a2b0c7833fca73f3235cfda643f251a1b212ba5b

commit a2b0c7833fca73f3235cfda643f251a1b212ba5b
Author: Alex Khouderchah <akhouderchah@chromium.org>
Date: Fri Aug 03 00:58:35 2018

FROMLIST: wpa_supplicant: expose authentication status to DBus

wpa_supplicant currently logs CTRL-EVENT-AUTH-FAILED errors when
authentication fails, but doesn't expose any property to the DBus
interface related to this.

This change adds the "AuthStatusCode" property to the interface,
which contains the IEEE 802.11 status code of the last failed
authentication.

(from http://lists.infradead.org/pipermail/hostap/2018-July/038668.html)

BUG=chromium:625387
TEST=Attempted to connect to AP with no free connections, and saw DBus
     message indicating the AuthStatusCode was set to 17 (AP unable to
     handle additional STAs).
TEST=Successfully connected to AP, saw no DBus PropertyChanged message
     for AuthStatusCode.

Change-Id: Idc0e82b8576cb1909663501b637a8aa33969800f
Reviewed-on: https://chromium-review.googlesource.com/1123259
Commit-Ready: Kirtika Ruchandani <kirtika@chromium.org>
Tested-by: Alex Khouderchah <akhouderchah@chromium.org>
Reviewed-by: Kirtika Ruchandani <kirtika@chromium.org>

[modify] https://crrev.com/a2b0c7833fca73f3235cfda643f251a1b212ba5b/wpa_supplicant/events.c
[modify] https://crrev.com/a2b0c7833fca73f3235cfda643f251a1b212ba5b/wpa_supplicant/dbus/dbus_new.h
[modify] https://crrev.com/a2b0c7833fca73f3235cfda643f251a1b212ba5b/wpa_supplicant/notify.c
[modify] https://crrev.com/a2b0c7833fca73f3235cfda643f251a1b212ba5b/wpa_supplicant/notify.h
[modify] https://crrev.com/a2b0c7833fca73f3235cfda643f251a1b212ba5b/wpa_supplicant/dbus/dbus_new.c
[modify] https://crrev.com/a2b0c7833fca73f3235cfda643f251a1b212ba5b/wpa_supplicant/dbus/dbus_new_handlers.c
[modify] https://crrev.com/a2b0c7833fca73f3235cfda643f251a1b212ba5b/doc/dbus.doxygen
[modify] https://crrev.com/a2b0c7833fca73f3235cfda643f251a1b212ba5b/wpa_supplicant/dbus/dbus_new_handlers.h
[modify] https://crrev.com/a2b0c7833fca73f3235cfda643f251a1b212ba5b/wpa_supplicant/wpa_supplicant_i.h

Project Member

Comment 17 by bugdroid1@chromium.org, Aug 3

The following revision refers to this bug:
  https://chromium.googlesource.com/aosp/platform/system/connectivity/shill/+/1cfb741b53dbe9f3d1af0d1f1b11271db2236dfb

commit 1cfb741b53dbe9f3d1af0d1f1b11271db2236dfb
Author: Alex Khouderchah <akhouderchah@chromium.org>
Date: Fri Aug 03 04:50:26 2018

shill: Get auth and assoc reject reasons from supplicant

wpa_supplicant sends authentication and association reject reasons,
using 802.11 status code values, over dbus. This change modifies shill
such that the Wifi class reads these reasons, when available, from
PropertiesChanged dbus messages sent by wpa_supplicant.

BUG=chromium:625387
CQ-DEPEND=CL:1123259
TEST=All unit tests are passing. When triggering an unexpected
     disconnect using an AP with max_stas set to 0, we can see in the
     logs that shill receives an auth reject reason from supplicant.

Change-Id: I5031c94e848e5cad2a6ee3bdc513a4da204098f8
Reviewed-on: https://chromium-review.googlesource.com/1159234
Commit-Ready: Kirtika Ruchandani <kirtika@chromium.org>
Tested-by: Alex Khouderchah <akhouderchah@chromium.org>
Reviewed-by: Kirtika Ruchandani <kirtika@chromium.org>

[modify] https://crrev.com/1cfb741b53dbe9f3d1af0d1f1b11271db2236dfb/supplicant/wpa_supplicant.cc
[modify] https://crrev.com/1cfb741b53dbe9f3d1af0d1f1b11271db2236dfb/wifi/wifi.cc
[modify] https://crrev.com/1cfb741b53dbe9f3d1af0d1f1b11271db2236dfb/wifi/wifi.h
[modify] https://crrev.com/1cfb741b53dbe9f3d1af0d1f1b11271db2236dfb/supplicant/wpa_supplicant.h

Project Member

Comment 18 by bugdroid1@chromium.org, Aug 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/system_api/+/0fd44ac7a2858c13df198941314c29585b147de0

commit 0fd44ac7a2858c13df198941314c29585b147de0
Author: Alex Khouderchah <akhouderchah@google.com>
Date: Sun Aug 05 19:34:37 2018

shill: Added new error strings for Service::ConnectFailure additions

In the past, shill defaulted to returning an out-of-range error
when disconnecting unexpectedly. This code provides some new error
values for shill to pass over d-bus, such that more informative
error reasons may be provided to external applications.

BUG=chromium:625387
TEST=`cros_workon --board nocturne system_api && emerge-nocturne \
system_api && cros deploy ${DUT_IP} system_api`.
Run connect-disconnect loop, restart shill and make sure there are
no errors. This is only a smoke test.

Change-Id: Ie5a29957314305f31b01ac9e6e5369da3861d4cb
Reviewed-on: https://chromium-review.googlesource.com/1105395
Commit-Ready: Kirtika Ruchandani <kirtika@chromium.org>
Tested-by: Kirtika Ruchandani <kirtika@chromium.org>
Reviewed-by: Kirtika Ruchandani <kirtika@chromium.org>

[modify] https://crrev.com/0fd44ac7a2858c13df198941314c29585b147de0/dbus/shill/dbus-constants.h

Project Member

Comment 19 by bugdroid1@chromium.org, Aug 30

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

commit fed36a9cddfbd84dd3894e8fdf1df8494424a203
Author: Alex Khouderchah <akhouderchah@google.com>
Date: Thu Aug 30 15:07:47 2018

Add UMA metrics for WiFi auth/assoc status codes

The CL that generates this data is
https://chromium-review.googlesource.com/c/1105397

BUG=chromium:625387

Change-Id: Ib8439e0a3b9d41d4dd5ecbfe2d49888465cf89f9
Reviewed-on: https://chromium-review.googlesource.com/1179968
Reviewed-by: Mark Pearson <mpearson@chromium.org>
Commit-Queue: Alex Khouderchah <akhouderchah@chromium.org>
Cr-Commit-Position: refs/heads/master@{#587581}
[modify] https://crrev.com/fed36a9cddfbd84dd3894e8fdf1df8494424a203/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/fed36a9cddfbd84dd3894e8fdf1df8494424a203/tools/metrics/histograms/histograms.xml

Status: Assigned (was: Untriaged)
This issue has an owner, a component and a priority, but is still listed as untriaged or unconfirmed. By definition, this bug is triaged. Changing status to "assigned". Please reach out to me if you disagree with how I've done this.

Sign in to add a comment