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

Issue 868411 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 23
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocked on:
issue 873905

Blocking:
issue 807430



Sign in to add a comment

Synchronize BlueZ & NewBlue stack bring up/down

Project Member Reported by sonnysasaka@chromium.org, Jul 27

Issue description

Blocking: 807430
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 2

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

commit a2a458bd5d690a1b7bba24d73650b19f3b9549d1
Author: Qiyu Hu <qiyuh@google.com>
Date: Thu Aug 02 20:53:34 2018

bluetooth: Add kStackSyncQuitting as bluetooth adapter property

BUG= chromium:868411 
TEST=CQ

Change-Id: I91c0142d22447cf9b1d3c12c0908238102c04c5d
Reviewed-on: https://chromium-review.googlesource.com/1152352
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Qiyu Hu <qiyuh@google.com>
Reviewed-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/a2a458bd5d690a1b7bba24d73650b19f3b9549d1/dbus/service_constants.h

Project Member

Comment 3 by bugdroid1@chromium.org, Aug 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/ddc4ca3530709ed82924a45508bbbf3669b2ea15

commit ddc4ca3530709ed82924a45508bbbf3669b2ea15
Author: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Thu Aug 02 20:53:22 2018

bluetooth: Fix multiple newblue bring up

Newblue should be brought up once per daemon session. So we should
ignore any "ready for up" callbacks after the first bring up. Otherwise
we may run into a bad state which causes "hang" or unresponsive
newblued.

BUG= chromium:868411 
TEST=Added unit test in NewblueTest.ListenReadyForUp

Change-Id: I062bcabe40c4d66f24058a7b88774a85364aa20c
Reviewed-on: https://chromium-review.googlesource.com/1152323
Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org>
Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Reviewed-by: Qiyu Hu <qiyuh@google.com>

[modify] https://crrev.com/ddc4ca3530709ed82924a45508bbbf3669b2ea15/bluetooth/newblued/newblue.cc
[modify] https://crrev.com/ddc4ca3530709ed82924a45508bbbf3669b2ea15/bluetooth/newblued/newblue_unittest.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 8

Labels: merge-merged-chromeos-5.44
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/bluez/+/2bb33bd8997cffbc38a1ab5d7fffc9f2d1e94eea

commit 2bb33bd8997cffbc38a1ab5d7fffc9f2d1e94eea
Author: Qiyu Hu <qiyuh@google.com>
Date: Wed Aug 08 01:09:01 2018

CHROMIUM: Stack sync quitting with Newblue

 - Add "StackSyncQuitting" as a new adapter property. Reset it to false
   whenever adatper_start. Set it to true whenever BlueZ is doing stack
   sync quitting.
 - Track newblue state in "newblue_stack_sync_quitting". Update it when
   newblue adapter is up or newblue adapter properties change.
 - Do stack sync quitting when the following conditions are all met:
     1. BlueZ adapter is powered.
     2. Newblue is not stack sync quitting.
     3. Newblue adapter is down.

BUG= chromium:868411 
TEST=Send SIGINT to Newblue and verify that BlueZ shuts down, with
StackSyncQuitting property change sent via DBus.
Change-Id: Id97c2b895e6459c6358c45e3601843b3fcc35c7a
Reviewed-on: https://chromium-review.googlesource.com/1152300
Commit-Ready: Qiyu Hu <qiyuh@google.com>
Tested-by: Qiyu Hu <qiyuh@google.com>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>

[modify] https://crrev.com/2bb33bd8997cffbc38a1ab5d7fffc9f2d1e94eea/doc/adapter-api.txt
[modify] https://crrev.com/2bb33bd8997cffbc38a1ab5d7fffc9f2d1e94eea/src/adapter.c

Blockedon: 873905
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 23

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/4d15be4012cd9f5c450e5bba8f5add0e643bfae6

commit 4d15be4012cd9f5c450e5bba8f5add0e643bfae6
Author: Qiyu <qiyuh@google.com>
Date: Thu Aug 23 20:20:41 2018

bluetooth: Stack sync quitting with BlueZ

 - Cache BlueZ Powered property to detect power changes in BlueZ
 - Listen for adapter interface and track property changes after
   CreateProperties() is called by dbus
 - Listen for adapter removal
 - If power turns to down or adapter is removed, start stack sync
   quitting when BlueZ is not doing the same thing

How BlueZ and NewBlue synchronize their up/down state is described
in more detail at http://go/bluez-stack-split#heading=h.u8xv2h3q9kh4

BUG= chromium:868411 
TEST=Turn off bluetooth and verify that newblue exits and
     StackSyncQuitting is true

Change-Id: I960dba729960c56adf13890a1213b15208adf496
Reviewed-on: https://chromium-review.googlesource.com/1166323
Commit-Ready: Qiyu Hu <qiyuh@google.com>
Tested-by: Qiyu Hu <qiyuh@google.com>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/4d15be4012cd9f5c450e5bba8f5add0e643bfae6/bluetooth/newblued/newblue_daemon.h
[add] https://crrev.com/4d15be4012cd9f5c450e5bba8f5add0e643bfae6/bluetooth/newblued/stack_sync_monitor.cc
[add] https://crrev.com/4d15be4012cd9f5c450e5bba8f5add0e643bfae6/bluetooth/newblued/stack_sync_monitor.h
[modify] https://crrev.com/4d15be4012cd9f5c450e5bba8f5add0e643bfae6/bluetooth/bluetooth.gyp
[modify] https://crrev.com/4d15be4012cd9f5c450e5bba8f5add0e643bfae6/bluetooth/newblued/newblue_daemon.cc
[add] https://crrev.com/4d15be4012cd9f5c450e5bba8f5add0e643bfae6/bluetooth/newblued/stack_sync_monitor_unittest.cc
[modify] https://crrev.com/4d15be4012cd9f5c450e5bba8f5add0e643bfae6/bluetooth/newblued/newblue_daemon_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment