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

Issue 857112 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
OOO until 2019-01-24
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug

Blocked on:
issue 828135

Blocking:
issue 862069



Sign in to add a comment

Flaky CHECK in GLES2Implementation::SingleThreadChecker::SingleThreadChecker during WebglConformance_deqp_functional_gles3_transformfeedback_random_separate_points on Mac FYI Retina Release (NVIDIA)

Project Member Reported by ynovikov@chromium.org, Jun 27 2018

Issue description

Observed in:
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac%20FYI%20Retina%20Release%20(NVIDIA)/2076
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Mac%20FYI%20Retina%20Release%20(NVIDIA)/2060

[5241:775:0626/044023.798871:FATAL:gles2_implementation.cc(150)] Check failed: 0 == gles2_implementation_->use_count_ (0 vs. 1)
0   Chromium Framework                  0x000000011961233c base::debug::StackTrace::StackTrace(unsigned long) + 28
1   Chromium Framework                  0x00000001195345ef logging::LogMessage::~LogMessage() + 223
2   Chromium Framework                  0x000000011a8f0206 gpu::gles2::GLES2Implementation::DeleteQueriesEXT(int, unsigned int const*) + 118
3   Chromium Framework                  0x000000011efd6a21 blink::WebGLQuery::DeleteObjectImpl(gpu::gles2::GLES2Interface*) + 33
4   Chromium Framework                  0x000000011efd59ed blink::WebGLObject::DeleteObject(gpu::gles2::GLES2Interface*) + 109
5   Chromium Framework                  0x000000011efd5aec blink::WebGLObject::RunDestructor() + 108
6   Chromium Framework                  0x000000011efd6849 blink::WebGLQuery::~WebGLQuery() + 25
7   Chromium Framework                  0x0000000118bae2a3 blink::NormalPage::Sweep() + 419
8   Chromium Framework                  0x0000000118ba955f blink::BaseArena::SweepUnsweptPage() + 79
9   Chromium Framework                  0x0000000118ba98f8 blink::BaseArena::CompleteSweep() + 280
10  Chromium Framework                  0x0000000118bbb9ae blink::ThreadState::EagerSweep() + 190
11  Chromium Framework                  0x0000000118bbb424 blink::ThreadState::AtomicPauseEpilogue(blink::BlinkGC::MarkingType, blink::BlinkGC::SweepingType) + 452
12  Chromium Framework                  0x0000000118bbe93b blink::ThreadState::RunAtomicPause(blink::BlinkGC::StackState, blink::BlinkGC::MarkingType, blink::BlinkGC::SweepingType, blink::BlinkGC::GCReason) + 443
13  Chromium Framework                  0x0000000118bb636f blink::ThreadState::CollectGarbage(blink::BlinkGC::StackState, blink::BlinkGC::MarkingType, blink::BlinkGC::SweepingType, blink::BlinkGC::GCReason) + 415
14  Chromium Framework                  0x0000000118bb8dba blink::ThreadState::ScheduleGCIfNeeded() + 810
15  Chromium Framework                  0x0000000118bad1ff blink::NormalPageArena::OutOfLineAllocate(unsigned long, unsigned long) + 431
16  Chromium Framework                  0x000000011dd90d0c blink::Member<blink::ConsoleMessage>* blink::HeapAllocator::AllocateVectorBacking<blink::Member<blink::ConsoleMessage> >(unsigned long) + 252
17  Chromium Framework                  0x000000011dd90bd9 WTF::VectorBufferBase<blink::Member<blink::ConsoleMessage>, false, blink::HeapAllocator>::AllocateBuffer(unsigned long) + 265
18  Chromium Framework                  0x000000011e136530 WTF::Deque<blink::Member<blink::ConsoleMessage>, 0ul, blink::HeapAllocator>::ExpandCapacity() + 368
19  Chromium Framework                  0x000000011e1361f7 void WTF::Deque<blink::Member<blink::ConsoleMessage>, 0ul, blink::HeapAllocator>::push_back<blink::ConsoleMessage*&>(blink::ConsoleMessage*&&&) + 55
20  Chromium Framework                  0x000000011e1361b0 blink::ConsoleMessageStorage::AddConsoleMessage(blink::ExecutionContext*, blink::ConsoleMessage*) + 320
21  Chromium Framework                  0x000000011ddc1e8e blink::FrameConsole::AddMessageToStorage(blink::ConsoleMessage*) + 94
22  Chromium Framework                  0x000000011ddc1da2 blink::FrameConsole::AddMessage(blink::ConsoleMessage*) + 386
23  Chromium Framework                  0x000000011da58093 blink::Document::AddConsoleMessage(blink::ConsoleMessage*) + 963
24  Chromium Framework                  0x000000011eff3d58 blink::WebGLRenderingContextBase::PrintGLErrorToConsole(WTF::String const&) + 136
25  Chromium Framework                  0x000000011eff3117 blink::WebGLRenderingContextBase::OnErrorMessage(char const*, int) + 71
26  Chromium Framework                  0x000000011f017dfa WTF::ThreadCheckingCallbackWrapper<base::RepeatingCallback<void (char const*, int)>, void (char const*, int)>::Run(char const*, int) + 186
27  Chromium Framework                  0x000000011a8c1876 gpu::gles2::GLES2Implementation::MapBufferRange(unsigned int, long, long, unsigned int) + 838
28  Chromium Framework                  0x000000011efb99f1 blink::WebGL2RenderingContextBase::getBufferSubData(unsigned int, long long, blink::MaybeShared<blink::DOMArrayBufferView>, unsigned int, unsigned int) + 161
29  Chromium Framework                  0x000000011ea0acdb blink::V8WebGL2RenderingContext::getBufferSubDataMethodCallback(v8::FunctionCallbackInfo<v8::Value> const&) + 827
30  Chromium Framework                  0x0000000117d4140c v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) + 828
31  Chromium Framework                  0x0000000117d3f6ae v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 958
32  Chromium Framework                  0x0000000117d3da40 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 704
33  Chromium Framework                  0x0000000117d3d548 v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) + 200
34  Chromium Framework                  0x0000000118b19d55 v8_Default_embedded_blob_ + 2665493
35  ???                                 0x0000001707d0cb71 0x0 + 98915371889
36  ???                                 0x0000001707d0cb71 0x0 + 98915371889
37  ???                                 0x0000001707d0cb71 0x0 + 98915371889

