Frequent begin_frame_source DCHECK failures on Win10 Debug (Intel HD 530) |
|||||
Issue descriptionSeen on WebGL conformance GLSL tests in particular. https://luci-milo.appspot.com/buildbot/chromium.gpu.fyi/Win10%20Debug%20%28Intel%20HD%20530%29/ [4908:5192:0605/040410.822:FATAL:begin_frame_source.cc(345)] Check failed: (last_begin_frame_args_.source_id != last_args.source_id) || (last_begin_frame_args_.sequence_number > last_args.sequence_number). current {"created_from":"CreateBeginFrameArgs@e:\\b\\c\\b\\win\\src\\cc\\scheduler\\begin_frame_source.cc:180","deadline_us":5231380365.0,"frame_time_us":5231363668.0,"interval_us":16683.0,"on_critical_path":true,"sequence_number":11826,"source_id":2,"subtype":"NORMAL","type":"BeginFrameArgs"}, last {"created_from":"CreateBeginFrameArgs@e:\\b\\c\\b\\win\\src\\cc\\scheduler\\begin_frame_source.cc:180","deadline_us":5231380365.0,"frame_time_us":5231363682.0,"interval_us":16683.0,"on_critical_path":true,"sequence_number":11827,"source_id":2,"subtype":"MISSED","type":"BeginFrameArgs"} Backtrace: base::debug::StackTrace::StackTrace [0x100ADE17+55] base::debug::StackTrace::StackTrace [0x100ADAB1+17] logging::LogMessage::~LogMessage [0x101020BE+94] cc::ExternalBeginFrameSource::GetMissedBeginFrameArgs [0x0EA14CFB+427] cc::ExternalBeginFrameSource::AddObserver [0x0EA14644+388] cc::Scheduler::SetupNextBeginFrameIfNeeded [0x0EA2840B+107] cc::Scheduler::ProcessScheduledActions [0x0EA2768D+845] cc::Scheduler::SetNeedsBeginMainFrame [0x0EA2808D+29] cc::SingleThreadProxy::SetNeedsCommit [0x0EBF620A+218] cc::LayerTreeHost::SetNeedsCommit [0x0EB06674+36] ui::Compositor::ScheduleDraw [0x00CBC427+39] ui::Layer::ScheduleDraw [0x00CDA022+34] ui::Layer::SchedulePaint [0x00CDA0B9+105] views::View::SchedulePaintInRect [0x01457961+65] views::View::SchedulePaint [0x014578A3+35] views::View::SetVisible [0x01458455+53] Tab::AdvanceLoadingAnimation [0x0688B0BC+76] Tab::UpdateLoadingAnimation [0x06891107+55] BrowserTabStripController::UpdateLoadingAnimations [0x0681E7B0+128] TabStrip::UpdateLoadingAnimations [0x06834DA7+39] BrowserView::LoadingAnimationCallback [0x067CEC43+51] BrowserView::UpdateLoadingAnimations [0x067D25D9+201] Browser::LoadingStateChanged [0x065B79F5+69] content::WebContentsImpl::LoadingStateChanged [0x128C4734+388] content::WebContentsImpl::DidStopLoading [0x128BEC8C+252] content::FrameTreeNode::DidStopLoading [0x11E53A19+89] content::RenderFrameHostImpl::OnDidStopLoading [0x11EEA9D2+386]
,
Jun 6 2017
,
Jun 7 2017
sunnyps@, could this be scheduler-related? Feel free to reassign if not.
,
Jun 7 2017
The enable scheduler CL didn't land because of a couple of issues. One of them was a command buffer proxy bug that's fixed by https://chromium-review.googlesource.com/c/526308/ and the other was a begin frame source DCHECK failure (https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Ftryserver.chromium.mac%2Fmac_chromium_rel_ng%2F471303%2F%2B%2Frecipes%2Fsteps%2Fgpu_process_launch_tests_on_ATI_GPU_on_Mac_Retina__with_patch_%2F0%2Fstdout): [38354:775:0606/160506.836808:FATAL:begin_frame_source.cc(40)] Check failed: args.frame_time >= last_begin_frame_args_.frame_time. 0 Chromium Framework 0x000000011f69294c base::debug::StackTrace::StackTrace(unsigned long) + 28 1 Chromium Framework 0x000000011f6b8b20 logging::LogMessage::~LogMessage() + 224 2 Chromium Framework 0x0000000120f8f0f8 cc::BeginFrameObserverBase::OnBeginFrame(cc::BeginFrameArgs const&) + 168 3 Chromium Framework 0x0000000120f91bf2 cc::ExternalBeginFrameSource::AddObserver(cc::BeginFrameObserver*) + 1202 4 Chromium Framework 0x0000000120f99393 cc::Scheduler::SetupNextBeginFrameIfNeeded() + 83 5 Chromium Framework 0x0000000120f981d6 cc::Scheduler::ProcessScheduledActions() + 854 6 Chromium Framework 0x0000000121040956 cc::SingleThreadProxy::SetNeedsCommit() + 150 7 Chromium Framework 0x0000000120fe5f73 cc::LayerTreeHost::SetNeedsCommit() + 19 8 Chromium Framework 0x0000000120eea850 cc::Layer::AddDrawableDescendants(int) + 256 9 Chromium Framework 0x0000000120eeae33 cc::Layer::RemoveChildOrDependent(cc::Layer*) + 259 10 Chromium Framework 0x0000000120ee9f04 cc::Layer::RemoveFromParent() + 116 11 Chromium Framework 0x00000001219b2610 ui::Layer::Remove(ui::Layer*) + 256 12 Chromium Framework 0x00000001219b1f77 ui::Layer::~Layer() + 375 13 Chromium Framework 0x00000001219b279e ui::Layer::~Layer() + 14 14 Chromium Framework 0x000000011dc8bcbf content::DelegatedFrameHost::UpdateGutters() + 479 15 Chromium Framework 0x000000011dc8c8e5 content::DelegatedFrameHost::SubmitCompositorFrame(cc::LocalSurfaceId const&, cc::CompositorFrame) + 1237 16 Chromium Framework 0x000000011dc88269 content::BrowserCompositorMac::SubmitCompositorFrame(cc::LocalSurfaceId const&, cc::CompositorFrame) + 153 17 Chromium Framework 0x000000011dabdb38 content::RenderWidgetHostViewMac::SubmitCompositorFrame(cc::LocalSurfaceId const&, cc::CompositorFrame) + 152 18 Chromium Framework 0x000000011daaedf5 content::RenderWidgetHostImpl::SubmitCompositorFrame(cc::LocalSurfaceId const&, cc::CompositorFrame) + 709 19 Chromium Framework 0x000000011d2da754 cc::mojom::MojoCompositorFrameSinkStubDispatch::Accept(cc::mojom::MojoCompositorFrameSink*, mojo::Message*) + 708 20 Chromium Framework 0x000000011f66d278 mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message*) + 824 21 Chromium Framework 0x000000011f66cc16 mojo::FilterChain::Accept(mojo::Message*) + 150 22 Chromium Framework 0x000000011f66e505 mojo::InterfaceEndpointClient::HandleIncomingMessage(mojo::Message*) + 117 23 Chromium Framework 0x000000011f676904 mojo::internal::MultiplexRouter::ProcessIncomingMessage(mojo::Message*, mojo::internal::MultiplexRouter::ClientCallBehavior, base::SingleThreadTaskRunner*) + 884 24 Chromium Framework 0x000000011f6761cf mojo::internal::MultiplexRouter::Accept(mojo::Message*) + 287 25 Chromium Framework 0x000000011f66cc16 mojo::FilterChain::Accept(mojo::Message*) + 150 26 Chromium Framework 0x000000011f6690b9 mojo::Connector::ReadSingleMessage(unsigned int*) + 281 27 Chromium Framework 0x000000011f6699f1 mojo::Connector::ReadAllAvailableMessages() + 97 28 Chromium Framework 0x000000011f669899 mojo::Connector::OnHandleReadyInternal(unsigned int) + 137 29 Chromium Framework 0x000000011f7af247 mojo::SimpleWatcher::OnHandleReady(int, unsigned int) + 343 30 Chromium Framework 0x000000011f7af6ca void base::internal::Invoker<base::internal::BindState<void (mojo::SimpleWatcher::*)(int, unsigned int), base::WeakPtr<mojo::SimpleWatcher>, int, unsigned int>, void ()>::RunImpl<void (mojo::SimpleWatcher::* const&)(int, unsigned int), std::__1::tuple<base::WeakPtr<mojo::SimpleWatcher>, int, unsigned int> const&, 0ul, 1ul, 2ul>(void (mojo::SimpleWatcher::* const&&&)(int, unsigned int), std::__1::tuple<base::WeakPtr<mojo::SimpleWatcher>, int, unsigned int> const&&&, base::IndexSequence<0ul, 1ul, 2ul>) + 186 31 Chromium Framework 0x0000000120a95258 ui::WindowResizeHelperMac::WaitForSingleTaskToRun(base::TimeDelta const&) + 456 32 Chromium Framework 0x000000011daa881b content::RenderWidgetHostImpl::WaitForSurface() + 811 33 Chromium Framework 0x000000011daa83d2 content::RenderWidgetHostImpl::PauseForPendingResizeOrRepaints() + 98 34 Chromium Framework 0x000000011dac1656 -[RenderWidgetHostViewCocoa setFrameSize:] + 214 35 AppKit 0x00007fffa90d92e3 -[NSView setFrame:] + 390 36 Chromium Framework 0x000000011dbedf7c -[WebContentsViewCocoa setFrameSize:] + 396 37 AppKit 0x00007fffa90d92e3 -[NSView setFrame:] + 390 38 Chromium Framework 0x0000000122cdfd5b -[TabContentsContainerView resizeSubviewsWithOldSize:] + 347 39 AppKit 0x00007fffa90c1bc1 -[NSView setFrameSize:] + 1881 40 AppKit 0x00007fffa90d92e3 -[NSView setFrame:] + 390 41 AppKit 0x00007fffa90e571e -[NSView resizeWithOldSuperviewSize:] + 681 42 AppKit 0x00007fffa90e4fb8 -[NSView resizeSubviewsWithOldSize:] + 360 43 AppKit 0x00007fffa90c1bc1 -[NSView setFrameSize:] + 1881 44 AppKit 0x00007fffa90d92e3 -[NSView setFrame:] + 390 45 AppKit 0x00007fffa90e571e -[NSView resizeWithOldSuperviewSize:] + 681 46 AppKit 0x00007fffa90e4fb8 -[NSView resizeSubviewsWithOldSize:] + 360 47 AppKit 0x00007fffa90c1bc1 -[NSView setFrameSize:] + 1881 48 AppKit 0x00007fffa90d92e3 -[NSView setFrame:] + 390 49 Chromium Framework 0x0000000122c4aff4 -[DevToolsContainerView adjustSubviews] + 692 50 AppKit 0x00007fffa90c1bc1 -[NSView setFrameSize:] + 1881 51 AppKit 0x00007fffa90d92e3 -[NSView setFrame:] + 390 52 AppKit 0x00007fffa90e571e -[NSView resizeWithOldSuperviewSize:] + 681 53 AppKit 0x00007fffa90e4fb8 -[NSView resizeSubviewsWithOldSize:] + 360 54 AppKit 0x00007fffa90c1bc1 -[NSView setFrameSize:] + 1881 55 AppKit 0x00007fffa90d92e3 -[NSView setFrame:] + 390 56 Chromium Framework 0x0000000122c2bf05 -[BrowserWindowController(Private) layoutTabContentArea:] + 149 57 Chromium Framework 0x0000000122c2e55b -[BrowserWindowController(Private) applyLayout:] + 683 58 Chromium Framework 0x0000000122c2baeb -[BrowserWindowController(Private) layoutSubviews] + 235 59 Chromium Framework 0x0000000122c267de -[BrowserWindowController resizeView:newHeight:] + 750 60 Chromium Framework 0x0000000122c83cda -[InfoBarContainerController positionInfoBarsAndRedraw:] + 826 61 Chromium Framework 0x0000000121ab0304 infobars::InfoBarContainer::OnInfoBarStateChanged(bool) + 52 stanisc@ can you check if this was caused by the recent ExternalBFS changes you made? I'll also investigate meanwhile.
,
Jun 7 2017
Yes, I think I might have introduced an issue by refactoring
code in begin_frame_source.cc and inverting the condition that
checked whether to generate MISSED args.
Before the change:
if (!last_args.IsValid() ||
(last_begin_frame_args_.frame_time > last_args.frame_time)) {
// Generate MISSED args here
...
}
After the change:
if (last_args.IsValid() &&
last_begin_frame_args_.frame_time == last_args.frame_time) {
// SKIP generating MISSED args
return BeginFrameArgs();
}
If last_begin_frame_args_.frame_time < last_args.frame_time the
new implementation would now generate MISSED args. The condition
above should be changed to '<='.
Sorry, I didn't realize this condition would be possible. I guess
that might be the case when the same observer gets added to a different
BFS.
I'll get the fix ready ASAP.
,
Jun 7 2017
Yes, looking at DCHECK message details in #1 it is clear that having <= condition would have prevented this.
current: "frame_time_us": 5231363668.0,
last: "frame_time_us": 5231363682.0
current: "sequence_number":11826,
last: "sequence_number":11827
current: "source_id":2,
last: "source_id":2
current: "subtype":"NORMAL"
last: "subtype":"MISSED"
current corresponds to last_begin_frame_args_ and last to last_args
I think the reason I made this mistake is due to a difference between ExternalBFS and DelayBasedBFS. DelayBasedBFS stores MISSED args as last_begin_frame_args_ (which would prevent this issue) while ExternalBFS doesn't. Anyway the fix I mentioned above should be sufficient.
,
Jun 7 2017
Thanks for investigating!
,
Jun 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/25d005fb3364df055d7773cffe7039cfd3d33eca commit 25d005fb3364df055d7773cffe7039cfd3d33eca Author: stanisc <stanisc@chromium.org> Date: Thu Jun 08 01:13:27 2017 Avoid DCHECK in ExternalBeginFrameSource::GetMissedBeginFrameArgs caused by out of order frame time DCHECK was caused by incorrectly inverting the logical check in ExternalBeginFrameSource::AddObserver when refactoring the code. Before the change: if (!last_args.IsValid() || (last_begin_frame_args_.frame_time > last_args.frame_time)) { // Generate MISSED args here ... } After the change: if (last_args.IsValid() && last_begin_frame_args_.frame_time == last_args.frame_time) { // SKIP generating MISSED args return BeginFrameArgs(); } last_begin_frame_args_.frame_time which is smaller than last_args.frame_time, while arguably invalid, would now allow this code to generate a MISSED args and trigger a DCHECK. I've fixed this by changing the condition above to last_begin_frame_args_.frame_time <= last_args.frame_time. I've added a new unit test to cover this specific case. BUG= 730218 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2930813002 Cr-Commit-Position: refs/heads/master@{#477846} [modify] https://crrev.com/25d005fb3364df055d7773cffe7039cfd3d33eca/cc/scheduler/begin_frame_source.cc [modify] https://crrev.com/25d005fb3364df055d7773cffe7039cfd3d33eca/cc/scheduler/begin_frame_source_unittest.cc
,
Jun 9 2017
Seems to be fixed. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by kainino@chromium.org
, Jun 6 2017