Failed to stop discovery due to __hci_req_sync() err -110 |
||||
Issue description
Chrome Version: eve-release/R66-10452.22.0
What steps will reproduce the problem?
Running magic tethering with 1 pixel phone present.
What is the expected result?
It should run smoothly.
What happens instead?
It failed to stop discovery at some point and was unrecoverable. No more LE connection could be created since then.
The message log showed that
2018-05-21T03:10:02.183644+08:00 DEBUG kernel: [56661.407529] hci_request.c:__hci_req_sync() hci0 end: err -110
The btsnoop log showed that the controller has disabled the scanning.
< HCI Command: LE Set.. (0x08|0x000c) plen 2 [hci0] 2018-05-21 03:10:02.185403
Scanning: Disabled (0x00)
Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4 [hci0] 2018-05-21 03:10:02.191357
LE Set Scan Enable (0x08|0x000c) ncmd 1
Status: Success (0x00)
This looks like a kernel issue.
It is probably a bug across all platforms.
The tarball of logs: https://drive.google.com/open?id=1qSkQMtyYXdLdN75wyd9qTsPmrh6ixMjd
,
Jul 13
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/56e94b215b942d7331f9d265f1e2f695bf581d6a commit 56e94b215b942d7331f9d265f1e2f695bf581d6a Author: Joseph Hwang <josephsih@chromium.org> Date: Fri Jul 13 12:09:36 2018 CHROMIUM: bluetooth: Add a dummy cmd in hci_req_add_le_scan_disable If the HCI_OP_LE_SET_SCAN_ENABLE command is skipped when stopping discovery, the corresponding command complete event would never be received. This would cause the HCI command timeout and thus the stop_discovery method fails. The above said command might be skipped in a rare condition when both kernel and the bluetoothd damemon would like to stop discovery almost at the same time. In this case, chance is that they might be out of sync of the discovery state and result in the above error. To work around the race condtion between kernel and bluetoothd, a dummy HCI command is added. This makes sures that when kernel has stopped scanning at a bit earlier time, bluetoothd, while trying to re-stop discovery and having the HCI command skipped, could still receive the correct stop_discovery_complete callback. BUG= chromium:845107 TEST=Run magic tethering for 24 hours and observe that there are no error messages such as hci_request.c:__hci_req_sync() hci0 end: err -110 accompanied by the logs Bluetooth: hci_core.c:skip_conditional_cmd() COND LE cmd (0x200c) is already 0 (chg 0), skip transition to 0 Bluetooth: hci_core.c:skip_conditional_cmd() COND no more cmd in queue. which indicates that the last command is skipped. Change-Id: Icbaf3b3a1faeebc135daf462780afd81c3eb2255 Signed-off-by: Joseph Hwang <josephsih@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1075922 Commit-Ready: Shyh-In Hwang <josephsih@chromium.org> Tested-by: Shyh-In Hwang <josephsih@chromium.org> Reviewed-by: Miao-chen Chou <mcchou@chromium.org> [modify] https://crrev.com/56e94b215b942d7331f9d265f1e2f695bf581d6a/net/bluetooth/hci_request.c
,
Jul 15
,
Sep 24
|
||||
►
Sign in to add a comment |
||||
Comment 1 by josephsih@chromium.org
, May 29 2018