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

Issue 855018 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 23
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

WebContentsImplBrowserTest NotifyFullscreenAcquired_Navigate Flakes on Android

Project Member Reported by jonr...@chromium.org, Jun 21 2018

Issue description

OS: Android
Test Suite: content_browsertests
Runtime args: --enable-features=NetworkService

Example failing build: https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mojo%20Android/5858

Failure log:
[ RUN      ] WebContentsImplBrowserTest.NotifyFullscreenAcquired_Navigate
[WARNING:dns_config_service_posix.cc(333)] Failed to read DnsConfig.
[ERROR:devtools_http_handler.cc(292)] Cannot start http server for devtools. Stop devtools.
[ERROR:shell_android.cc(78)] Not implemented reached in void content::Shell::PlatformSetTitle(const base::string16 &): Cross-site iframe factory
[ERROR:shell_android.cc(78)] Not implemented reached in void content::Shell::PlatformSetTitle(const base::string16 &): Cross-site iframe factory
[INFO:CONSOLE(122)] "Uncaught Error: Expected an identifier, but found end-of-stream.", source: http://c.com:39662/tree_parser_util.js (122)
referenceTable head length=54 1
../../content/browser/web_contents/web_contents_impl_browsertest.cc:2685: Failure
Expected equality of these values:
  0u
    Which is: 0
  web_contents->fullscreen_frame_tree_nodes_.size()
    Which is: 1
Stack trace:
../../content/browser/web_contents/web_contents_impl_browsertest.cc:2686: Failure
Value of: CurrentFullscreenFrameTreeNodeIsEmpty()
  Actual: false
Expected: true
Stack trace:
[ERROR:process_posix.cc(199)] Not implemented reached in bool (anonymous namespace)::WaitForExitWithTimeoutImpl(base::ProcessHandle, int *, base::TimeDelta)
[ERROR:browser_process_sub_thread.cc(216)] Waited 7 ms for network service
[  FAILED  ] WebContentsImplBrowserTest.NotifyFullscreenAcquired_Navigate, where TypeParam =  and GetParam() =  (796 ms)
[----------] 1 test from WebContentsImplBrowserTest (796 ms total)
[----------] Global test environment tear-down

Hi Becca,

I saw that you relanded the test which I've seen flaking in the NetworkService content_browsertests on Android. Could you please take a look?

Thanks,
Jon
 

Comment 1 by mmenke@chromium.org, Jun 21 2018

Cc: -network-service-dev@chromium.org
I'm observing this test being flaky on another Android builder:
- android-marshmallow-arm64-rel
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/android-marshmallow-arm64-rel

Failed build example: https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/android-marshmallow-arm64-rel/5908

Flakiness dashboard:
https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=content_browsertests&tests=WebContentsImplBrowserTest.NotifyFullscreenAcquired_Navigate

Failure log:
[ RUN      ] WebContentsImplBrowserTest.NotifyFullscreenAcquired_Navigate
[WARNING:dns_config_service_posix.cc(333)] Failed to read DnsConfig.
[ERROR:devtools_http_handler.cc(292)] Cannot start http server for devtools. Stop devtools.
[ERROR:shell_android.cc(78)] Not implemented reached in void content::Shell::PlatformSetTitle(const base::string16 &): Cross-site iframe factory
[ERROR:shell_android.cc(78)] Not implemented reached in void content::Shell::PlatformSetTitle(const base::string16 &): Cross-site iframe factory
[INFO:CONSOLE(122)] "Uncaught Error: Expected an identifier, but found end-of-stream.", source: http://c.com:46237/tree_parser_util.js (122)
referenceTable head length=54 1
../../content/browser/web_contents/web_contents_impl_browsertest.cc:2685: Failure
Expected equality of these values:
  0u
    Which is: 0
  web_contents->fullscreen_frame_tree_nodes_.size()
    Which is: 1
Stack trace:
../../content/browser/web_contents/web_contents_impl_browsertest.cc:2686: Failure
Value of: CurrentFullscreenFrameTreeNodeIsEmpty()
  Actual: false