Going to mark the test flaky, but something weird is going on.
Prioritizing as P1, as this CHECK can potentially show up for users.
 

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

Cc: kainino@chromium.org
Status: Available (was: Untriaged)
It's a bit difficult to understand from that stack trace but here's the assertion failure:
https://cs.chromium.org/chromium/src/gpu/command_buffer/client/gles2_implementation.cc?q=gles2_implementation.cc&sq=package:chromium&dr&l=150

The problem's that gpu::gles2::GLES2Implementation::MapBufferRange is causing the OpenGL error callback to be called which makes an upcall back to Blink, triggering a GC and calling back into the GLES2Implementation.

Will have to rethink how this callback works. Will probably have to save the error messages for posting at a later time.

Comment 2 by kbr@chromium.org, Jun 27 2018

Owner: kbr@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 27 2018

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

commit 4738086ff2e233def1dc1ebcb6e1459639260507
Author: Yuly Novikov <ynovikov@chromium.org>
Date: Wed Jun 27 20:52:59 2018

Suppress a Flaky WebGL2 test

deqp/functional/gles3/transformfeedback/random_separate_points.html
on Mac Retina Nvidia

TBR=kbr@chromium.org

Bug:  857112 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I260fe3a05bf4f68cd9cb154e9a265fe58eada288
Reviewed-on: https://chromium-review.googlesource.com/1117037
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570896}
[modify] https://crrev.com/4738086ff2e233def1dc1ebcb6e1459639260507/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py

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

