Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(668)

Issue 20555003: Allow Chromium's DBus service ownership to be stealable (Closed)

Created:
7 years, 5 months ago by Chris Masone
Modified:
7 years, 4 months ago
Reviewers:
satorux1
CC:
chromium-reviews, oshima+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Allow Chromium's DBus service ownership to be stealable We've seen some cases in tests where a Chromium process winds up in a temporarily unkillable state, causing the dbus-daemon to believe that it still actively owns org.chromium.LibCrosService. This makes attempts to restart the UI fail, as the browser dies when it cannot take ownership of this service name. The reason it can't is because Chromium currently doesn't allow other processes to steal ownership -- and the unkillable process is holding onto the token. This can be remedied by providing certain options when ownership of the service name is taken, options that allow other processes to seize ownership if they so choose. The ramifications of this are discussed further in the bug. BUG=chromium:261381 TEST=new unit test in dbus_unittest TEST=run the following as chronos on a device: "gdbus call --system --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.RequestName org.chromium.LibCrosService 7" TEST=This should return (uint32 1,) Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=214589

Patch Set 1 #

Total comments: 10

Patch Set 2 : Fixed ThreadREstriction issue in unit tests, addressed comments. #

Patch Set 3 : Whoops. ACTUALLY fixed the ThreadRestrictions issue. #

Total comments: 8

Patch Set 4 : Addressed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -11 lines) Patch
M chrome/browser/chromeos/dbus/cros_dbus_service.cc View 1 1 chunk +9 lines, -0 lines 0 comments Download
M chromeos/dbus/ibus/ibus_panel_service.cc View 1 chunk +1 line, -0 lines 0 comments Download
M dbus/bus.h View 1 3 chunks +20 lines, -1 line 0 comments Download
M dbus/bus.cc View 1 2 3 4 chunks +9 lines, -5 lines 0 comments Download
M dbus/bus_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M dbus/mock_bus.h View 1 chunk +4 lines, -2 lines 0 comments Download
M dbus/signal_sender_verification_unittest.cc View 1 2 3 chunks +67 lines, -0 lines 0 comments Download
M dbus/test_service.h View 4 chunks +7 lines, -1 line 0 comments Download
M dbus/test_service.cc View 5 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
Chris Masone
Satoru, I still need to test this out, but I've uploaded it here for your ...
7 years, 5 months ago (2013-07-25 23:38:54 UTC) #1
satorux1
Thank you for working on this! https://codereview.chromium.org/20555003/diff/1/dbus/bus.cc File dbus/bus.cc (right): https://codereview.chromium.org/20555003/diff/1/dbus/bus.cc#newcode575 dbus/bus.cc:575: << (error.is_set() ? ...
7 years, 5 months ago (2013-07-26 00:50:12 UTC) #2
Chris Masone
https://codereview.chromium.org/20555003/diff/1/dbus/bus.h File dbus/bus.h (right): https://codereview.chromium.org/20555003/diff/1/dbus/bus.h#newcode183 dbus/bus.h:183: ALLOW_REPLACEMENT = DBUS_NAME_FLAG_ALLOW_REPLACEMENT, On 2013/07/26 00:50:12, satorux1 wrote: > ...
7 years, 5 months ago (2013-07-26 01:00:24 UTC) #3
satorux1
https://codereview.chromium.org/20555003/diff/1/chrome/browser/chromeos/dbus/cros_dbus_service.cc File chrome/browser/chromeos/dbus/cros_dbus_service.cc (right): https://codereview.chromium.org/20555003/diff/1/chrome/browser/chromeos/dbus/cros_dbus_service.cc#newcode53 chrome/browser/chromeos/dbus/cros_dbus_service.cc:53: dbus::Bus::REQUIRE_PRIMARY_ALLOW_REPLACEMENT, Please add some comment about why we are ...
7 years, 5 months ago (2013-07-26 01:14:45 UTC) #4
Chris Masone
https://codereview.chromium.org/20555003/diff/1/chrome/browser/chromeos/dbus/cros_dbus_service.cc File chrome/browser/chromeos/dbus/cros_dbus_service.cc (right): https://codereview.chromium.org/20555003/diff/1/chrome/browser/chromeos/dbus/cros_dbus_service.cc#newcode53 chrome/browser/chromeos/dbus/cros_dbus_service.cc:53: dbus::Bus::REQUIRE_PRIMARY_ALLOW_REPLACEMENT, On 2013/07/26 01:14:45, satorux1 wrote: > Please add ...
7 years, 5 months ago (2013-07-26 17:37:24 UTC) #5
satorux1
LGTM with nits: https://codereview.chromium.org/20555003/diff/26001/chrome/browser/chromeos/dbus/cros_dbus_service.cc File chrome/browser/chromeos/dbus/cros_dbus_service.cc (right): https://codereview.chromium.org/20555003/diff/26001/chrome/browser/chromeos/dbus/cros_dbus_service.cc#newcode53 chrome/browser/chromeos/dbus/cros_dbus_service.cc:53: // where processes on Linux can ...
7 years, 4 months ago (2013-07-29 05:50:00 UTC) #6
Chris Masone
https://codereview.chromium.org/20555003/diff/26001/chrome/browser/chromeos/dbus/cros_dbus_service.cc File chrome/browser/chromeos/dbus/cros_dbus_service.cc (right): https://codereview.chromium.org/20555003/diff/26001/chrome/browser/chromeos/dbus/cros_dbus_service.cc#newcode53 chrome/browser/chromeos/dbus/cros_dbus_service.cc:53: // where processes on Linux can wind up stuck ...
7 years, 4 months ago (2013-07-29 16:39:27 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmasone@chromium.org/20555003/39001
7 years, 4 months ago (2013-07-29 16:44:32 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmasone@chromium.org/20555003/39001
7 years, 4 months ago (2013-07-30 03:14:25 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cmasone@chromium.org/20555003/39001
7 years, 4 months ago (2013-07-30 14:36:18 UTC) #10
commit-bot: I haz the power
7 years, 4 months ago (2013-07-31 06:35:03 UTC) #11
Message was sent while issue was closed.
Change committed as 214589

Powered by Google App Engine
This is Rietveld 408576698