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

Issue 854073 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug
Hotlist-MemoryInfra



Sign in to add a comment

Count virtual address space OOM + heap limit OOM accurately in UMA

Project Member Reported by yuzus@chromium.org, Jun 19 2018

Issue description

There are four types of OOMs in renderer.
(a) The renderer is killed by lmkd.
(b) The renderer hits a physical memory OOM.
(c) The renderer hits a virtual address space OOM.
(d) The renderer hits a hard-coded heap limit of some memory component (e.g., V8, Oilpan, PartitionAlloc).

Currently there is no unified place to count (c) + (d), so we should implement a metric to correctly count these OOM crashes.
 

Comment 1 by bokan@chromium.org, Jun 19 2018

Components: -Blink Internals>Metrics

Comment 2 by bokan@chromium.org, Jun 19 2018

Components: Internals>Instrumentation>Memory
Components: -Internals>Metrics
Labels: Hotlist-Metrics
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 21

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

commit 2d12ef936c6d6f2a0c77b6d57278c5a010a9b621
Author: Yuzu Saijo <yuzus@chromium.org>
Date: Tue Aug 21 04:52:07 2018

Implement CrashMemoryMetricsReporter & CrashMemoryMetricsCollector to count OOMs

This CL implements CrashMemoryMetricsReporter on the renderer side and
CrashMemoryMetricsManager on the browser side in order to manage the
shared memory between the two process, which contains OOM related
information. Shared memory now reports whether the crash was because of
virtual address space OOM.

TBR=sky@chromium.org

Bug: 854073
Change-Id: Iebf12b83ac66417e71cba2ba647b080aed3e9da9
Reviewed-on: https://chromium-review.googlesource.com/1139845
Reviewed-by: Yuzu Saijo <yuzus@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Siddhartha S <ssid@chromium.org>
Reviewed-by: Alexandr Ilin <alexilin@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Yuzu Saijo <yuzus@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584653}
[delete] https://crrev.com/4c2f3e9227e104b2b81056869aabb219fafbc490/chrome/browser/android/oom_intervention/DEPS
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/components/crash/content/browser/BUILD.gn
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/components/crash/content/browser/DEPS
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/components/crash/content/browser/child_exit_observer_android.cc
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/components/crash/content/browser/child_exit_observer_android.h
[add] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/components/crash/content/browser/crash_memory_metrics_collector_android.cc
[add] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/components/crash/content/browser/crash_memory_metrics_collector_android.h
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/components/crash/content/browser/crash_metrics_reporter_android.cc
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/components/crash/content/browser/crash_metrics_reporter_android.h
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/components/crash/content/browser/crash_metrics_reporter_android_unittest.cc
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/content/public/app/mojo/content_renderer_manifest.json
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/third_party/blink/common/BUILD.gn
[delete] https://crrev.com/4c2f3e9227e104b2b81056869aabb219fafbc490/third_party/blink/common/oom_intervention/oom_intervention_types.h
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/third_party/blink/public/common/BUILD.gn
[add] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/third_party/blink/public/common/oom_intervention/oom_intervention_types.h
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/third_party/blink/public/mojom/BUILD.gn
[add] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/third_party/blink/public/mojom/crash/OWNERS
[add] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/third_party/blink/public/mojom/crash/crash_memory_metrics_reporter.mojom
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/third_party/blink/public/platform/oom_intervention.mojom
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/third_party/blink/renderer/controller/BUILD.gn
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/third_party/blink/renderer/controller/blink_initializer.cc
[add] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/third_party/blink/renderer/controller/crash_memory_metrics_reporter_impl.cc
[add] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/third_party/blink/renderer/controller/crash_memory_metrics_reporter_impl.h
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/third_party/blink/renderer/controller/oom_intervention_impl.cc
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/third_party/blink/renderer/controller/oom_intervention_impl.h
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/third_party/blink/renderer/controller/oom_intervention_impl_test.cc
[modify] https://crrev.com/2d12ef936c6d6f2a0c77b6d57278c5a010a9b621/tools/metrics/histograms/enums.xml

Cc: wfh@chromium.org
is this bug specific to any particular OS?
I'm finding it hard to understand the motivation or background for this bug? I'm looking at the CLs to try and understand. Is there a design or further background? Can you also answer #5 - is this for all platforms or just Android?
Here is a doc related to why we want the OOM metrics in chrome:
https://docs.google.com/document/d/1yrJJSapCSh1zTpeVF2qopQuSUg2ltkRs6FiV7sQC-rk/edit#heading=h.c47lzf13dugjhttps://docs.google.com/document/d/1yrJJSapCSh1zTpeVF2qopQuSUg2ltkRs6FiV7sQC-rk

I do not believe this bug is specific to any OS. But the main motivation is to analyze OOMs on Android correctly.
Project Member

Comment 8 by bugdroid1@chromium.org, Sep 13

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

commit 0c92aa0f72e2dd58e8e8a86e053e79f801dce629
Author: Yuzu Saijo <yuzus@chromium.org>
Date: Thu Sep 13 02:35:05 2018

Add a base callback for OOM_CRASH() in partition_allocator

This CL adds a callback for OOM_CRASH() in partition_allocator to add a counter
 in UMA. This code path can capture ooms that happen because of virtual
address space exhaustion or overcommit in partition_allocator.

Bug: 854073
Change-Id: I081153857fe1937546bec3f0572eda7a74dfe0f9
Reviewed-on: https://chromium-review.googlesource.com/1188056
Commit-Queue: Yuzu Saijo <yuzus@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Albert J. Wong <ajwong@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590901}
[modify] https://crrev.com/0c92aa0f72e2dd58e8e8a86e053e79f801dce629/base/BUILD.gn
[modify] https://crrev.com/0c92aa0f72e2dd58e8e8a86e053e79f801dce629/base/allocator/partition_allocator/oom.h
[add] https://crrev.com/0c92aa0f72e2dd58e8e8a86e053e79f801dce629/base/allocator/partition_allocator/oom_callback.cc
[add] https://crrev.com/0c92aa0f72e2dd58e8e8a86e053e79f801dce629/base/allocator/partition_allocator/oom_callback.h
[modify] https://crrev.com/0c92aa0f72e2dd58e8e8a86e053e79f801dce629/third_party/blink/renderer/controller/crash_memory_metrics_reporter_impl.cc
[modify] https://crrev.com/0c92aa0f72e2dd58e8e8a86e053e79f801dce629/third_party/blink/renderer/controller/crash_memory_metrics_reporter_impl.h
[modify] https://crrev.com/0c92aa0f72e2dd58e8e8a86e053e79f801dce629/third_party/blink/tools/audit_non_blink_usage.py

Sign in to add a comment