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

Issue 801039 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 796830
Owner:
Closed: Jan 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

midi::TaskService uses condition variables on the IO thread which is disallowed

Project Member Reported by raymes@chromium.org, Jan 11 2018

Issue description

I hit the following DCHECK in a test:

[4984:5006:0110/172145.565081:FATAL:thread_restrictions.cc(105)] Check failed: !g_base_sync_primitives_disallowed.Get().Get(). Waiting on a //base sync primitive is not allowed on this thread to prevent jank and deadlock. If waiting on a //base sync primitive is unavoidable, do it within the scope of a ScopedAllowBaseSyncPrimitives. If in a test, use ScopedAllowBaseSyncPrimitivesForTesting.
#0 0x7f7292c7094c base::debug::StackTrace::StackTrace()
#1 0x7f7292c9ad1c logging::LogMessage::~LogMessage()
#2 0x7f7292d25356 base::internal::AssertBaseSyncPrimitivesAllowed()
#3 0x7f7292cf6f83 base::ConditionVariable::Wait()
#4 0x7f72871085f8 midi::TaskService::UnbindInstance()
#5 0x7f728710aab2 midi::MidiManagerAlsa::Finalize()
#6 0x7f72870ff87b midi::MidiManager::ShutdownOnSessionThread()
#7 0x7f72870ff6ee midi::MidiManager::Shutdown()
#8 0x7f728710790a midi::MidiService::EndSession()
#9 0x7f72913049e4 content::MidiHost::OnChannelClosing()
#10 0x7f7290b6c446 content::BrowserMessageFilter::Internal::OnChannelClosing()
#11 0x7f7293c5bec2 IPC::ChannelProxy::Context::OnChannelClosed()
#12 0x7f7293c5e4ab _ZN4base8internal7InvokerINS0_9BindStateIMN3IPC12_GLOBAL__N_132ChannelAssociatedGroupControllerEFvvEJ13scoped_refptrIS5_EEEEFvvEE3RunEPNS0_13BindStateBaseE
#13 0x7f7292c7126a base::debug::TaskAnnotator::RunTask()
#14 0x7f7292ca45e6 base::internal::IncomingTaskQueue::RunTask()
#15 0x7f7292ca8817 base::MessageLoop::RunTask()

It's caused because TaskService::UnbindInstance is waiting on condition variables on the IO thread, which is not allowed. I'm temporarily adding a base::ScopedAllowBaseSyncPrimitives to ignore the warning, but this should most likely be fixed in a different way.

 

Comment 1 by raymes@chromium.org, Jan 11 2018

Mergedinto: 796830
Status: Duplicate (was: Assigned)
Sorry for the noise - I just realized that this just got fixed in https://chromium-review.googlesource.com/833851

Sign in to add a comment