Cc: piman@chromium.org jdarpinian@chromium.org
Components: Internals>GPU>Internals
Status: Started (was: Assigned)
It turns out that the same problem, where the error callback can cause re-entrancy of GLES2Implementation, happens if the "Event Listener Breakpoints" are turned on in DevTools. The stack trace in this case is much deeper but has the same basic problem.

The current code in https://crrev.com/c/1117360 doesn't yet handle this but I'm updating it to handle it.


[22038:775:0627/154311.076794:FATAL:gles2_implementation.cc(150)] Check failed: 0 == gles2_implementation_->use_count_ (0 vs. 1)
0   libbase.dylib                       0x000000010ba88c3c base::debug::StackTrace::StackTrace(unsigned long) + 28
1   libbase.dylib                       0x000000010b9a7fbf logging::LogMessage::~LogMessage() + 223
2   libgles2_implementation.dylib       0x000000011bdc0d7e gpu::gles2::GLES2Implementation::GetGraphicsResetStatusKHR() + 110
3   libblink_platform.dylib             0x0000000118a7f9b5 blink::DrawingBuffer::PrepareTransferableResourceInternal(cc::SharedBitmapIdRegistrar*, viz::TransferableResource*, std::__1::unique_ptr<viz::SingleReleaseCallback, std::__1::default_delete<viz::SingleReleaseCallback> >*, bool) + 165
4   libblink_platform.dylib             0x0000000118a7f839 blink::DrawingBuffer::PrepareTransferableResource(cc::SharedBitmapIdRegistrar*, viz::TransferableResource*, std::__1::unique_ptr<viz::SingleReleaseCallback, std::__1::default_delete<viz::SingleReleaseCallback> >*) + 185
5   libcc.dylib                         0x0000000111a60a33 cc::TextureLayer::Update() + 115
6   libcc.dylib                         0x0000000111aedd3a cc::LayerTreeHost::PaintContent(std::__1::vector<scoped_refptr<cc::Layer>, std::__1::allocator<scoped_refptr<cc::Layer> > > const&, bool*, bool*) + 154
7   libcc.dylib                         0x0000000111aed2cc cc::LayerTreeHost::DoUpdateLayers(cc::Layer*) + 2444
8   libcc.dylib                         0x0000000111aec717 cc::LayerTreeHost::UpdateLayers() + 135
9   libcc.dylib                         0x0000000111b4b90a cc::ProxyMain::BeginMainFrame(std::__1::unique_ptr<cc::BeginMainFrameAndCommitState, std::__1::default_delete<cc::BeginMainFrameAndCommitState> >) + 1210
10  libcc.dylib                         0x0000000111b49fa2 void base::internal::InvokeHelper<true, void>::MakeItSo<void (cc::ProxyMain::*)(std::__1::unique_ptr<cc::BeginMainFrameAndCommitState, std::__1::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>, std::__1::unique_ptr<cc::BeginMainFrameAndCommitState, std::__1::default_delete<cc::BeginMainFrameAndCommitState> > >(void (cc::ProxyMain::*&&)(std::__1::unique_ptr<cc::BeginMainFrameAndCommitState, std::__1::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>&&, std::__1::unique_ptr<cc::BeginMainFrameAndCommitState, std::__1::default_delete<cc::BeginMainFrameAndCommitState> >&&) + 210
11  libcc.dylib                         0x0000000111b49e91 base::internal::Invoker<base::internal::BindState<void (cc::ProxyMain::*)(std::__1::unique_ptr<cc::BeginMainFrameAndCommitState, std::__1::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>, base::internal::PassedWrapper<std::__1::unique_ptr<cc::BeginMainFrameAndCommitState, std::__1::default_delete<cc::BeginMainFrameAndCommitState> > > >, void ()>::RunOnce(base::internal::BindStateBase*) + 113
12  libbase.dylib                       0x000000010b987971 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 321
13  libblink_platform.dylib             0x0000000118c9e17f base::sequence_manager::internal::ThreadControllerImpl::DoWork(base::sequence_manager::internal::ThreadControllerImpl::WorkType) + 943
14  libblink_platform.dylib             0x0000000118c9ffdb base::internal::Invoker<base::internal::BindState<void (base::sequence_manager::internal::ThreadControllerImpl::*)(base::sequence_manager::internal::ThreadControllerImpl::WorkType), base::WeakPtr<base::sequence_manager::internal::ThreadControllerImpl>, base::sequence_manager::internal::ThreadControllerImpl::WorkType>, void ()>::Run(base::internal::BindStateBase*) + 187
15  libbase.dylib                       0x000000010b987971 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 321
16  libbase.dylib                       0x000000010b9c0d79 base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) + 121
17  libbase.dylib                       0x000000010b9c51b7 base::MessageLoop::RunTask(base::PendingTask*) + 599
18  libbase.dylib                       0x000000010b9c557a base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) + 186
19  libbase.dylib                       0x000000010b9c57ec base::MessageLoop::DoWork() + 572
20  libbase.dylib                       0x000000010b9c9a8a base::MessagePumpCFRunLoopBase::RunWork() + 42
21  libbase.dylib                       0x000000010b9aa74a base::mac::CallWithEHFrame(void () block_pointer) + 10
22  libbase.dylib                       0x000000010b9c936f base::MessagePumpCFRunLoopBase::RunWorkSource(void*) + 63
23  CoreFoundation                      0x00007fff37bc9a61 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
24  CoreFoundation                      0x00007fff37c8347c __CFRunLoopDoSource0 + 108
25  CoreFoundation                      0x00007fff37bac4c0 __CFRunLoopDoSources0 + 208
26  CoreFoundation                      0x00007fff37bab93d __CFRunLoopRun + 1293
27  CoreFoundation                      0x00007fff37bab1a3 CFRunLoopRunSpecific + 483
28  Foundation                          0x00007fff39c9af26 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 277
29  libbase.dylib                       0x000000010b9ca2fd base::MessagePumpNSRunLoop::DoRun(base::MessagePump::Delegate*) + 125
30  libbase.dylib                       0x000000010b9c8dbe base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 110
31  libbase.dylib                       0x000000010b9c4c02 base::MessageLoop::Run(bool) + 242
32  libbase.dylib                       0x000000010ba03c69 base::RunLoop::Run() + 249
33  libcontent.dylib                    0x000000010dcb5b72 content::(anonymous namespace)::NestedMessageLoopRunnerImpl::Run() + 146
34  libblink_core.dylib                 0x0000000115a51d28 blink::ClientMessageLoopAdapter::RunLoop(blink::WebLocalFrameImpl*) + 456
35  libblink_core.dylib                 0x0000000115ed992e blink::MainThreadDebugger::runMessageLoopOnPause(int) + 286
36  libv8.dylib                         0x000000010a67df7a v8_inspector::V8Debugger::handleProgramBreak(v8::Local<v8::Context>, v8::Local<v8::Value>, std::__1::vector<int, std::__1::allocator<int> > const&, bool, bool) + 954
37  libv8.dylib                         0x0000000109f48a29 v8::internal::Debug::OnDebugBreak(v8::internal::Handle<v8::internal::FixedArray>) + 729
38  libv8.dylib                         0x0000000109f5275d v8::internal::Debug::HandleDebugBreak(v8::internal::IgnoreBreakMode) + 1213
39  libv8.dylib                         0x0000000109b212d9 v8::debug::BreakRightNow(v8::Isolate*) + 41
40  libv8.dylib                         0x000000010a677133 v8_inspector::V8DebuggerAgentImpl::breakProgram(v8_inspector::String16 const&, std::__1::unique_ptr<v8_inspector::protocol::DictionaryValue, std::__1::default_delete<v8_inspector::protocol::DictionaryValue> >) + 291
41  libv8.dylib                         0x000000010a693f99 v8_inspector::V8InspectorSessionImpl::breakProgram(v8_inspector::StringView const&, v8_inspector::StringView const&) + 89
42  libblink_core.dylib                 0x0000000115e6d05e blink::InspectorDOMDebuggerAgent::PauseOnNativeEventIfNeeded(std::__1::unique_ptr<blink::protocol::DictionaryValue, std::__1::default_delete<blink::protocol::DictionaryValue> >, bool) + 270
43  libblink_core.dylib                 0x0000000115e6d718 blink::InspectorDOMDebuggerAgent::DidFireWebGLErrorOrWarning(WTF::String const&) + 200
44  libblink_core.dylib                 0x00000001163619cb blink::probe::didFireWebGLErrorOrWarningImpl(blink::Element*, WTF::String const&) + 171
45  libblink_modules.dylib              0x000000011a3a9715 blink::WebGLRenderingContextBase::OnErrorMessage(char const*, int) + 485
46  libblink_modules.dylib              0x000000011a3cd6aa WTF::ThreadCheckingCallbackWrapper<base::RepeatingCallback<void (char const*, int)>, void (char const*, int)>::Run(char const*, int) + 186
47  libgles2_implementation.dylib       0x000000011bda8af5 gpu::gles2::GLES2Implementation::SetGLError(unsigned int, char const*, char const*) + 917
48  libgles2_implementation.dylib       0x000000011bdab658 gpu::gles2::GLES2Implementation::DrawElements(unsigned int, int, unsigned int, void const*) + 600
49  libblink_modules.dylib              0x000000011a3aff87 blink::WebGLRenderingContextBase::drawElements(unsigned int, int, unsigned int, long long) + 151
50  libblink_modules.dylib              0x0000000119da3a58 blink::V8WebGL2RenderingContext::drawElementsMethodCallback(v8::FunctionCallbackInfo<v8::Value> const&) + 376
51  libv8.dylib                         0x0000000109bc1aac v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) + 828
52  libv8.dylib                         0x0000000109bbfd4f v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 959
53  libv8.dylib                         0x0000000109bbe0e1 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 705
54  libv8.dylib                         0x0000000109bbdbe8 v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) + 200
55  libv8.dylib                         0x000000010a93e235 v8_Default_embedded_blob_ + 2715221

