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

Issue 762860 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Memory leak in gpu process (type=gpu-process) with 3d PPAPI/NACL interface

Reported by scheuerm...@barco.com, Sep 7 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Steps to reproduce the problem:
1. Let the Graphics3D example from PPAPI/NACL SDK run for several hours and watch the memory consumption of the chrome gpu process (type=gpu-process)
2. 
3. 

What is the expected behavior?
No increase of memory usage in the gpu process

What went wrong?
If SwapBuffers is called in a loop, the gpu process of chrome increases memory consumption. The memory increase is 1024k approximately every 130 seconds.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 61.0.3163.79 (64-Bit)  Channel: stable
OS Version: Debian 8
Flash Version:
 
I want to play
Cc: pbomm...@chromium.org
Components: Internals>GPU
Labels: Needs-Feedback
 scheuermann@ can you please provide about://gpu details(Please visit the page and saveas html and attach the page) for further triage of the bug. 
I've tested this in two flavors. One without any startup parameters (gpu.html) and one with enabled hardware acceleration (gpu_hw.html) which both showed the problem.

Regards,
Thomas
gpu.html
56.1 KB View Download
gpu_hw.html
51.5 KB View Download
Project Member

Comment 4 by sheriffbot@chromium.org, Sep 8 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "pbommana@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: ericrk@chromium.org
Labels: Needs-Triage-M61

Comment 7 by ericrk@chromium.org, Sep 15 2017

Cc: zmo@chromium.org piman@chromium.org vmi...@chromium.org
Status: Available (was: Unconfirmed)
Hopefully we can reproduce on Intel linux hardware. CCing some people who may want to take a look.

Comment 8 by piman@chromium.org, Sep 15 2017

Owner: piman@chromium.org
I can repro on desktop NVIDIA. About 8k per second, consistent with original report. Will investigate.

Comment 9 by piman@chromium.org, Sep 15 2017

Components: -Internals>GPU Internals>Plugins>Pepper
Labels: OS-Android OS-Chrome OS-Mac OS-Windows
https://chromium-review.googlesource.com/669774 should fix it.
Labels: -Needs-Triage-M61 M-62

Comment 11 by piman@chromium.org, Sep 15 2017

Labels: ReleaseBlock-Beta
RBB per discussion with pbommana, we may want to merge to beta, the fix should be safe.

Comment 12 by piman@chromium.org, Sep 15 2017

Steps to repro:
1- unpack attached tarball
2- run a http server pointing to the graphics_3d directory (e.g. 'cd graphics_3d; python -m SimpleHTTPServer 8000')
3- open chrome and point it to http://localhost:8000/index.html
4- open chrome task manager, observe the 'Memory' column for 'GPU process'

After a few seconds for the memory to settle down, the amount should not grow over time. Before the fix, it grows by about 8k per second (~450k per minute)
graphics_3d.tar.gz
1.1 MB Download
Project Member

Comment 13 by bugdroid1@chromium.org, Sep 15 2017

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

commit cc0169cd1b636d8cd1c949289242d63e5a554504
Author: Antoine Labour <piman@chromium.org>
Date: Fri Sep 15 23:28:09 2017

Fix mailbox leak in PPB_Graphics3D_Impl

PPB_Graphics3D_Impl::ReturnFrontBuffer is supposed to return the mailbox
into mailboxes_to_reuse_, but somehow that line got accidentally
removed, forcing creation of a new mailbox on every swap, causing a
logical leak.

Bug:  762860 
Change-Id: I35fe4852c6cf0f42084999256fff1bb01b391359
Reviewed-on: https://chromium-review.googlesource.com/669774
Reviewed-by: Erik Chen <erikchen@chromium.org>
Commit-Queue: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502438}
[modify] https://crrev.com/cc0169cd1b636d8cd1c949289242d63e5a554504/content/renderer/pepper/ppb_graphics_3d_impl.cc

