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

Issue 837009 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

LockToOriginIfNeeded() might set some crash keys even without a crash

Project Member Reported by alex...@chromium.org, Apr 25 2018

Issue description

When not locking a process to an origin, SiteInstanceImpl::LockToOriginIfNeeded() has the following sanity check:
    base::debug::SetCrashKeyString(bad_message::GetRequestedSiteURLKey(),
                                   site_.spec());
    base::debug::SetCrashKeyString(
        bad_message::GetKilledProcessOriginLockKey(),
        policy->GetOriginLock(process_->GetID()).spec());
    CHECK_EQ(lock_state,
             ChildProcessSecurityPolicyImpl::CheckOriginLockResult::NO_LOCK)
        << "Trying to commit non-isolated site " << site_
        << " in process locked to " << policy->GetOriginLock(process_->GetID());

This might set the request_site_url and killed_process_origin_lock unnecessarily even if the CHECK_EQ doesn't cause a crash.  Instead, we should check the lock_state first, and only set these crash keys if we are actually going to crash.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 28 2018

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

commit 1656c6780e6e347520391b1a1c6bfcc68c4b0cad
Author: Alex Moshchuk <alexmos@chromium.org>
Date: Sat Apr 28 01:48:34 2018

Don't set crash keys if there's no crash in LockToOriginIfNeeded().

Bug:  837009 
Change-Id: Ia239d85b546c2265e77564356d2c1a2e2fc3aa74
Reviewed-on: https://chromium-review.googlesource.com/1029006
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554607}
[modify] https://crrev.com/1656c6780e6e347520391b1a1c6bfcc68c4b0cad/content/browser/site_instance_impl.cc

Labels: Merge-Request-67
Should be fixed by r554607.  Requesting merge to M67 - this is a safe change that should make site isolation crash reports more useful on M67.  I also verified on canary for a few "renderer kill 4" crashes - these used to have requested_site_url set to an NTP URL that probably had nothing to do with the kill, but that crash key isn't present in the latest reports from 68.0.3415.0.
Project Member

Comment 3 by sheriffbot@chromium.org, Apr 30 2018

Labels: -Merge-Request-67 Merge-Review-67 Hotlist-Merge-Review
This bug requires manual review: M67 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 4 by creis@chromium.org, Apr 30 2018

Cc: gov...@chromium.org
Status: Fixed (was: Assigned)
Just looked at r554607.  Agreed that it's a very safe change that would avoid having a lot of false leads in M67 crash investigations (due to crash keys being logged in too many cases).  Merging it should help us diagnose M67 crash reports more quickly, so I think it's worth it.  Thanks!

(Also marking fixed, since the issue should be resolved on trunk.)

Comment 5 by gov...@chromium.org, Apr 30 2018

Labels: -Merge-Review-67 Merge-Approved-67
Approving merge for CL r554607 to M67 branch 3396 based on commenta #2 and #4. Pls merge ASAP so we can pick it up for this week M67 beta release. Thank you.
Project Member

Comment 6 by bugdroid1@chromium.org, Apr 30 2018

Labels: -merge-approved-67 merge-merged-3396
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ad1172a55f6d98ad21e3ac201089a5a62f8d76b5

commit ad1172a55f6d98ad21e3ac201089a5a62f8d76b5
Author: Alex Moshchuk <alexmos@chromium.org>
Date: Mon Apr 30 20:48:04 2018

Don't set crash keys if there's no crash in LockToOriginIfNeeded(). (Merge to M67)

TBR=alexmos@chromium.org

(cherry picked from commit 1656c6780e6e347520391b1a1c6bfcc68c4b0cad)

Bug:  837009 
Change-Id: Ia239d85b546c2265e77564356d2c1a2e2fc3aa74
Reviewed-on: https://chromium-review.googlesource.com/1029006
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#554607}
Reviewed-on: https://chromium-review.googlesource.com/1036111
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/branch-heads/3396@{#397}
Cr-Branched-From: 9ef2aa869bc7bc0c089e255d698cca6e47d6b038-refs/heads/master@{#550428}
[modify] https://crrev.com/ad1172a55f6d98ad21e3ac201089a5a62f8d76b5/content/browser/site_instance_impl.cc

Sign in to add a comment