New issue
Advanced search Search tips

Issue 809668 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 682680



Sign in to add a comment

RendererScheduler.TaskCountPerQueueType is Overflowing

Project Member Reported by bcwh...@chromium.org, Feb 6 2018

Issue description

The RendererScheduler.TaskCountPerQueueType sparse histogram is being incremented so frequently that it sometimes overflows the 31-bit sample count and rolls negative.  Desktop does uploads about every 30 minutes (and resets the counters) so whatever events these are, it's happening on the order of 1M times per second on some occasions.

https://uma.googleplex.com/p/chrome/histograms/?endDate=20180205&dayCount=1&histograms=RendererScheduler.TaskCountPerQueueType&fixupData=true&showMax=true&filters=channel%2Ceq%2C3%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial

 
Blocking: 682680
Cc: -altimin@chromium.org hajimehoshi@chromium.org
Owner: altimin@chromium.org
I've just landed
https://chromium-review.googlesource.com/c/chromium/src/+/905148

Which adds AddScaled(), AddKilo(), and AddKiB() methods in the base histogram class to increment the count by a scaled amount.  Precision is lost but accuracy is maintained.

You can't just change the Add* method used, though; the name of the histogram needs to be changed (add a "K" suffix?) to avoid confusion.

Project Member

Comment 6 by bugdroid1@chromium.org, Jun 12 2018

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

commit b114f8641a77692d68cb5b9ce781f33c66b55907
Author: Farah Charab <farahcharab@google.com>
Date: Tue Jun 12 11:53:57 2018

Scheduler: Fix overflow in task duration metrics.

Use AddScaled instead of custom aggregating logic in scheduler task
duration histograms and switch scale from seconds to milliseconds.

Bump versions for the affected histograms.

BUG=809668

Change-Id: Ie138671956108c0d0ea45a34209020737c9f25a1
Reviewed-on: https://chromium-review.googlesource.com/966903
Commit-Queue: Farah Charab <farahcharab@chromium.org>
Reviewed-by: Brian White <bcwhite@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566383}
[modify] https://crrev.com/b114f8641a77692d68cb5b9ce781f33c66b55907/base/metrics/histogram.cc
[modify] https://crrev.com/b114f8641a77692d68cb5b9ce781f33c66b55907/third_party/blink/renderer/platform/scheduler/BUILD.gn
[modify] https://crrev.com/b114f8641a77692d68cb5b9ce781f33c66b55907/third_party/blink/renderer/platform/scheduler/common/metrics_helper.cc
[modify] https://crrev.com/b114f8641a77692d68cb5b9ce781f33c66b55907/third_party/blink/renderer/platform/scheduler/common/metrics_helper_unittest.cc
[modify] https://crrev.com/b114f8641a77692d68cb5b9ce781f33c66b55907/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_metrics_helper.cc
[modify] https://crrev.com/b114f8641a77692d68cb5b9ce781f33c66b55907/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_metrics_helper_unittest.cc
[delete] https://crrev.com/31c3829005a8bd2f699eb61d565a0da2dd855d01/third_party/blink/renderer/platform/scheduler/util/task_duration_metric_reporter.cc
[modify] https://crrev.com/b114f8641a77692d68cb5b9ce781f33c66b55907/third_party/blink/renderer/platform/scheduler/util/task_duration_metric_reporter.h
[delete] https://crrev.com/31c3829005a8bd2f699eb61d565a0da2dd855d01/third_party/blink/renderer/platform/scheduler/util/task_duration_metric_reporter_unittest.cc
[modify] https://crrev.com/b114f8641a77692d68cb5b9ce781f33c66b55907/third_party/blink/renderer/platform/scheduler/worker/worker_metrics_helper.cc
[modify] https://crrev.com/b114f8641a77692d68cb5b9ce781f33c66b55907/tools/metrics/histograms/histograms.xml

Glad to see the overflow fixes for the duration histograms.  However, the RendererScheduler.TaskCountPerQueueType is still overflowing and since this is incrementing by 1, that's A LOT of increments in order to overflow in a typical 30-minute upload interval (like 1M/second).

Over the last 28 days, there were:
26 on Dev
90 on Beta
4 on Stable  (odd that this one is much less)

https://uma.googleplex.com/p/chrome/histograms/?endDate=20180205&dayCount=28&histograms=RendererScheduler.TaskCountPerQueueType%2CUMA.NegativeSamples.Histogram&fixupData=true&showMax=true&filters=isofficial%2Ceq%2CTrue&implicitFilters=isofficial

Status: Assigned (was: Available)

Sign in to add a comment