New issue
Advanced search Search tips

Issue 679046 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Possible Overflows in DataUse.ContentType Histograms

Project Member Reported by mpear...@chromium.org, Jan 6 2017

Issue description


In
http://b/34077453#comment2
it was pointed out to me that the histograms in the changelist
"Record the data use by content type"
https://codereview.chromium.org/2595503002/
are likely to overflow.

>>>
It appears that you're incrementing each bucket by the number of bytes.  ...  Importantly, the "count" is limited at 32-bits even on 64-bit platforms.  Since you're counting video bytes, it seems likely that you're going to overflow these counters which will cause errors to reported as the sum of the 32-bit counters fails to match the total 64-bit counter.
>>>

You should evaluate your use of this histogram to consider whether this can affect you.

Apologies that I didn't catch this during the review.
 
At a quick glance, it looks like some of the other histograms in that directory also will exhibit similar problems.

Thanks for pointing this out.
I will look at moving the histograms to using STATIC_HISTOGRAM_POINTER_GROUP or some other technique.

"Memory.PressureLevel" is another histogram that may exhibit this problem.
> I will look at moving the histograms to using STATIC_HISTOGRAM_POINTER_GROUP
> or some other technique.
That will not help.  That's just a way to write simpler code. I.e., instead of if (...) emit to "A" histogram else if (...) emit to "B" histogram else if (...) emit to "C" histogram, it will let you write that in one line a function GetHistogramNameForIndex().  It does not have do anything about the overflow problem.


Ok. got it.
The histogram counters are not reset after an UMA upload, and will live for the entire browser run. So overflows are highly likely.
Overflows are seen in Desktop for DataUse.ContentType.UserTraffic histogram.

The histograms should be converted to a 1kB increment, or should be logged as a regular UMA(instead of incrementing using AddCount).

Comment 6 by bengr@chromium.org, Apr 30 2017

Labels: M-60
We shouldn't have overflows.
Status: Fixed (was: Assigned)

Sign in to add a comment