Add CHECK for disallowing user profile construction before starting the session |
||||||||
Issue descriptionWe should probably find a way to crash the browser when the profile is attempted to be created when the session start request wasn't issued for it. This should provide a failfast exit for some of the recent bugs, like issue 698057 or (supposedly) issue 689206. The CHECK would prevent running the browser in an unexpected environment (which may lead to, for instance, bypassing the managed policies). Also the CHECK should provide the stack traces which are more likely to point to the culprit code.
,
May 9 2017
I think I found a good place that has the knowledge about the started sessions - session_manager::SessionManager. Seems that this class is called early both on the normal login and on the restart-after-crash path. I'll do a more extensive testing and then publish the CL.
,
May 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f588c3bceb117e579068d1b4b3bb4153642d941d commit f588c3bceb117e579068d1b4b3bb4153642d941d Author: emaxx <emaxx@chromium.org> Date: Wed May 10 11:14:56 2017 Add CHECK on session start for profile construction Fail fast from the profile construction when it's triggered without starting a session first. Crashing the browser is arguably a worth thing to do, as it prevents running the browser in unexpected environment (which may lead to, for instance, bypassing the managed policies). Also this CHECK should provide the stack traces which are more likely to point to the culprit code (as opposed to crashing at some later point asynchronously - like e.g. on the CHECK added at https://crrev.com/2801993002). BUG= 719939 TEST=existing browser tests; manual tests: normal login; Guest login; restart-after-crash. Review-Url: https://codereview.chromium.org/2868043002 Cr-Commit-Position: refs/heads/master@{#470524} [modify] https://crrev.com/f588c3bceb117e579068d1b4b3bb4153642d941d/chrome/browser/profiles/profile_impl.cc [modify] https://crrev.com/f588c3bceb117e579068d1b4b3bb4153642d941d/components/session_manager/core/session_manager.cc [modify] https://crrev.com/f588c3bceb117e579068d1b4b3bb4153642d941d/components/session_manager/core/session_manager.h
,
May 11 2017
,
May 12 2017
This change reached Canary (60.0.3096.0). So far no crashes are reported (which is probably good, as this should the exceptional cases only). Will continue monitoring the crash reports.
,
May 13 2017
,
May 13 2017
Your change meets the bar and is auto-approved for M59. Please go ahead and merge the CL to branch 3071 manually. Please contact milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
May 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4582fd82174a35a2cf098d6d9408a216d1f8b34b commit 4582fd82174a35a2cf098d6d9408a216d1f8b34b Author: Maksim Ivanov <emaxx@chromium.org> Date: Sat May 13 17:54:09 2017 Add CHECK on session start for profile construction Fail fast from the profile construction when it's triggered without starting a session first. Crashing the browser is arguably a worth thing to do, as it prevents running the browser in unexpected environment (which may lead to, for instance, bypassing the managed policies). Also this CHECK should provide the stack traces which are more likely to point to the culprit code (as opposed to crashing at some later point asynchronously - like e.g. on the CHECK added at https://crrev.com/2801993002). BUG= 719939 TEST=existing browser tests; manual tests: normal login; Guest login; restart-after-crash. Review-Url: https://codereview.chromium.org/2868043002 Cr-Original-Commit-Position: refs/heads/master@{#470524} Review-Url: https://codereview.chromium.org/2878233003 . Cr-Commit-Position: refs/branch-heads/3071@{#544} Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641} [modify] https://crrev.com/4582fd82174a35a2cf098d6d9408a216d1f8b34b/chrome/browser/profiles/profile_impl.cc [modify] https://crrev.com/4582fd82174a35a2cf098d6d9408a216d1f8b34b/components/session_manager/core/session_manager.cc [modify] https://crrev.com/4582fd82174a35a2cf098d6d9408a216d1f8b34b/components/session_manager/core/session_manager.h
,
Aug 1 2017
,
Jan 22 2018
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by emaxx@chromium.org
, May 9 2017