Cc: abdulsyed@chromium.org

Comment 15 by piman@chromium.org, Sep 18 2017

Labels: -OS-Android Merge-Request-62
Project Member

Comment 16 by sheriffbot@chromium.org, Sep 18 2017

Labels: -Merge-Request-62 Merge-Review-62 Hotlist-Merge-Review
This bug requires manual review: M62 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-62 Merge-Approved-62
Approving merge to M62. This is marked as a beta blocker, and fix is quite simple/straightforward. Please merge to branch:3202.

Comment 18 by piman@chromium.org, Sep 18 2017

Status: Fixed (was: Available)
Project Member

Comment 19 by bugdroid1@chromium.org, Sep 18 2017

Labels: -merge-approved-62 merge-merged-3202
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/726f8530571b03053da11b4b9d859c48ee6fb2b3

commit 726f8530571b03053da11b4b9d859c48ee6fb2b3
Author: Antoine Labour <piman@chromium.org>
Date: Mon Sep 18 18:03:11 2017

Fix mailbox leak in PPB_Graphics3D_Impl

PPB_Graphics3D_Impl::ReturnFrontBuffer is supposed to return the mailbox
into mailboxes_to_reuse_, but somehow that line got accidentally
removed, forcing creation of a new mailbox on every swap, causing a
logical leak.

Bug:  762860 
Change-Id: I35fe4852c6cf0f42084999256fff1bb01b391359
Reviewed-on: https://chromium-review.googlesource.com/669774
Reviewed-by: Erik Chen <erikchen@chromium.org>
Commit-Queue: Antoine Labour <piman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#502438}(cherry picked from commit cc0169cd1b636d8cd1c949289242d63e5a554504)
Reviewed-on: https://chromium-review.googlesource.com/671525
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/branch-heads/3202@{#295}
Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098}
[modify] https://crrev.com/726f8530571b03053da11b4b9d859c48ee6fb2b3/content/renderer/pepper/ppb_graphics_3d_impl.cc

Comment 20 by ajha@chromium.org, Sep 20 2017

Cc: ajha@chromium.org
Labels: Needs-Feedback
Tested this as per the test steps from C#12 on Windows-10, chrome version: 62.0.3202.18(Before fix) and on 62.0.3202.29(after fix) and didn't observe ~450k per minute increase in GPU memory on either version. Per C#8 this is reproducible on Desktop NVIDIA but as per the testing performed on ANGLE (NVIDIA Quadro K1200 Direct3D11 vs_5_0 ps_5_0) there was not much difference on the build with and without the fix.


Attached is the screen-cast of the testing performed on build with(62.0.3202.29) and without(62.0.3202.18) fix on Windows-10.

piman@: As issue is not reproducible from our end, could you please help in verification of this or confirm if anything being missed here?

Thanks in advance! 
762860_Beforefix_62.0.3202.18.mp4
3.6 MB View Download
762860_Afterfix_62.0.3202.29.mp4
3.0 MB View Download

Comment 21 by piman@chromium.org, Sep 20 2017

@#20: Not sure. I suspect the Windows memory allocator does enough pooling that we don't see the small-ish increase, maybe we only see it as the allocator gets more memory from the system. Maybe if you let it run longer (10-ish minutes) it'll become more apparent?

Note that the code (therefore the bug) is cross-platform (and cross-GPU), and it was definitely very visible on Linux. I haven't tried other platforms. You could try to check Linux or Mac.
Labels: -Needs-Feedback TE-Verified-62.0.3202.29
I see a clear repro on Linux Ubuntu 14.04 (NVIDIA) on previous beta#62.0.3202.18 and it has been fixed on Latest Beta#62.0.3202.29 as per the above fix.

Thank you!
I've tested Chrome 62.0.3202.29 here and can confirm that the memory leak in the gpu process doesn't occur anymore.
Thank you for your effort.
Thomas

Sign in to add a comment