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

Issue 727830 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
please use my google.com address
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Potential memory leak in Service Manager

Project Member Reported by etienneb@chromium.org, May 30 2017

Issue description

An experiment shows that multiple objects are leaked in the browser process when navigating to a few set of web-pages over a long period of time.

The following code was used for repro:
  https://codereview.chromium.org/2906113002

details:
  https://docs.google.com/a/google.com/document/d/1ULZRYBElYmBDGswF3f4yYpl77SD9sa0RgFNfl1FueWU/edit?usp=sharing

There are about 11M objects leaks over a period of two days.

 
mojo.png
62.2 KB View Download
mojo2.png
53.6 KB View Download
Cc: primiano@chromium.org

Comment 2 by roc...@chromium.org, May 30 2017

Components: -Internals>Mojo Internals>ServiceManager
Status: Assigned (was: Untriaged)
Summary: Potential memory leak in Service Manager (was: Multiple potential memory leaks with MOJO objects)
Upon closer inspection, something seems wrong with that stack trace. There's no conceivable way to go from InterfaceProoviderImpl's ctor to the rest of the top of the stack.

It is entirely conceivable that these InterfaceProviderImpl instances are leaking. That's relatively new code in the service manager and we can use this bug to track that investigation specifically.

If there are other leak stacks they should be filed as separate bugs. There is not much value in having an umbrella bug which asserts generally that Mojo leaks.
Project Member

Comment 3 by bugdroid1@chromium.org, May 31 2017

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

commit 476d6743b4fc42dd2a2bcf3664642c4884a70cc0
Author: Ken Rockot <rockot@chromium.org>
Date: Wed May 31 12:26:59 2017

Service Manager: Clean up interface filters with broken pipes

Ensures that interface filters installed by SM clients are cleaned up
properly when either end of their connection is broken. This fixes a
leak wherein the browser will accumulate such filters (and any pending
messages from either end) indefinitely for every child process started
by the browser.

BUG= 727830 

Change-Id: Ia838600e074b8c174725a30badf4929ed6fc264a
Reviewed-on: https://chromium-review.googlesource.com/517997
Commit-Queue: Ken Rockot <rockot@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#475888}
[modify] https://crrev.com/476d6743b4fc42dd2a2bcf3664642c4884a70cc0/services/service_manager/service_manager.cc

Comment 4 by roc...@chromium.org, May 31 2017

Labels: Merge-Request-60
Status: Fixed (was: Assigned)
This leak was introduced by r467415, so it only made it into M60. Will merge.
Please tag with appropriate OSs.  Thanks.

Comment 6 by roc...@chromium.org, May 31 2017

Labels: OS-All
Project Member

Comment 7 by sheriffbot@chromium.org, Jun 1 2017

Labels: -Merge-Request-60 Hotlist-Merge-Approved Merge-Approved-60
Your change meets the bar and is auto-approved for M60. Please go ahead and merge the CL to branch 3112 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), josafat@(ChromeOS), bustamante@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 1 2017

Labels: -merge-approved-60 merge-merged-3112
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/608251e44f61c9cda867f644f61c7d5d9e92620e

commit 608251e44f61c9cda867f644f61c7d5d9e92620e
Author: Ken Rockot <rockot@chromium.org>
Date: Thu Jun 01 14:36:52 2017

Service Manager: Clean up interface filters with broken pipes

Ensures that interface filters installed by SM clients are cleaned up
properly when either end of their connection is broken. This fixes a
leak wherein the browser will accumulate such filters (and any pending
messages from either end) indefinitely for every child process started
by the browser.

BUG= 727830 
TBR=rockot@chromium.org

(cherry picked from commit 476d6743b4fc42dd2a2bcf3664642c4884a70cc0)

Change-Id: Ia838600e074b8c174725a30badf4929ed6fc264a
Reviewed-on: https://chromium-review.googlesource.com/517997
Commit-Queue: Ken Rockot <rockot@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#475888}
Reviewed-on: https://chromium-review.googlesource.com/521202
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/branch-heads/3112@{#88}
Cr-Branched-From: b6460e24cf59f429d69de255538d0fc7a425ccf9-refs/heads/master@{#474897}
[modify] https://crrev.com/608251e44f61c9cda867f644f61c7d5d9e92620e/services/service_manager/service_manager.cc

So, do I understand correctly that you here had a leak because of broken pipes?
(I am sorry, I tried very hard but I couldn't refrain myself from making this joke)
[CHORTLING INTENSIFIES]
Components: -Internals>ServiceManager Internals>Services>ServiceManager

Sign in to add a comment