[23503:775:0627/154320.056498:ERROR:webgl_rendering_context_base.cc(1399)] Posting task with following error message: GL_INVALID_VALUE : glDrawElements: count < 0
[23503:775:0627/154320.074366:FATAL:gles2_implementation.cc(150)] Check failed: 0 == gles2_implementation_->use_count_ (0 vs. 1)
0   libbase.dylib                       0x00000001070c3c3c base::debug::StackTrace::StackTrace(unsigned long) + 28
1   libbase.dylib                       0x0000000106fe2fbf logging::LogMessage::~LogMessage() + 223
2   libgles2_implementation.dylib       0x000000011d330d7e gpu::gles2::GLES2Implementation::GetGraphicsResetStatusKHR() + 110
3   libblink_platform.dylib             0x0000000119fef9b5 blink::DrawingBuffer::PrepareTransferableResourceInternal(cc::SharedBitmapIdRegistrar*, viz::TransferableResource*, std::__1::unique_ptr<viz::SingleReleaseCallback, std::__1::default_delete<viz::SingleReleaseCallback> >*, bool) + 165
4   libblink_platform.dylib             0x0000000119fef839 blink::DrawingBuffer::PrepareTransferableResource(cc::SharedBitmapIdRegistrar*, viz::TransferableResource*, std::__1::unique_ptr<viz::SingleReleaseCallback, std::__1::default_delete<viz::SingleReleaseCallback> >*) + 185
5   libcc.dylib                         0x0000000109253a33 cc::TextureLayer::Update() + 115
6   libcc.dylib                         0x00000001092e0d3a cc::LayerTreeHost::PaintContent(std::__1::vector<scoped_refptr<cc::Layer>, std::__1::allocator<scoped_refptr<cc::Layer> > > const&, bool*, bool*) + 154
7   libcc.dylib                         0x00000001092e02cc cc::LayerTreeHost::DoUpdateLayers(cc::Layer*) + 2444
8   libcc.dylib                         0x00000001092df717 cc::LayerTreeHost::UpdateLayers() + 135
9   libcc.dylib                         0x000000010933e90a cc::ProxyMain::BeginMainFrame(std::__1::unique_ptr<cc::BeginMainFrameAndCommitState, std::__1::default_delete<cc::BeginMainFrameAndCommitState> >) + 1210
10  libcc.dylib                         0x000000010933cfa2 void base::internal::InvokeHelper<true, void>::MakeItSo<void (cc::ProxyMain::*)(std::__1::unique_ptr<cc::BeginMainFrameAndCommitState, std::__1::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>, std::__1::unique_ptr<cc::BeginMainFrameAndCommitState, std::__1::default_delete<cc::BeginMainFrameAndCommitState> > >(void (cc::ProxyMain::*&&)(std::__1::unique_ptr<cc::BeginMainFrameAndCommitState, std::__1::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>&&, std::__1::unique_ptr<cc::BeginMainFrameAndCommitState, std::__1::default_delete<cc::BeginMainFrameAndCommitState> >&&) + 210
11  libcc.dylib                         0x000000010933ce91 base::internal::Invoker<base::internal::BindState<void (cc::ProxyMain::*)(std::__1::unique_ptr<cc::BeginMainFrameAndCommitState, std::__1::default_delete<cc::BeginMainFrameAndCommitState> >), base::WeakPtr<cc::ProxyMain>, base::internal::PassedWrapper<std::__1::unique_ptr<cc::BeginMainFrameAndCommitState, std::__1::default_delete<cc::BeginMainFrameAndCommitState> > > >, void ()>::RunOnce(base::internal::BindStateBase*) + 113
12  libbase.dylib                       0x0000000106fc2971 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 321
13  libblink_platform.dylib             0x000000011a20e17f base::sequence_manager::internal::ThreadControllerImpl::DoWork(base::sequence_manager::internal::ThreadControllerImpl::WorkType) + 943
14  libblink_platform.dylib             0x000000011a20ffdb base::internal::Invoker<base::internal::BindState<void (base::sequence_manager::internal::ThreadControllerImpl::*)(base::sequence_manager::internal::ThreadControllerImpl::WorkType), base::WeakPtr<base::sequence_manager::internal::ThreadControllerImpl>, base::sequence_manager::internal::ThreadControllerImpl::WorkType>, void ()>::Run(base::internal::BindStateBase*) + 187
15  libbase.dylib                       0x0000000106fc2971 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 321
16  libbase.dylib                       0x0000000106ffbd79 base::internal::IncomingTaskQueue::RunTask(base::PendingTask*) + 121
17  libbase.dylib                       0x00000001070001b7 base::MessageLoop::RunTask(base::PendingTask*) + 599
18  libbase.dylib                       0x000000010700057a base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) + 186
19  libbase.dylib                       0x00000001070007ec base::MessageLoop::DoWork() + 572
20  libbase.dylib                       0x0000000107004a8a base::MessagePumpCFRunLoopBase::RunWork() + 42
21  libbase.dylib                       0x0000000106fe574a base::mac::CallWithEHFrame(void () block_pointer) + 10
22  libbase.dylib                       0x000000010700436f base::MessagePumpCFRunLoopBase::RunWorkSource(void*) + 63
23  CoreFoundation                      0x00007fff37bc9a61 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
24  CoreFoundation                      0x00007fff37c8347c __CFRunLoopDoSource0 + 108
25  CoreFoundation                      0x00007fff37bac4c0 __CFRunLoopDoSources0 + 208
26  CoreFoundation                      0x00007fff37bab93d __CFRunLoopRun + 1293
27  CoreFoundation                      0x00007fff37bab1a3 CFRunLoopRunSpecific + 483
28  Foundation                          0x00007fff39c9af26 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 277
29  libbase.dylib                       0x00000001070052fd base::MessagePumpNSRunLoop::DoRun(base::MessagePump::Delegate*) + 125
30  libbase.dylib                       0x0000000107003dbe base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 110
31  libbase.dylib                       0x0000000106fffc02 base::MessageLoop::Run(bool) + 242
32  libbase.dylib                       0x000000010703ec69 base::RunLoop::Run() + 249
33  libcontent.dylib                    0x000000010f681b72 content::(anonymous namespace)::NestedMessageLoopRunnerImpl::Run() + 146
34  libblink_core.dylib                 0x0000000116fc1d28 blink::ClientMessageLoopAdapter::RunLoop(blink::WebLocalFrameImpl*) + 456
35  libblink_core.dylib                 0x000000011744992e blink::MainThreadDebugger::runMessageLoopOnPause(int) + 286
36  libv8.dylib                         0x0000000105cb8f7a v8_inspector::V8Debugger::handleProgramBreak(v8::Local<v8::Context>, v8::Local<v8::Value>, std::__1::vector<int, std::__1::allocator<int> > const&, bool, bool) + 954
37  libv8.dylib                         0x0000000105583a29 v8::internal::Debug::OnDebugBreak(v8::internal::Handle<v8::internal::FixedArray>) + 729
38  libv8.dylib                         0x000000010558d75d v8::internal::Debug::HandleDebugBreak(v8::internal::IgnoreBreakMode) + 1213
39  libv8.dylib                         0x000000010515c2d9 v8::debug::BreakRightNow(v8::Isolate*) + 41
40  libv8.dylib                         0x0000000105cb2133 v8_inspector::V8DebuggerAgentImpl::breakProgram(v8_inspector::String16 const&, std::__1::unique_ptr<v8_inspector::protocol::DictionaryValue, std::__1::default_delete<v8_inspector::protocol::DictionaryValue> >) + 291
41  libv8.dylib                         0x0000000105ccef99 v8_inspector::V8InspectorSessionImpl::breakProgram(v8_inspector::StringView const&, v8_inspector::StringView const&) + 89
42  libblink_core.dylib                 0x00000001173dd05e blink::InspectorDOMDebuggerAgent::PauseOnNativeEventIfNeeded(std::__1::unique_ptr<blink::protocol::DictionaryValue, std::__1::default_delete<blink::protocol::DictionaryValue> >, bool) + 270
43  libblink_core.dylib                 0x00000001173dd718 blink::InspectorDOMDebuggerAgent::DidFireWebGLErrorOrWarning(WTF::String const&) + 200
44  libblink_core.dylib                 0x00000001178d19cb blink::probe::didFireWebGLErrorOrWarningImpl(blink::Element*, WTF::String const&) + 171
45  libblink_modules.dylib              0x000000011b919715 blink::WebGLRenderingContextBase::OnErrorMessage(char const*, int) + 485
46  libblink_modules.dylib              0x000000011b93d6aa WTF::ThreadCheckingCallbackWrapper<base::RepeatingCallback<void (char const*, int)>, void (char const*, int)>::Run(char const*, int) + 186
47  libgles2_implementation.dylib       0x000000011d318af5 gpu::gles2::GLES2Implementation::SetGLError(unsigned int, char const*, char const*) + 917
48  libgles2_implementation.dylib       0x000000011d31b658 gpu::gles2::GLES2Implementation::DrawElements(unsigned int, int, unsigned int, void const*) + 600
49  libblink_modules.dylib              0x000000011b91ff87 blink::WebGLRenderingContextBase::drawElements(unsigned int, int, unsigned int, long long) + 151
50  libblink_modules.dylib              0x000000011b313a58 blink::V8WebGL2RenderingContext::drawElementsMethodCallback(v8::FunctionCallbackInfo<v8::Value> const&) + 376
51  libv8.dylib                         0x00000001051fcaac v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) + 828
52  libv8.dylib                         0x00000001051fad4f v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 959
53  libv8.dylib                         0x00000001051f90e1 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 705
54  libv8.dylib                         0x00000001051f8be8 v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) + 200
55  libv8.dylib                         0x0000000105f79235 v8_Default_embedded_blob_ + 2715221

