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

Issue 848715 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug-Regression

Blocked on:
issue 831925



Sign in to add a comment

Flakiness in WebGL/passthrough tests on Linux: Check failed: false. Observers can only be added once!

Project Member Reported by jmad...@chromium.org, Jun 1 2018

Issue description

This seems to be generally flaky among different tests. Possibly a race condition. Error text:

[1:1:0528/042655.919983:FATAL:observer_list.h(243)] Check failed: false. Observers can only be added once!
#0 0x7fc9632da33c base::debug::StackTrace::StackTrace()
#1 0x7fc963243ccb logging::LogMessage::~LogMessage()
#2 0x7fc960c86649 base::ObserverList<>::AddObserver()
#3 0x7fc962cc2996 base::sequence_manager::TaskQueueManagerImpl::AddTaskTimeObserver()
#4 0x7fc96704b298 blink::LongTaskDetector::RegisterObserver()
#5 0x7fc967049ad8 blink::InteractiveDetector::SetNavigationStartTime()
#6 0x7fc9670263b3 blink::DocumentLoader::DidCommitNavigation()
#7 0x7fc96702519f blink::DocumentLoader::InstallNewDocument()
#8 0x7fc967024d9f blink::DocumentLoader::CommitNavigation()
#9 0x7fc9670237c6 blink::DocumentLoader::CommitData()
#10 0x7fc967025711 blink::DocumentLoader::ProcessData()
#11 0x7fc96702568d blink::DocumentLoader::DataReceived()
#12 0x7fc962c59682 blink::Resource::AppendData()
#13 0x7fc962c52f25 blink::RawResource::AppendData()
#14 0x7fc962c8787b blink::ResourceLoader::DidReceiveData()
#15 0x7fc967ad61b4 content::WebURLLoaderImpl::Context::OnReceivedData()
#16 0x7fc967ad6d47 content::WebURLLoaderImpl::RequestPeerImpl::OnReceivedData()
#17 0x7fc96764abeb content::URLResponseBodyConsumer::OnReadable()
#18 0x7fc96764a268 content::URLLoaderClientImpl::OnStartLoadingResponseBody()
#19 0x7fc960d37cf6 network::mojom::URLLoaderClientStubDispatch::Accept()
#20 0x7fc9638d18a2 mojo::InterfaceEndpointClient::HandleValidatedMessage()
#21 0x7fc9638d1426 mojo::FilterChain::Accept()
#22 0x7fc9638d2da2 mojo::InterfaceEndpointClient::HandleIncomingMessage()
#23 0x7fc9638da3ad mojo::internal::MultiplexRouter::ProcessIncomingMessage()
#24 0x7fc9638d9770 mojo::internal::MultiplexRouter::Accept()
#25 0x7fc9638d1426 mojo::FilterChain::Accept()
#26 0x7fc9638ced5b mojo::Connector::ReadSingleMessage()
#27 0x7fc9638cf7f4 mojo::Connector::ReadAllAvailableMessages()
#28 0x7fc9638cf656 mojo::Connector::OnHandleReadyInternal()
#29 0x7fc9613a6934 mojo::SimpleWatcher::DiscardReadyState()
#30 0x7fc9638c8573 mojo::SimpleWatcher::OnHandleReady()
<snip>

Links to failing builds:

https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20FYI%20Release%20%28NVIDIA%29/2433
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20FYI%20Release%20%28NVIDIA%29/2509

 
Components: -Blink Blink>WebGL
Components: Blink
I don't think this bug is really anything to do with WebGL. The trace looks more like DocumentLoader something/content something.

Comment 3 by kbr@chromium.org, Jun 1 2018

Blockedon: 831925
Cc: jbroman@chromium.org bmcquade@chromium.org tdres...@chromium.org
Components: -Blink Speed>Metrics
Labels: -Type-Bug -Pri-2 Pri-1 Type-Bug-Regression
Owner: npm@chromium.org
Status: Assigned (was: Untriaged)
This sounds like a regression of  Issue 831925 . How did this regress?

npm@, can you take this?

Comment 4 by npm@chromium.org, Jun 1 2018

Cc: dproy@chromium.org
Is this really a regression or just the flakiness popping up again? dproy@ and I didn't see what could be triggering this problem. We call AddTaskTimeObserver() when the size moves from 0 to 1, and call RemoveTaskTimeObserver() when the size becomes 0. |observers_| contains WeakMembers so they could get destroyed, but the InteractiveDetector destructor should be called when that happens.

I could change this to store a bool to keep track of when AddTaskTimeObserver() has been called but it seems unnecessary.

Comment 5 by kbr@chromium.org, Jun 1 2018

npm@, your earlier CL was supposed to prevent duplicate additions. Something unexpected is clearly going on, and the assertion failure is getting hit in our tests, so please revisit the code and try to make it more robust. Thanks.

Project Member

Comment 6 by bugdroid1@chromium.org, Jun 7 2018

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

commit 427a414451ff7ccf07f4b727949e91e8cf3d19f7
Author: Nicolas Pena <npm@chromium.org>
Date: Thu Jun 07 21:50:51 2018

Make InteractiveDetector a ContextLifecycleObserver

This CL fixes flakiness on some WebGL tests. Before, if Time to Interactive was
not detected, the InteractiveDetector would try to unregister itself on its
destructor. If the weak pointer in |observers_| was cleaned up and another
observer was registered between the time the weak pointer was cleaned up and the
destructor of InteractiveDetector was called, we would call
AddTaskTimeObserver() again, hitting a DCHECK.

Bug:  848715 
Change-Id: I6c6bef6811f570367aee3f983919e899ab0db1f5
Reviewed-on: https://chromium-review.googlesource.com/1085628
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565426}
[modify] https://crrev.com/427a414451ff7ccf07f4b727949e91e8cf3d19f7/third_party/blink/renderer/core/loader/interactive_detector.cc
[modify] https://crrev.com/427a414451ff7ccf07f4b727949e91e8cf3d19f7/third_party/blink/renderer/core/loader/interactive_detector.h
[modify] https://crrev.com/427a414451ff7ccf07f4b727949e91e8cf3d19f7/third_party/blink/renderer/platform/long_task_detector.h

Comment 7 by npm@chromium.org, Jun 11 2018

Status: Fixed (was: Assigned)

Sign in to add a comment