New issue
Advanced search Search tips

Issue 821313 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

Leaking render_widget_hosts in tests

Reported by eugene...@yandex-team.ru, Mar 13 2018

Issue description

Chrome Version       : 64.0.3282.186
OS Version: OS X 10.12.6
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
     Safari:
    Firefox:
    IE/Edge:

What steps will reproduce the problem?
launch unit_tests built with memory sanitizer. All tests, and it's nescessary to run binary once to run multiple tests.


What is the expected result?
no memory issues 


What happens instead of that?
In several tests heap use after free happens, because render widget host was not destroyed in previous tests, can e used in next, it has a pinter to deleted RenderProcessHost (actually TestRenderProcessHost).

Please provide any additional information below. Attach a screenshot if
possible.

UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 YaBrowser/18.3.1.736 (beta) Yowser/2.5 Safari/537.36



 
Components: Tests
Labels: Triaged-ET Needs-Triage-M64 TE-NeedsTriageHelp
The issue seems to be out of TE-scope as it is related to Unittest. Hence, adding label TE-NeedsTriageHelp for further investigation from dev team.

Thanks...!!
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 20 2018

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

commit c3d66168f19a47b18c42412a661751a625c502c1
Author: Evgene Gubernatorov <eugenebng@yandex-team.ru>
Date: Tue Mar 20 19:31:45 2018

Fix render widget hosts leaking in tests, added check on that.

Fix render widget hosts leaking in tests, if many tests are launched. Those
render widget hosts have render process host pointer, that is considered
always valid, but it is not so in the next test, because test render process
hosts are deleted in test teardown.

RenderWidgetHostImpl tracks RenderProcessHost as |process_|.

R=sky@chromium.org

Bug:  821313 
Change-Id: Ia6a0f09ad88c8cd5117be4f9ab6682ab9cec178b
Reviewed-on: https://chromium-review.googlesource.com/960081
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: apacible <apacible@chromium.org>
Reviewed-by: François Doray <fdoray@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544487}
[modify] https://crrev.com/c3d66168f19a47b18c42412a661751a625c502c1/chrome/browser/resource_coordinator/tab_manager_unittest.cc
[modify] https://crrev.com/c3d66168f19a47b18c42412a661751a625c502c1/chrome/browser/ui/views/media_router/web_contents_display_observer_view_unittest.cc
[modify] https://crrev.com/c3d66168f19a47b18c42412a661751a625c502c1/content/browser/web_contents/web_contents_impl_unittest.cc
[modify] https://crrev.com/c3d66168f19a47b18c42412a661751a625c502c1/content/public/test/test_renderer_host.cc

Status: Fixed (was: Unconfirmed)
Thanks for fixing this! :)

Sign in to add a comment