Expected: true
Stack trace:
[  FAILED  ] WebContentsImplBrowserTest.NotifyFullscreenAcquired_Navigate, where TypeParam =  and GetParam() =  (921 ms)
[----------] 1 test from WebContentsImplBrowserTest (921 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (923 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] WebContentsImplBrowserTest.NotifyFullscreenAcquired_Navigate, where TypeParam =  and GetParam() =
 1 FAILED TEST
<<ScopedMainEntryLogger
[INFO:test_support_android.cc(191)] MessagePumpForUIFactory already set, unable to override.
>>ScopedMainEntryLogger
Note: Google Test filter = WebContentsImplBrowserTest.RenderViewCreatedForChildWindow
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from WebContentsImplBrowserTest, where TypeParam =
Searching for native crashes in: /b/swarming/w/itt8YFAQ/tmpRwa3If
Unknown Android release, consider passing --packed-lib.
Reading Android symbols from: /b/swarming/w/ir
Searching for Chrome symbols from within: /b/swarming/w/ir/out/Release/lib.unstripped:/b/swarming/w/ir/out/Release
Stack Trace:
  RELADDR   FUNCTION                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               FILE:LINE
  0000000001e091bb  content::WebContentsImplBrowserTest_NotifyFullscreenAcquired_Navigate_Test::RunTestOnMainThread()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ??:0:0
  0000000003031dd3  content::BrowserTestBase::ProxyRunTestOnMainThreadLoop()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ??:0:0
  0000000001b6d2f7  void base::internal::Invoker<base::internal::BindState<void (content::GenerateMHTMLAndExitRendererMessageFilter::*)(), base::internal::UnretainedWrapper<content::GenerateMHTMLAndExitRendererMessageFilter> >, void ()>::RunImpl<void (content::GenerateMHTMLAndExitRendererMessageFilter::*)(), std::__ndk1::tuple<base::internal::UnretainedWrapper<content::GenerateMHTMLAndExitRendererMessageFilter> >, 0ul>(void (content::GenerateMHTMLAndExitRendererMessageFilter::*&&)(), std::__ndk1::tuple<base::internal::UnretainedWrapper<content::GenerateMHTMLAndExitRendererMessageFilter> >&&, std::__ndk1::integer_sequence<unsigned long, 0ul>)  ??:0:0
  000000000308b687  content::ShellBrowserMainParts::PreMainMessageLoopRun()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ??:0:0
  00000000024570c7  content::BrowserMainLoop::PreMainMessageLoopRun()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ??:0:0
  0000000001b6d2f7  void base::internal::Invoker<base::internal::BindState<void (content::GenerateMHTMLAndExitRendererMessageFilter::*)(), base::internal::UnretainedWrapper<content::GenerateMHTMLAndExitRendererMessageFilter> >, void ()>::RunImpl<void (content::GenerateMHTMLAndExitRendererMessageFilter::*)(), std::__ndk1::tuple<base::internal::UnretainedWrapper<content::GenerateMHTMLAndExitRendererMessageFilter> >, 0ul>(void (content::GenerateMHTMLAndExitRendererMessageFilter::*&&)(), std::__ndk1::tuple<base::internal::UnretainedWrapper<content::GenerateMHTMLAndExitRendererMessageFilter> >&&, std::__ndk1::integer_sequence<unsigned long, 0ul>)  ??:0:0
  00000000026de2d3  content::StartupTaskRunner::RunAllTasksNow()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ??:0:0
  00000000024563b3  content::BrowserMainLoop::CreateStartupTasks()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ??:0:0
  0000000002458917  content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&, std::__ndk1::unique_ptr<content::BrowserProcessSubThread, std::__ndk1::default_delete<content::BrowserProcessSubThread> >)                                                                                                                                                                                                                                                                                                                                                                                                                                              ??:0:0
  0000000002454ccb  content::BrowserMain(content::MainFunctionParams const&, std::__ndk1::unique_ptr<content::BrowserProcessSubThread, std::__ndk1::default_delete<content::BrowserProcessSubThread> >)                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ??:0:0
  0000000003031ba7  content::BrowserTestBase::SetUp()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ??:0:0
  0000000003027fff  content::ContentBrowserTest::SetUp()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ??:0:0
  00000000022456a3  testing::Test::Run()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ??:0:0
