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

Issue 774740 link

Starred by 2 users

Issue metadata

Status: Closed
Owner:
Last visit > 30 days ago
Closed: Aug 2
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug

Blocked on:
issue 595685



Sign in to add a comment

DCHECK in NotificationEventDispatcherImpl::GetInstance()

Project Member Reported by reillyg@chromium.org, Oct 14 2017

Issue description

Chrome Version: 63.0.3239.0

The DCHECK_CURRENTLY_ON(BrowserThread::UI) in NotificationEventDispatcherImpl::GetInstance() can fail during channel shutdown if the NotificationMessageFilter is destroyed on the IO thread:

[1556:1845:1013/163337.261906:FATAL:notification_event_dispatcher_impl.cc(360)] Check failed: ::content::BrowserThread::CurrentlyOn(BrowserThread::UI). Must be called on Chrome_UIThread; actually called on Chrome_IOThread.
#0 0x7f7d88b8f7f7 base::debug::StackTrace::StackTrace()
#1 0x7f7d88bb7751 logging::LogMessage::~LogMessage()
#2 0x7f7d8654b919 content::NotificationEventDispatcherImpl::GetInstance()
#3 0x7f7d8654fc0b content::NotificationMessageFilter::OnDestruct()
#4 0x7f7d85dd8b0c content::BrowserMessageFilter::Internal::~Internal()
#5 0x7f7d87c986ac IPC::ChannelProxy::Context::OnChannelClosed()
#6 0x7f7d87c9aa67 _ZN4base8internal7InvokerINS0_9BindStateIMN3IPC12_GLOBAL__N_132ChannelAssociatedGroupControllerEFvvEJ13scoped_refptrIS5_EEEEFvvEE3RunEPNS0_13BindStateBaseE
#7 0x7f7d88b900a1 base::debug::TaskAnnotator::RunTask()
#8 0x7f7d88bc1700 base::internal::IncomingTaskQueue::RunTask()
#9 0x7f7d88bc563f base::MessageLoop::RunTask()
#10 0x7f7d88bc5985 base::MessageLoop::DeferOrRunPendingTask()
#11 0x7f7d88bc5c36 base::MessageLoop::DoWork()
#12 0x7f7d88bc8819 base::MessagePumpLibevent::Run()
#13 0x7f7d88bc4fba base::MessageLoop::Run()
#14 0x7f7d88bf8766 base::RunLoop::Run()
#15 0x7f7d88c3875c base::Thread::Run()
#16 0x7f7d862babd6 content::BrowserThreadImpl::IOThreadRun()
#17 0x7f7d862badd1 content::BrowserThreadImpl::Run()
#18 0x7f7d88c38d02 base::Thread::ThreadMain()
#19 0x7f7d88c2f3fc base::(anonymous namespace)::ThreadFunc()
#20 0x7f7d88ccc494 start_thread
#21 0x7f7d7bd2aaff clone

 

Comment 1 by peter@chromium.org, Jan 5 2018

Components: -Blink>PushAPI
Owner: awdf@chromium.org
Status: Assigned (was: Untriaged)

Comment 2 by awdf@chromium.org, Jan 5 2018

So what's the solution here - jump  to the ui thread before calling NotificationEventDispatcherImpl::GetInstance in NotificationMessageFilter::OnDestruct?

Comment 3 by awdf@chromium.org, Jan 5 2018

Blockedon: 595685
Spoke to Peter about this, some notes:

- re #2, it's a bad idea to jump between threads during destruction, so no.

- A better solution would be to make NotificationMessageFilter inherit from DeleteOnUIThread which will enforce that it only gets deleted on the UI thread avoiding this DCHECK.

- However this is moot because the NotificationMessageFilter will go away once all the notifications code is mojofied anyway ( Issue 595685 ) and this work is already in progress.
Status: Closed (was: Assigned)
obsolete - the NMF has since been deleted.

Sign in to add a comment