Comment 6 by kbr@chromium.org, Jun 28 2018

Here's a test case which provokes an error from GLES2Implementation::DrawElementsImpl. In a build with DCHECKs turned on, breaking on "Event Listener Breakpoints / Canvas / WebGL {Error,Warning} Fired" will hit the assertion failure above.

test_errors.html
2.6 KB View Download

Comment 7 by piman@chromium.org, Jun 28 2018

Talking to Ken, here is my suggestion to try to keep the DevTools hit the breakpoint with the right stack, without causing arbitrary reentrancy in GLES2Implementation, which I don't think is necessarily safe:

Inside GLES2Implementation, provide a ScopedHandleError RAII class that we would create at the beginning of any function that needs to call (directly or indirectly) SendErrorMessage, somewhat similar to what GPU_CLIENT_SINGLE_THREAD_CHECK does (in debug mode). Instead of directly calling the callback, SendErrorMessage would add the message to a queue, which would be picked up by the ScopedHandleError in the destructor, where it would, safely, call the callback. To make sure we don't forget the ScopedHandleError where needed, it could set/reset a bit on the GLES2Implementation that SendErrorMessage would DCHECK.
Project Member

Comment 8 by bugdroid1@chromium.org, Jun 29 2018

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

commit dbc3e4a9b34ac1aa5e9097fb169bf006c1e1f7b0
Author: Kenneth Russell <kbr@chromium.org>
Date: Fri Jun 29 22:09:14 2018

