New issue
Advanced search Search tips

Issue 875504 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

[Demo mode] If demo session is started offline, ARC should use offline demo mode provisioning

Project Member Reported by tbarzic@chromium.org, Aug 17

Issue description

Demo mode account is implemented as a public session account, whose ARC provisioning is done online on each session start (and if it fails, the session is restarted).
This means that (online enrolled) demo sessions will fail to initialize ARC sessions that are started offline.

To work around this, when starting demo sessions, we can fall back to offline demo mode provisioning if chrome does not succeed in getting the account's auth token (and proceed with arc in the same mode as for offline enrolled demo mode sessions).

 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 22

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bd81bc2612907f7be735db5f3a14ee530ba651c7

commit bd81bc2612907f7be735db5f3a14ee530ba651c7
Author: Toni Barzic <tbarzic@google.com>
Date: Wed Aug 22 23:42:39 2018

Better handling of offline demo sessions

When launching (online enrolled) demo sessions with no connectivity, ARC
provisioning for the demo mode public account will timeout (it will
fail to get the account auth token), and restart the public session.

This CL adds a fallback for demo session when the auth token for the
demo account cannot be fetched - it continues ARC provisioning with
offline demo mode provisioning.

BUG= 875504 
TEST=Start demo session with no network - ARC successfully provisions,
  and the session is not forcibly restarted

Change-Id: I76fe36cf939a5ac8d34b89f821fc142d2618d7d4
Reviewed-on: https://chromium-review.googlesource.com/1180415
Commit-Queue: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: Yusuke Sato <yusukes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585308}
[modify] https://crrev.com/bd81bc2612907f7be735db5f3a14ee530ba651c7/chrome/browser/chromeos/arc/auth/arc_auth_service.cc
[modify] https://crrev.com/bd81bc2612907f7be735db5f3a14ee530ba651c7/chrome/browser/chromeos/arc/auth/arc_auth_service_browsertest.cc

I've seen this work, but the session is still forcibly restarted sometimes -- I think if the device hasn't been online since boot, we have this problem.

If the device is connected to a network, then disconnected, new sessions will work okay.
Cc: wzang@chromium.org
Cc: tbarzic@chromium.org
Owner: wzang@chromium.org
Status: Assigned (was: Started)
Cc: elijahtaylor@chromium.org khmel@chromium.org
Components: -UI>Shell>DemoMode
Components: UI>Shell>DemoMode
Yury, can you work with Michael and others to diagnose this provisioning problem?
My observation is the same with #2. But I don't have much progress here.
Could we summarize the problem, steps to repro, symptoms?
Reading the bug but don't clear understand the problem.
Thanks
Re #8:

1) Enroll the device to online demo mode. (Start with the OOBE welcome screen, hit "ctrl+alt+D" and follow the steps. Please make sure the device is connected to network the whole time.)

2) After entering the demo session, disconnect the network. and either suspend the device for some time, or restart the device, as long as when the white boot splash screen is shown, there's no network connection.

3) Observe that after entering demo session, it enters a crash loop.

Note that in 2), if we simply disconnect the network and restart the user session, there's no crash loop (I believe this is part is addressed by the CL in #1, so the issue is to find out what's the differences are between the two scenarios).

Please let me know if you have questions.

note that the cl in #1 switches to offline demo account (for which arc provisioning will run offline, but without setting up an account for play store) if auth token fetch for the demo robot account fails.
Otherwise, Chrome restarts user session when ARC provisioning fails for a public session account - including the case public session is started when offline.

Perhaps the timeout for fetching the auth token exceeds the timeout for public session ARC setup, so the session is restarted before we even detect that an offline demo account should be used, i.e. while ARC setup is still stuck waiting for account details from Chrome)?

Though, if Chrome actually starts a crash loop soon after entering demo session, that hypothesis doesn't match the symptoms too well (I think public session normally exists after few minutes).

A crash stack might provide more clues.
Owner: michae...@chromium.org
Status: Started (was: Assigned)
The crash is happening in ArcRobotAuthCodeFetcher::Fetch(). I think we need to bypass this too, if fetching the auth code failed previously. Will send a CL shortly if that works.

 1  chrome!arc::ArcRobotAuthCodeFetcher::Fetch(base::RepeatingCallback<void (bool, std::__1::basic_string<char, std::__1::char_traits
<char>, std::__1::allocator<char> > const&)> const&) + 0xd4
 2  chrome!arc::ArcAuthService::FetchDeviceAccountInfo(bool) + 0x3da
 3  chrome!arc::mojom::AuthHostStubDispatch::Accept(arc::mojom::AuthHost*, mojo::Message*) + 0x264
 4  chrome!mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message*) + 0x217

Cc: atwilson@chromium.org
atwilson: does this crash repro in non-Demo Mode public sessions that have ARC++ enabled?

