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

Issue 2511413002: Add debug info for field trial allocation crash (Closed)

Created:
4 years, 1 month ago by lawrencewu
Modified:
4 years ago
CC:
chromium-reviews, asvitkine+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add debug info for field trial allocation crash We're somehow adding the same field trial but with different group names to the allocator. This CL adds a check for when that happens, and aliases the relevant data so we can see it in the minidump. BUG=666230 Committed: https://crrev.com/4e835c3b0ff28e8214bb41cb1995d9fb33b7fbe7 Cr-Commit-Position: refs/heads/master@{#433887}

Patch Set 1 #

Patch Set 2 : add check when adding a duplicate to allocator #

Total comments: 12

Patch Set 3 : iterate through allocator to check for existing allocator #

Total comments: 4

Patch Set 4 : address nits #

Patch Set 5 : check the allocator after we verify it's nullness #

Total comments: 5

Patch Set 6 : address comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -6 lines) Patch
M base/metrics/field_trial.h View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M base/metrics/field_trial.cc View 1 2 3 4 5 3 chunks +66 lines, -4 lines 2 comments Download

Messages

Total messages: 30 (15 generated)
lawrencewu
Verified that the first part (when we're getting the trials from shm in child process) ...
4 years, 1 month ago (2016-11-18 16:28:04 UTC) #4
Alexei Svitkine (slow)
https://codereview.chromium.org/2511413002/diff/20001/base/metrics/field_trial.cc File base/metrics/field_trial.cc (right): https://codereview.chromium.org/2511413002/diff/20001/base/metrics/field_trial.cc#newcode863 base/metrics/field_trial.cc:863: const size_t buf_size = 100; Nit: constexpr https://codereview.chromium.org/2511413002/diff/20001/base/metrics/field_trial.cc#newcode865 base/metrics/field_trial.cc:865: ...
4 years, 1 month ago (2016-11-21 16:26:33 UTC) #6
lawrencewu
Address comments. https://codereview.chromium.org/2511413002/diff/20001/base/metrics/field_trial.cc File base/metrics/field_trial.cc (right): https://codereview.chromium.org/2511413002/diff/20001/base/metrics/field_trial.cc#newcode863 base/metrics/field_trial.cc:863: const size_t buf_size = 100; On 2016/11/21 ...
4 years, 1 month ago (2016-11-21 20:08:15 UTC) #7
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/2511413002/diff/40001/base/metrics/field_trial.cc File base/metrics/field_trial.cc (right): https://codereview.chromium.org/2511413002/diff/40001/base/metrics/field_trial.cc#newcode190 base/metrics/field_trial.cc:190: std::string trial_name, Nit: const& Same for the next ...
4 years, 1 month ago (2016-11-21 20:11:33 UTC) #10
lawrencewu
Address nits and fix bug by moving checking the allocator to after checking that the ...
4 years, 1 month ago (2016-11-21 20:41:23 UTC) #11
brucedawson
https://codereview.chromium.org/2511413002/diff/80001/base/metrics/field_trial.cc File base/metrics/field_trial.cc (right): https://codereview.chromium.org/2511413002/diff/80001/base/metrics/field_trial.cc#newcode206 base/metrics/field_trial.cc:206: std::string existing_trial_name = trial_name_to_check.as_string(); Why copy these to std::string ...
4 years, 1 month ago (2016-11-21 22:07:00 UTC) #12
lawrencewu
Address comments. https://codereview.chromium.org/2511413002/diff/80001/base/metrics/field_trial.cc File base/metrics/field_trial.cc (right): https://codereview.chromium.org/2511413002/diff/80001/base/metrics/field_trial.cc#newcode206 base/metrics/field_trial.cc:206: std::string existing_trial_name = trial_name_to_check.as_string(); On 2016/11/21 22:07:00, ...
4 years, 1 month ago (2016-11-22 15:17:54 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2511413002/100001
4 years, 1 month ago (2016-11-22 16:26:56 UTC) #20
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 1 month ago (2016-11-22 17:00:03 UTC) #23
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/4e835c3b0ff28e8214bb41cb1995d9fb33b7fbe7 Cr-Commit-Position: refs/heads/master@{#433887}
4 years, 1 month ago (2016-11-22 17:04:38 UTC) #25
brucedawson
https://codereview.chromium.org/2511413002/diff/80001/base/metrics/field_trial.cc File base/metrics/field_trial.cc (right): https://codereview.chromium.org/2511413002/diff/80001/base/metrics/field_trial.cc#newcode206 base/metrics/field_trial.cc:206: std::string existing_trial_name = trial_name_to_check.as_string(); On 2016/11/22 15:17:54, lawrencewu wrote: ...
4 years, 1 month ago (2016-11-22 17:55:24 UTC) #26
Alexei Svitkine (slow)
https://codereview.chromium.org/2511413002/diff/100001/base/metrics/field_trial.cc File base/metrics/field_trial.cc (right): https://codereview.chromium.org/2511413002/diff/100001/base/metrics/field_trial.cc#newcode219 base/metrics/field_trial.cc:219: group_name_to_check.as_string().c_str(), buf_size); On 2016/11/22 17:55:24, brucedawson wrote: > Unfortunately, ...
4 years, 1 month ago (2016-11-22 18:49:30 UTC) #27
lawrencewu
I expect this code can be removed by Friday. If we still need it afterwards, ...
4 years, 1 month ago (2016-11-22 22:48:06 UTC) #28
brucedawson
On 2016/11/22 22:48:06, lawrencewu wrote: > I expect this code can be removed by Friday. ...
4 years, 1 month ago (2016-11-23 01:00:07 UTC) #29
Alexei Svitkine (slow)
4 years ago (2016-11-24 19:01:08 UTC) #30
Message was sent while issue was closed.
For GetActiveFieldTrialGroupsFromString() specifically, it's only called
once per child process startup and in fact is going away when Lawrence's
shared memory work is enabled, so not a big deal. (It's also not copying
the same string over.)

However, probably the general problem is FieldTrial::State is using
StringPiece for its members - originally to minimize copying - but in
practice seems to result in these temporaries having to be created in a
bunch of places. Instead, I think we should just change its members to just
be const std::string* instead. I've filed crbug.com/668538 for this with
more details.

On Tue, Nov 22, 2016 at 8:00 PM, <brucedawson@chromium.org> wrote:

> On 2016/11/22 22:48:06, lawrencewu wrote:
> > I expect this code can be removed by Friday. If we still need it
> afterwards,
> > then I'll make it strlcpy() directly from the StringPiece.
>
> Thanks.
>
> I notice that there is a TODO to remove some of the as_string calls that
> are not
> in the debugging code, but there are quite a few other as_string calls
> that are
> not tagged as such and are not in the debugging code. Some of them
> (FieldTrialList::GetActiveFieldTrialGroupsFromString) seem to result in
> making
> multiple copies of the string. It would be nice to get rid of these
> impedance
> mismatches in future versions of the code.
>
>
> https://codereview.chromium.org/2511413002/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698