Defer GLES2Implementation's error callbacks if needed.

Blink's error callback in particular can cause reentrancy into
GLES2Implementation. Support this by deferring the error callbacks
until returning from these API functions.

Bug:  857112 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: If41a42aea0da9360c13e6f1323a14c3dc44fbbd3
Reviewed-on: https://chromium-review.googlesource.com/1117360
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571666}
[modify] https://crrev.com/dbc3e4a9b34ac1aa5e9097fb169bf006c1e1f7b0/gpu/command_buffer/client/gles2_implementation.cc
[modify] https://crrev.com/dbc3e4a9b34ac1aa5e9097fb169bf006c1e1f7b0/gpu/command_buffer/client/gles2_implementation.h
[modify] https://crrev.com/dbc3e4a9b34ac1aa5e9097fb169bf006c1e1f7b0/gpu/command_buffer/client/gles2_implementation_unittest.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Jun 30 2018

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

commit c89899bac48b582c75a15a7ce6ea3c7dfc729a65
Author: Kenneth Russell <kbr@chromium.org>
Date: Sat Jun 30 04:10:05 2018

Remove flaky suppression for random_separate_points.html .

The underlying bug should be fixed.

Tbr: ynovikov@chromium.org
Bug:  857112 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ie0f277447d01644f0c76134d6d7d570f5f03d8fc
Reviewed-on: https://chromium-review.googlesource.com/1121595
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571758}
[modify] https://crrev.com/c89899bac48b582c75a15a7ce6ea3c7dfc729a65/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py

Comment 10 by kbr@chromium.org, Jun 30 2018

Status: Fixed (was: Started)
Blocking: 862069

Sign in to add a comment