-----------------------------------------------------
Stack Trace:
  RELADDR   FUNCTION                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               FILE:LINE
  0000000001e0925b  content::WebContentsImplBrowserTest_NotifyFullscreenAcquired_Navigate_Test::RunTestOnMainThread()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ??:0:0
  0000000003031dd3  content::BrowserTestBase::ProxyRunTestOnMainThreadLoop()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ??:0:0
  0000000001b6d2f7  void base::internal::Invoker<base::internal::BindState<void (content::GenerateMHTMLAndExitRendererMessageFilter::*)(), base::internal::UnretainedWrapper<content::GenerateMHTMLAndExitRendererMessageFilter> >, void ()>::RunImpl<void (content::GenerateMHTMLAndExitRendererMessageFilter::*)(), std::__ndk1::tuple<base::internal::UnretainedWrapper<content::GenerateMHTMLAndExitRendererMessageFilter> >, 0ul>(void (content::GenerateMHTMLAndExitRendererMessageFilter::*&&)(), std::__ndk1::tuple<base::internal::UnretainedWrapper<content::GenerateMHTMLAndExitRendererMessageFilter> >&&, std::__ndk1::integer_sequence<unsigned long, 0ul>)  ??:0:0
  000000000308b687  content::ShellBrowserMainParts::PreMainMessageLoopRun()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ??:0:0
  00000000024570c7  content::BrowserMainLoop::PreMainMessageLoopRun()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ??:0:0
  0000000001b6d2f7  void base::internal::Invoker<base::internal::BindState<void (content::GenerateMHTMLAndExitRendererMessageFilter::*)(), base::internal::UnretainedWrapper<content::GenerateMHTMLAndExitRendererMessageFilter> >, void ()>::RunImpl<void (content::GenerateMHTMLAndExitRendererMessageFilter::*)(), std::__ndk1::tuple<base::internal::UnretainedWrapper<content::GenerateMHTMLAndExitRendererMessageFilter> >, 0ul>(void (content::GenerateMHTMLAndExitRendererMessageFilter::*&&)(), std::__ndk1::tuple<base::internal::UnretainedWrapper<content::GenerateMHTMLAndExitRendererMessageFilter> >&&, std::__ndk1::integer_sequence<unsigned long, 0ul>)  ??:0:0
  00000000026de2d3  content::StartupTaskRunner::RunAllTasksNow()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ??:0:0
  00000000024563b3  content::BrowserMainLoop::CreateStartupTasks()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ??:0:0
  0000000002458917  content::BrowserMainRunnerImpl::Initialize(content::MainFunctionParams const&, std::__ndk1::unique_ptr<content::BrowserProcessSubThread, std::__ndk1::default_delete<content::BrowserProcessSubThread> >)                                                                                                                                                                                                                                                                                                                                                                                                                                              ??:0:0
  0000000002454ccb  content::BrowserMain(content::MainFunctionParams const&, std::__ndk1::unique_ptr<content::BrowserProcessSubThread, std::__ndk1::default_delete<content::BrowserProcessSubThread> >)                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ??:0:0
  0000000003031ba7  content::BrowserTestBase::SetUp()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ??:0:0
  0000000003027fff  content::ContentBrowserTest::SetUp()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ??:0:0
  00000000022456a3  testing::Test::Run()                                          

Comment 3 by dougt@chromium.org, Jun 26 2018

Labels: Hotlist-KnownIssue OS-Android
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 23

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

commit 227c6776099f26f31979b00fd796f5ef4ac045ce
Author: Jonathan Ross <jonross@chromium.org>
Date: Mon Jul 23 13:52:44 2018

