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

Issue 809757 link

Starred by 0 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

BLE Advertisement Unregistration: "Advertisement does not exist"

Project Member Reported by khorimoto@chromium.org, Feb 6 2018

Issue description

The InstantTethering.BluetoothAdvertisementUnregistrationResult metric tracks the success/error codes which occur when a Bluetooth advertisement is unregistered:

https://uma.googleplex.com/p/chrome/histograms?endDate=latest&dayCount=7&histograms=InstantTethering.BluetoothAdvertisementUnregistrationResult&fixupData=true&uniqueUsers=true&showMax=true&filters=platform%2Ceq%2CC%2Cchannel%2Cone_of%2C4%7C3%7C2%7C1%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial

35% of all attempts to unregister an advertisement fail with the error device::BluetoothAdvertisement::ErrorCode::ERROR_ADVERTISEMENT_DOES_NOT_EXIST. However, only ~1% of users see this error. It seems that when that 1% see the error, it keeps failing forever and dilutes our metrics.

This error code is strange because it occurs due to calling Unregister() on a device::BluetoothAdvertisement object which has not been unregistered.

If we encounter this error code, should we just assume that unregistration succeeded? If not, what is the correct thing to do?
 

Comment 1 by r...@chromium.org, Feb 8 2018

This can happen in case of BlueZ crashing - feel free to consider this as an unregister succeeded. If it didn't, you can't anymore anyway.

Rahul, could it be the same as what this CL is trying to fix:
https://chromium-review.googlesource.com/c/chromium/src/+/741261
That seems reasonable as well, Sonny.

How about this approach:
(1) Sonny gets that CL reviewed, which should hopefully fix the root cause of the issue.
(2) In Instant Tethering code, we consider the unregistration successful if we hit this case.
Owner: jordynass@chromium.org
Status: Assigned (was: Untriaged)
Due to our bluez hack in UnregisterAdvertisement, that interface may fail and needs to be retried. So, magic tether should retry if that fails, unless magic tether wants to detect bluetooth adapter gone event and treat UnregisterAdvertisement as success.

I think we should fix the bluetooth stack only.
Hmm, if we get that error type, should we really retry? It seems that if the system thinks that the advertisement is no longer registered, we should not continue trying to unregister.
Having an API that can fail and requires client to retry is a pain. Unfortunately it's not possible to make the API always succeed because it requires a massive re-architecting of bluez. When we move to newblue hopefully this API can have a success guarantee so that client doesn't need to worry about retry.
Ah, you are saying that you can detect this particular case by the error code. Yes, if the error code is reliable you may do that.
Status: Fixed (was: Assigned)
This was fixed by https://chromium-review.googlesource.com/c/chromium/src/+/915132 (the CL author forgot to include a "Bug:" line on the CL).
Status: Verified (was: Fixed)

Sign in to add a comment