Do not report expired keyed histograms (it breaks GeckoView too!)

RESOLVED FIXED in Firefox 62

Status

()

defect
P1
normal
RESOLVED FIXED
Last year
Last year

People

(Reporter: esawin, Assigned: Dexter)

Tracking

(Blocks 1 bug)

unspecified
mozilla62
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox62 fixed)

Details

Attachments

(3 attachments)

The GeckoView example app is crashing on startup on a fresh install with

F MOZ_Assert: Assertion failure: false (The number of restored buckets does not match with the on in the definition), at /ho
me/esawin/dev/g/toolkit/components/telemetry/TelemetryHistogram.cpp:3146
Flags: needinfo?(alessio.placitelli)
Thanks, I'll look into this.
Assignee: nobody → alessio.placitelli
Blocks: 1452550
Flags: needinfo?(alessio.placitelli)
Priority: -- → P1
Summary: Telemetry histogram assertion on geckoview_example startup → Do not report expired keyed histograms (it breaks GeckoView too!)
Duplicate of this bug: 1468793
Comment on attachment 8985661 [details]
Bug 1468809 - Do not snapshot expired keyed histograms.

https://reviewboard.mozilla.org/r/251196/#review257524

::: toolkit/components/telemetry/TelemetryHistogram.cpp:397
(Diff revision 2)
>    const HistogramInfo& info = gHistogramInfos[histogramId];
> -  kh = new KeyedHistogram(histogramId, info);
> +  const bool isExpired = IsExpiredVersion(info.expiration());
> +
> +  // If the keyed histogram is expired, set its storage to the expired
> +  // keyed histogram.
> +  if (isExpired) {

This control flow is odd. I think it would be better either as if (isExpired && !gExpiredKeyedHistogram) or by adding the kh logic into this if/else block like

if (isExpired) {
  if (!gExpiredKeyedHistogram) {
  }
  kh = gExpiredKeyedHistogram;
} else {
  kh = new KeyedHistogram(...);
}
Attachment #8985661 - Flags: review?(chutten)
Comment on attachment 8985661 [details]
Bug 1468809 - Do not snapshot expired keyed histograms.

https://reviewboard.mozilla.org/r/251196/#review257532
Attachment #8985661 - Flags: review?(chutten) → review+
Comment on attachment 8985661 [details]
Bug 1468809 - Do not snapshot expired keyed histograms.

https://reviewboard.mozilla.org/r/251196/#review257542
Attachment #8985661 - Flags: review?(jrediger) → review+
Pushed by alessio.placitelli@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/469b11ffea7a
Do not snapshot expired keyed histograms. r=chutten,janerik
https://hg.mozilla.org/mozilla-central/rev/469b11ffea7a
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.