Repro steps:

1. make sure your device won't connect to the internet (e.g. disable or remove networks)
2. reboot
3. start a public session

The session will repeatedly crash a few seconds after sign-in.

Crash fix: https://chromium-review.googlesource.com/c/chromium/src/+/1237255
Project Member

Comment 13 by bugdroid1@chromium.org, Sep 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/50e0e4fcd954889201bd7e287553114c394c0c61

commit 50e0e4fcd954889201bd7e287553114c394c0c61
Author: Michael Giuffrida <michaelpg@chromium.org>
Date: Fri Sep 21 21:14:27 2018

Fix ArcRobotAuthCodeFetcher crash when offline

ArcRobotAuthCodeFetcher will crash if there is no CloudPolicyClient,
which can happen when the device hasn't been online since boot.

Bug:  875504 
Test: ArcRobotAuthCodeFetcherOfflineBrowserTest
Change-Id: Ia5412be9a85cfe5028aa30caf74a7b4562d342e7
Reviewed-on: https://chromium-review.googlesource.com/1237255
Commit-Queue: Michael Giuffrida <michaelpg@chromium.org>
Reviewed-by: Yury Khmel <khmel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593333}
[modify] https://crrev.com/50e0e4fcd954889201bd7e287553114c394c0c61/chrome/browser/chromeos/arc/auth/arc_robot_auth_code_fetcher.cc
[modify] https://crrev.com/50e0e4fcd954889201bd7e287553114c394c0c61/chrome/browser/chromeos/arc/auth/arc_robot_auth_code_fetcher_browsertest.cc

Labels: Merge-Request-70
Project Member

Comment 15 by sheriffbot@chromium.org, Sep 24

Labels: -Merge-Request-70 Merge-Review-70 Hotlist-Merge-Review
This bug requires manual review: M70 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), geohsu@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-70 Merge-Approved-70
Project Member

Comment 17 by bugdroid1@chromium.org, Sep 24

Labels: -merge-approved-70 merge-merged-3538
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a4f4074b528820308440e98d80bca54c09435298

commit a4f4074b528820308440e98d80bca54c09435298
Author: Michael Giuffrida <michaelpg@chromium.org>
Date: Mon Sep 24 22:16:00 2018

Fix ArcRobotAuthCodeFetcher crash when offline

ArcRobotAuthCodeFetcher will crash if there is no CloudPolicyClient,
which can happen when the device hasn't been online since boot.

Bug:  875504 
Test: ArcRobotAuthCodeFetcherOfflineBrowserTest
TBR=michaelpg@chromium.org

Change-Id: Ia5412be9a85cfe5028aa30caf74a7b4562d342e7
Reviewed-on: https://chromium-review.googlesource.com/1237255
Commit-Queue: Michael Giuffrida <michaelpg@chromium.org>
Reviewed-by: Yury Khmel <khmel@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#593333}(cherry picked from commit 50e0e4fcd954889201bd7e287553114c394c0c61)
Reviewed-on: https://chromium-review.googlesource.com/1241768
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#623}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
[modify] https://crrev.com/a4f4074b528820308440e98d80bca54c09435298/chrome/browser/chromeos/arc/auth/arc_robot_auth_code_fetcher.cc
[modify] https://crrev.com/a4f4074b528820308440e98d80bca54c09435298/chrome/browser/chromeos/arc/auth/arc_robot_auth_code_fetcher_browsertest.cc

Labels: Merge-Merged-70-3538
The following revision refers to this bug: 
https://chromium.googlesource.com/chromium/src.git/+/a4f4074b528820308440e98d80bca54c09435298

Commit: a4f4074b528820308440e98d80bca54c09435298
Author: michaelpg@chromium.org
Commiter: michaelpg@chromium.org
Date: 2018-09-24 22:16:00 +0000 UTC

Fix ArcRobotAuthCodeFetcher crash when offline

ArcRobotAuthCodeFetcher will crash if there is no CloudPolicyClient,
which can happen when the device hasn't been online since boot.

Bug:  875504 
Test: ArcRobotAuthCodeFetcherOfflineBrowserTest
TBR=michaelpg@chromium.org

Change-Id: Ia5412be9a85cfe5028aa30caf74a7b4562d342e7
Reviewed-on: https://chromium-review.googlesource.com/1237255
Commit-Queue: Michael Giuffrida <michaelpg@chromium.org>
Reviewed-by: Yury Khmel <khmel@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#593333}(cherry picked from commit 50e0e4fcd954889201bd7e287553114c394c0c61)
Reviewed-on: https://chromium-review.googlesource.com/1241768
Reviewed-by: Michael Giuffrida <michaelpg@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#623}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
Status: Fixed (was: Started)

Sign in to add a comment