Disable Flaky WebContentsImplBrowserTest NotifyFullscreenAcquired_Navigate

The test WebContentsImplBrowserTest NotifyFullscreenAcquired_Navigate Flakes
has been flaking on Android for some time. The owner of the test is currently OOO.
So I'm disabling it on Android.

TBR=boliu@chromium.org
TEST=WebContentsImplBrowserTest NotifyFullscreenAcquired_Navigate

Bug:  855018 
Change-Id: I1e3f71e696e6186663ee162a81a1f3bed5ad80c5
Reviewed-on: https://chromium-review.googlesource.com/1146261
Commit-Queue: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577164}
[modify] https://crrev.com/227c6776099f26f31979b00fd796f5ef4ac045ce/content/browser/web_contents/web_contents_impl_browsertest.cc

Cc: alex...@chromium.org nasko@chromium.org arthurso...@chromium.org
Components: -Internals>Services>Network UI>Browser>Navigation
+CC alexmos@ and nasko@

FYI: What this test does:
1) Make a top page fullscreen.
2) Make a child frame fullscreen.
3) Perform a cross origin navigation on the main frame.
4) Check the number of fullscreen frame (expect 0, but got 1)

It looks like "fullscreen" is exited in: 
#1 WebContentsImpl::FullscreenStateChanged()
#2 WebContentsImpl::RenderFrameDeleted(frame)
#3 RenderFrameImpl::~RenderFrameImpl()

Since the deletion of the main frame is asynchronous for cross process navigation, I think it explains
why this test is flaky on slow bots (i.e. Android and maybe others)

I guess the fix is to call |delegate_->FullscreenStateChanged(this, false /* is_fullscreen */) | on RenderFrameHostImpl in RFHI::SwapOut().

I am not familiar with this, let me know if you have thought about this. I will give it a try tomorrow.

Note: I have the same issue on android and TSAN when keeping the child RFH alive until they have done executing their unload handler (expect 0, but got 2).

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 23

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

commit 22e314b01f55988d41b17f831c313cb82b3f1d4d
Author: Arthur Sonzogni <arthursonzogni@chromium.org>
Date: Thu Aug 23 13:55:56 2018

Fix fullscreen not removed for frame in pending deletion.

RenderFrameHostImpl are removed from the set of frame in fullscreen when
they are deleted. It means they are still in this set in between their
swap out and their deletion. As a result this test was flaky on slow
devices: WebContentsImplbrowserTest.NotifyFullscreenAcquired_Navigate

This CL:
 * Fix this issue by removing the frame immediatly when it is swapped
   out.
 * Renable the flaky test on Android.
 * Add a regression test.

Bug:  855018 , 609963
Change-Id: Ic858acd462cd8f80f39b76c09d5fbd8f9c3110b1
Reviewed-on: https://chromium-review.googlesource.com/1181433
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585473}
[modify] https://crrev.com/22e314b01f55988d41b17f831c313cb82b3f1d4d/content/browser/frame_host/render_frame_host_impl.h
[modify] https://crrev.com/22e314b01f55988d41b17f831c313cb82b3f1d4d/content/browser/frame_host/render_frame_host_manager.cc
[modify] https://crrev.com/22e314b01f55988d41b17f831c313cb82b3f1d4d/content/browser/site_per_process_browsertest.cc
[modify] https://crrev.com/22e314b01f55988d41b17f831c313cb82b3f1d4d/content/browser/web_contents/web_contents_impl.h
[modify] https://crrev.com/22e314b01f55988d41b17f831c313cb82b3f1d4d/content/browser/web_contents/web_contents_impl_browsertest.cc
[modify] https://crrev.com/22e314b01f55988d41b17f831c313cb82b3f1d4d/content/test/content_browser_test_utils_internal.cc
[modify] https://crrev.com/22e314b01f55988d41b17f831c313cb82b3f1d4d/content/test/content_browser_test_utils_internal.h

Status: Fixed (was: Assigned)

Sign in to add a comment