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

Issue 677367 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug



Sign in to add a comment

cast channel KeepAliveDelegate DCHECK fails

Project Member Reported by m...@chromium.org, Dec 29 2016

Issue description

In a local build, while I was making unrelated changes, my browser crashed about every 25-30 seconds with the following stack trace:

[4717:4823:1228/180939.138139:FATAL:keep_alive_delegate.cc(179)] Check failed: started_. 
#0 0x7f106a1681ae base::debug::StackTrace::StackTrace()
#1 0x7f106a18c74b logging::LogMessage::~LogMessage()
#2 0x7f106adf5388 extensions::api::cast_channel::KeepAliveDelegate::OnMessage()
#3 0x7f106adf3b22 extensions::api::cast_channel::CastTransportImpl::DoReadCallback()
#4 0x7f106adf2f38 extensions::api::cast_channel::CastTransportImpl::OnReadResult()
#5 0x7f1069813586 net::SSLClientSocketImpl::RetryAllOperations()
#6 0x7f106980df15 net::SocketBIOAdapter::OnSocketReadComplete()
#7 0x7f106980f674 _ZN4base8internal13FunctorTraitsIMN3net16SocketBIOAdapterEFviEvE6InvokeIRKNS_7WeakPtrIS3_EEJiEEEvS5_OT_DpOT0_
#8 0x7f1069a943a7 net::TCPClientSocket::DidCompleteRead()
#9 0x7f1069a9604a net::TCPSocketPosix::ReadCompleted()
#10 0x7f1069a8736e net::SocketPosix::ReadCompleted()
#11 0x7f1069a86fda net::SocketPosix::OnFileCanReadWithoutBlocking()
#12 0x7f106a19d628 base::MessagePumpLibevent::OnLibeventNotification()
#13 0x7f106a2603c7 event_base_loop
#14 0x7f106a19d906 base::MessagePumpLibevent::Run()
#15 0x7f106a199bf5 base::MessageLoop::RunHandler()
#16 0x7f106a1cdd0c base::RunLoop::Run()
#17 0x7f106a209ebc base::Thread::Run()
#18 0x7f10678dc865 content::BrowserThreadImpl::IOThreadRun()
#19 0x7f10678dca13 content::BrowserThreadImpl::Run()
#20 0x7f106a20a3b8 base::Thread::ThreadMain()
#21 0x7f106a201d5c base::(anonymous namespace)::ThreadFunc()
#22 0x7f106a2de184 start_thread
#23 0x7f106076337d clone

Aborted (core dumped)

 

Comment 1 by m...@chromium.org, Dec 29 2016

Owner: m...@chromium.org
Status: Started (was: Untriaged)
Looks like KeepAliveDelegate::OnError() gets called and then later something calls KeepAliveDelegate::OnMessage(). Unfortunately, the class that owns the KeepAliveDelegate has no way to detect that it has stopped itself.

FWICT, we could fix this by simply only handling the PINGs and PONGs when |started_| is true.

Comment 2 by m...@chromium.org, Dec 29 2016

Fix up for review: https://codereview.chromium.org/2609503002

Project Member

Comment 3 by bugdroid1@chromium.org, Jan 15 2017

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

commit b4dbf044c53ead8422a063e7c27ae9999cbecb4d
Author: miu <miu@chromium.org>
Date: Sun Jan 15 03:04:42 2017

Fix cast_channel::KeepAliveDelegate DCHECK failure.

Fixes a DCHECK crash caused by KeepAliveDelegate receiving messages
after an error occurs. In this case, the DCHECK's assumption seems to
have been wrong; and so some extra implementation was added to account
for the started versus not-started state.

BUG= 677367 
R=wez@chromium.org

Review-Url: https://codereview.chromium.org/2609503002
Cr-Commit-Position: refs/heads/master@{#443809}

[modify] https://crrev.com/b4dbf044c53ead8422a063e7c27ae9999cbecb4d/extensions/browser/api/cast_channel/keep_alive_delegate.cc
[modify] https://crrev.com/b4dbf044c53ead8422a063e7c27ae9999cbecb4d/extensions/browser/api/cast_channel/keep_alive_delegate_unittest.cc

Comment 4 by m...@chromium.org, Jan 15 2017

Status: Fixed (was: Started)

Sign in to add a comment