Create org.chromium.KioskAppService D-Bus service |
|||||||
Issue descriptionChrome's GetKioskAppRequiredPlatformVersion D-Bus method, currently exported via org.chromium.LibCrosService and called by update_engine, should be moved to a new service: name: org.chromium.KioskAppService path: /org/chromium/KioskAppService interface: org.chromium.KioskAppServiceInterface This needs to live inside of the browser process. See issue 577783 for more details about the method. (The method name constant is typoed as "kGetKioskAppRequiredPlatforVersion" in system_api, but update_engine doesn't use it.)
,
Mar 23 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/system_api/+/2250c82b8f27594541ff6ae63381c751c866b86f commit 2250c82b8f27594541ff6ae63381c751c866b86f Author: Justin TerAvest <teravest@chromium.org> Date: Thu Mar 23 06:50:12 2017 Add constants for D-Bus KioskAppService. This is one of a series of changes to break out GetKioskAppRequiredPlatformVersion to its own service. This method will be implemented by both LibCrosService and KioskAppService until all clients are migrated over. BUG= chromium:703229 TEST=None Change-Id: I6c493e93fb737ef9bf9943e7f114f122e945ec40 Reviewed-on: https://chromium-review.googlesource.com/457596 Commit-Ready: Justin TerAvest <teravest@chromium.org> Tested-by: Justin TerAvest <teravest@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> [modify] https://crrev.com/2250c82b8f27594541ff6ae63381c751c866b86f/dbus/service_constants.h
,
Apr 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6e2e787479f591d24386ba91d8bbf3d1cfbe1fd3 commit 6e2e787479f591d24386ba91d8bbf3d1cfbe1fd3 Author: teravest <teravest@chromium.org> Date: Thu Apr 06 22:30:25 2017 Create org.chromium.KioskAppService. This creates a D-Bus service that extracts a "Kiosk app" related method from LibCrosService. Clients have to be migrated to this before the corresponding method may be removed from LibCrosService. BUG= 703229 TEST=deploy_chrome, manually sent a message to new method, got response. Review-Url: https://codereview.chromium.org/2798703002 Cr-Commit-Position: refs/heads/master@{#462653} [modify] https://crrev.com/6e2e787479f591d24386ba91d8bbf3d1cfbe1fd3/chrome/browser/chromeos/chrome_browser_main_chromeos.cc [modify] https://crrev.com/6e2e787479f591d24386ba91d8bbf3d1cfbe1fd3/chrome/browser/chromeos/dbus/kiosk_info_service_provider.cc [modify] https://crrev.com/6e2e787479f591d24386ba91d8bbf3d1cfbe1fd3/chrome/browser/chromeos/dbus/kiosk_info_service_provider.h [modify] https://crrev.com/6e2e787479f591d24386ba91d8bbf3d1cfbe1fd3/chromeos/BUILD.gn [modify] https://crrev.com/6e2e787479f591d24386ba91d8bbf3d1cfbe1fd3/chromeos/dbus/services/cros_dbus_service.cc [modify] https://crrev.com/6e2e787479f591d24386ba91d8bbf3d1cfbe1fd3/chromeos/dbus/services/cros_dbus_service.h [add] https://crrev.com/6e2e787479f591d24386ba91d8bbf3d1cfbe1fd3/chromeos/dbus/services/org.chromium.KioskAppService.conf
,
Apr 7 2017
teravest@, are you going to update chromeos-chrome ebuild to install org.chromium.KioskAppService.conf ? Without that, chrome with #3 crashes [4605:4605:0407/130855.483393:FATAL:cros_dbus_service.cc(76)] Failed to own: org.chromium.KioskAppService
,
Apr 7 2017
It turns out this is because my chromeos image is too old and probably does not have /etc/dbus-1/system.d/chrome.conf to bring in the necessary dbus confs.
,
Apr 18 2017
,
Apr 21 2017
I'm getting crashes on a samus device running mus+ash at ToT related to this. The samus device has a new image Chrome OS R60 9481 image and it crashes on boot when the --mash is added to /etc/chrome_conf.dev. [8323:8323:0421/125405.003494:FATAL:cros_dbus_service.cc(76)] Failed to own: org.chromium.KioskAppService #0 0x5abb3edf25b7 base::debug::StackTrace::StackTrace() #1 0x5abb3ee0628d logging::LogMessage::~LogMessage() #2 0x5abb3f751262 chromeos::CrosDBusServiceImpl::OnOwnership() #3 0x5abb3da9979c _ZN4base8internal7InvokerINS0_9BindStateINS_8CallbackIFvRKSsbELNS0_8CopyModeE1ELNS0_10RepeatModeE1EEEJSsbEEEFvvEE3RunEPNS0_13BindStateBaseE #4 0x5abb3ee7b143 base::debug::TaskAnnotator::RunTask() #5 0x5abb3ee0bcad base::MessageLoop::RunTask() #6 0x5abb3ee0bf58 base::MessageLoop::DeferOrRunPendingTask() #7 0x5abb3ee0c336 base::MessageLoop::DoWork() #8 0x5abb3ee0dac9 base::MessagePumpLibevent::Run() #9 0x5abb3ee0ba27 base::MessageLoop::RunHandler() #10 0x5abb3ee2b47e base::RunLoop::Run() #11 0x5abb3eaab6ce ChromeBrowserMainParts::MainMessageLoopRun() #12 0x5abb3d7a8f51 content::BrowserMainLoop::RunMainMessageLoopParts() #13 0x5abb3d7ab89d content::BrowserMainRunnerImpl::Run() #14 0x5abb3d7a46a6 content::BrowserMain() #15 0x5abb3ea66c88 content::ContentMainRunnerImpl::Run() #16 0x5abb3fe5a8e9 service_manager::Main() #17 0x5abb3ea65bc2 content::ContentMain() #18 0x5abb3d2aa9cd ChromeMain #19 0x77a699ed2816 __libc_start_main #20 0x5abb3d2aa7a9 _start Want me to file a new bug for it?
,
Apr 21 2017
,
Apr 21 2017
You don't have to file a new bug, this one should work fine. So, you only get boot crashes when passing --mash? Would you mind pasting the output of a couple of commands? ls /opt/google/chrome/dbus cat /etc/dbus-1/system.conf
,
Apr 24 2017
Yes it only crashes when passing --mash. Here is the output of those commands.
$ ls -1 /opt/google/chrome/dbus
org.chromium.LibCrosService.conf
org.chromium.LivenessService.conf
org.chromium.NetworkProxyService.conf
$ cat /etc/dbus-1/system.conf
<!-- This configuration file controls the systemwide message bus.
Add a system-local.conf and edit that rather than changing this
file directly. -->
<!-- Note that there are any number of ways you can hose yourself
security-wise by screwing up this file; in particular, you
probably don't want to listen on any more addresses, add any more
auth mechanisms, run as a different user, etc. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Our well-known bus type, do not change this -->
<type>system</type>
<!-- Run as special user -->
<user>messagebus</user>
<!-- Fork into daemon mode -->
<fork/>
<!-- We use system service launching using a helper -->
<standard_system_servicedirs/>
<!-- This is a setuid helper that is used to launch system services -->
<servicehelper>/usr/libexec/dbus-daemon-launch-helper</servicehelper>
<!-- Write a pid file -->
<pidfile>/var/run/dbus.pid</pidfile>
<!-- Enable logging to syslog -->
<syslog/>
<!-- Only allow socket-credentials-based authentication -->
<auth>EXTERNAL</auth>
<!-- Only listen on a local socket. (abstract=/path/to/socket
means use abstract namespace, don't really create filesystem
file; only Linux supports this. Use path=/whatever on other
systems.) -->
<listen>unix:path=/var/run/dbus/system_bus_socket</listen>
<policy context="default">
<!-- All users can connect to system bus -->
<allow user="*"/>
<!-- Holes must be punched in service configuration files for
name ownership and sending method calls -->
<deny own="*"/>
<deny send_type="method_call"/>
<!-- Signals and reply messages (method returns, errors) are allowed
by default -->
<allow send_type="signal"/>
<allow send_requested_reply="true" send_type="method_return"/>
<allow send_requested_reply="true" send_type="error"/>
<!-- All messages may be received by default -->
<allow receive_type="method_call"/>
<allow receive_type="method_return"/>
<allow receive_type="error"/>
<allow receive_type="signal"/>
<!-- Allow anyone to talk to the message bus -->
<allow send_destination="org.freedesktop.DBus"/>
<!-- But disallow some specific bus services -->
<deny send_destination="org.freedesktop.DBus"
send_interface="org.freedesktop.DBus"
send_member="UpdateActivationEnvironment"/>
<deny send_destination="org.freedesktop.DBus"
send_interface="org.freedesktop.systemd1.Activator"/>
</policy>
<!-- Only systemd, which runs as root, may report activation failures. -->
<policy user="root">
<allow send_destination="org.freedesktop.DBus"
send_interface="org.freedesktop.systemd1.Activator"/>
</policy>
<!-- Config files are placed here that among other things, punch
holes in the above policy for specific services. -->
<includedir>system.d</includedir>
<!-- This is included last so local configuration can override what's
in this standard file -->
<include ignore_missing="yes">system-local.conf</include>
<include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include>
<!-- Chromium talks to most services on the bus so needs a relatively
large number of match rules. -->
<limit name="max_match_rules_per_connection">4096</limit>
</busconfig>
,
Apr 24 2017
Just to check, do you also have a /etc/dbus-1/system.d/chrome.conf file?
,
Apr 24 2017
Yep, file contents are below. I also built for link and stumpy last week and it wasn't crashing. I'm not sure why only some boards are having this problem? $ cat /etc/dbus-1/system.d/chrome.conf <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> <busconfig> <!-- Config files are placed here that among other things, punch holes in the policy for specific services. --> <includedir>/opt/google/chrome/dbus</includedir> </busconfig>
,
Apr 24 2017
The problem you're seeing shouldn't be anything board specific. I have a suspicion that some ChromeOS builds that have old versions of chrome were problematic? R60 9479-9482 had an older version of chrome that is missing some D-Bus changes. I wonder if the other boards were just outside that range.
,
Apr 24 2017
Oh actually, #10 is misleading. I was using deploy_chrome --target-dir=/home/chrome --mount so I was looking at the wrong file. $ mount --bind /home/chrome /opt/google/chrome $ ls -1 /opt/google/chrome/dbus org.chromium.KioskAppService.conf org.chromium.LibCrosService.conf org.chromium.LivenessService.conf org.chromium.NetworkProxyService.conf
,
Apr 24 2017
#13 sounds likely since the contents of /opt/google/chrome/dbus are different between the image I flashed and the ToT version I deployed. I'll try flashing an image from today.
,
Apr 24 2017
Problem is gone at R60 9491 with --mash. Thanks for the help.
,
May 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cdf6f91b9e1c389bc6b07bdfb7eb9018ee49d719 commit cdf6f91b9e1c389bc6b07bdfb7eb9018ee49d719 Author: derat <derat@chromium.org> Date: Fri May 19 01:18:06 2017 chromeos: Export GetKioskAppRequiredPlatformVersion method. Continue to export a GetKioskAppRequiredPlatformVersion D-Bus method on org.chromium.LibCrosService. It was accidentally renamed to GetRequiredPlatformVersion (which should only be exported via the new org.chromium.KioskAppService service) by 6e2e787479f5. BUG= 703229 , 724325 Review-Url: https://codereview.chromium.org/2890293002 Cr-Commit-Position: refs/heads/master@{#473011} [modify] https://crrev.com/cdf6f91b9e1c389bc6b07bdfb7eb9018ee49d719/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
,
Jul 20 2017
I think that update_engine still needs to be updated to use KioskAppService, followed by the method being deleted from LibCrosService. http://crrev.com/c/497491 was a similar update_engine change I made when introducing another D-Bus service. Justin, feel free to reassign to me or Lann if you're busy with other work at the moment.
,
Mar 30 2018
,
Mar 30 2018
The following revision refers to this bug: https://chromium.googlesource.com/aosp/platform/system/update_engine/+/04df23ae35c562a5c29ca45bea3ec5c029fefe8e commit 04df23ae35c562a5c29ca45bea3ec5c029fefe8e Author: Daniel Erat <derat@chromium.org> Date: Fri Mar 30 18:36:38 2018 update_engine: Use org.chromium.KioskAppService service. Make update_engine use the org.chromium.KioskAppService D-Bus service exported by Chrome rather than the old methods under org.chromium.LibCrosService. BUG= chromium:703229 TEST=unit tests pass; also hacked up RealSystemProvider to call its GetKioskAppRequiredPlatformVersion and manually verified that the D-Bus call succeeds Change-Id: I02d503da1e1aec2319c75e2237c87bfcdcd1f7e5 Reviewed-on: https://chromium-review.googlesource.com/987325 Commit-Ready: Dan Erat <derat@chromium.org> Tested-by: Dan Erat <derat@chromium.org> Reviewed-by: Amin Hassani <ahassani@chromium.org> [modify] https://crrev.com/04df23ae35c562a5c29ca45bea3ec5c029fefe8e/real_system_state.h [add] https://crrev.com/04df23ae35c562a5c29ca45bea3ec5c029fefe8e/dbus_bindings/org.chromium.KioskAppService.dbus-xml [modify] https://crrev.com/04df23ae35c562a5c29ca45bea3ec5c029fefe8e/real_system_state.cc [modify] https://crrev.com/04df23ae35c562a5c29ca45bea3ec5c029fefe8e/update_manager/real_system_provider.h [modify] https://crrev.com/04df23ae35c562a5c29ca45bea3ec5c029fefe8e/update_manager/real_system_provider_unittest.cc [modify] https://crrev.com/04df23ae35c562a5c29ca45bea3ec5c029fefe8e/update_manager/real_system_provider.cc [modify] https://crrev.com/04df23ae35c562a5c29ca45bea3ec5c029fefe8e/update_manager/state_factory.cc [modify] https://crrev.com/04df23ae35c562a5c29ca45bea3ec5c029fefe8e/update_manager/state_factory.h [delete] https://crrev.com/0e0e354125bac76fdc8d4455ac1708ad21b61d64/dbus_bindings/org.chromium.LibCrosService.dbus-xml [modify] https://crrev.com/04df23ae35c562a5c29ca45bea3ec5c029fefe8e/update_engine.gyp
,
Apr 19 2018
,
May 12 2018
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by teravest@chromium.org
, Mar 20 2017