DCHECK failure opening FB notifications jewel in debug |
||||
Issue descriptionChrome Version: ToT debug #589069 OS: Ubuntu What steps will reproduce the problem? (1) Debug build to enable DCHECKs (2) Log in to Facebook (3) Try to interact with the notifications jewel What is the expected result? Don't DCHECK What happens instead? DCHECK; here's the callstack: [1:23:0906/142531.393497:FATAL:simple_watcher.cc(135)] Check failed: task_runner_->RunsTasksInCurrentSequence(). #0 0x7fb8b4e1abcd base::debug::StackTrace::StackTrace() #1 0x7fb8b4b269ac base::debug::StackTrace::StackTrace() #2 0x7fb8b4b962ca logging::LogMessage::~LogMessage() #3 0x7fb8b4fd71ba mojo::SimpleWatcher::SimpleWatcher() #4 0x7fb8b504a40e mojo::Connector::WaitToReadMore() #5 0x7fb8b504a226 mojo::Connector::Connector() #6 0x7fb8b5067a59 mojo::internal::MultiplexRouter::MultiplexRouter() #7 0x7fb8b5067467 mojo::internal::InterfacePtrStateBase::InitializeEndpointClient() #8 0x7fb8a98d98b4 mojo::internal::InterfacePtrState<>::ConfigureProxyIfNecessary() #9 0x7fb8a98d9499 mojo::internal::InterfacePtrState<>::instance() #10 0x7fb8a98d9475 mojo::InterfacePtr<>::get() #11 0x7fb8a98d6295 mojo::InterfacePtr<>::operator->() #12 0x7fb8a98d5e3d ukm::MojoUkmRecorder::AddEntry() #13 0x7fb8a98da225 ukm::internal::UkmEntryBuilderBase::Record() #14 0x7fb894858da4 blink::scheduler::WorkerThreadScheduler::RecordTaskUkm() #15 0x7fb894858b70 blink::scheduler::WorkerThreadScheduler::OnTaskCompleted() #16 0x7fb894853bc7 blink::scheduler::NonMainThreadTaskQueue::OnTaskCompleted() #17 0x7fb8948420ad _ZN4base8internal13FunctorTraitsIMN5blink9scheduler19MainThreadTaskQueueEFvRKNS_16sequence_manager9TaskQueue4TaskERKNS6_10TaskTimingEEvE6InvokeISE_PS4_JS9_SC_EEEvT_OT0_DpOT1_ #18 0x7fb89484200a _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMN5blink9scheduler19MainThreadTaskQueueEFvRKNS_16sequence_manager9TaskQueue4TaskERKNS8_10TaskTimingEEJPS6_SB_SE_EEEvOT_DpOT0_ #19 0x7fb894841f85 _ZN4base8internal7InvokerINS0_9BindStateIMN5blink9scheduler19MainThreadTaskQueueEFvRKNS_16sequence_manager9TaskQueue4TaskERKNS7_10TaskTimingEEJNS0_17UnretainedWrapperIS5_EEEEEFvSA_SD_EE7RunImplIRKSF_RKNSt3__15tupleIJSH_EEEJLm0EEEEvOT_OT0_NSO_16integer_sequenceImJXspT1_EEEESA_SD_ #20 0x7fb894841f04 _ZN4base8internal7InvokerINS0_9BindStateIMN5blink9scheduler19MainThreadTaskQueueEFvRKNS_16sequence_manager9TaskQueue4TaskERKNS7_10TaskTimingEEJNS0_17UnretainedWrapperIS5_EEEEEFvSA_SD_EE3RunEPNS0_13BindStateBaseESA_SD_ #21 0x7fb8b4cf7340 _ZNKR4base17RepeatingCallbackIFvRKNS_16sequence_manager9TaskQueue4TaskERKNS2_10TaskTimingEEE3RunES5_S8_ #22 0x7fb8b4cf6239 base::sequence_manager::internal::TaskQueueImpl::OnTaskCompleted() #23 0x7fb8b4ce00c7 base::sequence_manager::internal::SequenceManagerImpl::NotifyDidProcessTask() #24 0x7fb8b4cdf913 base::sequence_manager::internal::SequenceManagerImpl::DidRunTask() #25 0x7fb8b4cfd9dc base::sequence_manager::internal::ThreadControllerImpl::DoWork() #26 0x7fb8b4d00411 _ZN4base8internal13FunctorTraitsIMNS_16sequence_manager8internal20ThreadControllerImplEFvNS4_8WorkTypeEEvE6InvokeIS7_RKNS_7WeakPtrIS4_EEJRKS5_EEEvT_OT0_DpOT1_ #27 0x7fb8b4d00375 _ZN4base8internal12InvokeHelperILb1EvE8MakeItSoIRKMNS_16sequence_manager8internal20ThreadControllerImplEFvNS6_8WorkTypeEERKNS_7WeakPtrIS6_EEJRKS7_EEEvOT_OT0_DpOT1_ #28 0x7fb8b4d002ed _ZN4base8internal7InvokerINS0_9BindStateIMNS_16sequence_manager8internal20ThreadControllerImplEFvNS5_8WorkTypeEEJNS_7WeakPtrIS5_EES6_EEEFvvEE7RunImplIRKS8_RKNSt3__15tupleIJSA_S6_EEEJLm0ELm1EEEEvOT_OT0_NSH_16integer_sequenceImJXspT1_EEEE #29 0x7fb8b4d001ec _ZN4base8internal7InvokerINS0_9BindStateIMNS_16sequence_manager8internal20ThreadControllerImplEFvNS5_8WorkTypeEEJNS_7WeakPtrIS5_EES6_EEEFvvEE3RunEPNS0_13BindStateBaseE #30 0x7fb8b4acf78d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #31 0x7fb8b4d00725 _ZN4base8internal22CancelableCallbackImplINS_17RepeatingCallbackIFvvEEEE16ForwardRepeatingIJEEEvDpT_ #32 0x7fb8b4c6374f _ZN4base8internal13FunctorTraitsIMNS_7RunLoopEFvvEvE6InvokeIS4_RKNS_7WeakPtrIS2_EEJEEEvT_OT0_DpOT1_ #33 0x7fb8b4c636ca _ZN4base8internal12InvokeHelperILb1EvE8MakeItSoIRKMNS_7RunLoopEFvvERKNS_7WeakPtrIS4_EEJEEEvOT_OT0_DpOT1_ #34 0x7fb8b4c63660 _ZN4base8internal7InvokerINS0_9BindStateIMNS_7RunLoopEFvvEJNS_7WeakPtrIS3_EEEEEFvvEE7RunImplIRKS5_RKNSt3__15tupleIJS7_EEEJLm0EEEEvOT_OT0_NSE_16integer_sequenceImJXspT1_EEEE #35 0x7fb8b4c6359c _ZN4base8internal7InvokerINS0_9BindStateIMNS_7RunLoopEFvvEJNS_7WeakPtrIS3_EEEEEFvvEE3RunEPNS0_13BindStateBaseE #36 0x7fb8b4ad53ee _ZNO4base12OnceCallbackIFvvEE3RunEv #37 0x7fb8b4b27e72 base::debug::TaskAnnotator::RunTask() #38 0x7fb8b4bb9d26 base::MessageLoop::RunTask() #39 0x7fb8b4bba0ae base::MessageLoop::DeferOrRunPendingTask() #40 0x7fb8b4bba8ba base::MessageLoop::DoDelayedWork() #41 0x7fb8b4bc0d37 base::MessagePumpDefault::Run() #42 0x7fb8b4bb941b base::MessageLoop::Run() #43 0x7fb8b4c6192d base::RunLoop::Run() #44 0x7fb8b4d55428 base::Thread::Run() #45 0x7fb8b4d560f0 base::Thread::ThreadMain() #46 0x7fb8b4e502fd base::(anonymous namespace)::ThreadFunc() #47 0x7fb88e8796ba start_thread #48 0x7fb88a70a41d clone I don't have the build resources to bisect this, sorry :(
,
Sep 6
Here's a gdb session with some commentary which I think indicates the wires getting crossed:
Thread 1 "chrome" hit Breakpoint 3, blink::scheduler::WorkerSchedulerProxy::WorkerSchedulerProxy (this=0x20e67e561840, scheduler=0x1e2358f10010) at ../../third_party/blink/renderer/platform/scheduler/worker/worker_scheduler_proxy.cc:25
25 ukm_recorder_ =
(gdb) fin
WorkerSchedulerProxy created on Thread 1; this binds the UKM interface which I think squirrels away the main thread task runner somewhere.
This comment in InterfacePtr seems relevant:
// This class is thread hostile, as is the local proxy it manages, while bound
// to a message pipe. All calls to this class or the proxy should be from the
// same sequence that bound it. If you need to move the proxy to a different
// sequence, extract the InterfacePtrInfo (containing just the message pipe and
// any version information) using PassInterface() on the original sequence, pass
// it to a different sequence, and create and bind a new InterfacePtr from that
// sequence. If an InterfacePtr is not bound to a message pipe, it may be bound
// or destroyed on any sequence.
Thread 29 "DedicatedWorker" hit Breakpoint 1, blink::scheduler::WorkerThreadScheduler::WorkerThreadScheduler (this=0x20e67e62a020, thread_type=blink::WebThreadType::kDedicatedWorkerThread, sequence_manager=..., proxy=0x20e67e561840) at ../../third_party/blink/renderer/platform/scheduler/worker/worker_thread_scheduler.cc:120
120 ukm_recorder_(proxy ? proxy->TakeUkmRecorder() : nullptr) {
(gdb) $14 = (blink::scheduler::WorkerSchedulerProxy *) 0x20e67e561840
cont
Continuing.
Main thread MojoUkmRecorder disclosed to the worker thread.
Thread 29 "DedicatedWorker" received signal SIGTRAP, Trace/breakpoint trap.
base::debug::(anonymous namespace)::DebugBreak () at ../../base/debug/debugger_posix.cc:240
240 }
(gdb)
Hit the DCHECK using the UKM interface on the worker thread.
,
Sep 7
It appears that the platform's connector needs to be cloned, passed to the worker thread, and used there to bind the UKM service? Just cribbing from what compositor and media streams do.
,
Sep 7
Yeah, my bad. Will fix it.
,
Oct 3
This was fixed by https://chromium-review.googlesource.com/c/chromium/src/+/1208941. |
||||
►
Sign in to add a comment |
||||
Comment 1 by dominicc@chromium.org
, Sep 6