New issue
Advanced search Search tips

Issue 674918 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Hitting DCHECK when starting Chrome in data_reduction_proxy

Project Member Reported by ma...@chromium.org, Dec 16 2016

Issue description

Hi, Chrome ToT on Android (Debug build)

I tried to symbolize the crash from ADB, hopefully this is useful!


[FATAL:data_reduction_proxy_request_options.cc(208)] Check failed: thread_checker_.CalledOnValidThread(). 

Stack Trace:
  RELADDR   FUNCTION                                                                                                                                                                                                               FILE:LINE
  0009c93d  ~LogMessage                                                                                                                                                                                                            /usr/local/google/home/mathp/clank/src/base/logging.cc:537
  00ac4089  data_reduction_proxy::DataReductionProxyRequestOptions::SetSecureSession(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)                                        /usr/local/google/home/mathp/clank/src/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc:208
  00abf101  data_reduction_proxy::DataReductionProxyConfigServiceClient::ParseAndApplyProxyConfig(data_reduction_proxy::ClientConfig const&)                                                                                       /usr/local/google/home/mathp/clank/src/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc:487
  00abf889  data_reduction_proxy::DataReductionProxyConfigServiceClient::HandleResponse(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, net::URLRequestStatus const&, int)  /usr/local/google/home/mathp/clank/src/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc:427

-----------------------------------------------------

     r0 00000000  r1 00000d74  r2 00000006  r3 921ca978
     r4 921ca980  r5 921ca930  r6 00000000  r7 0000010c
     r8 921c9840  r9 921c9840  sl 921c9c70  fp 00000000
     ip 00000006  sp 921c97d8  lr b6d67ae9  pc b6d692dc

Stack Trace:
  RELADDR   FUNCTION                                                                                                                                                                                                               FILE:LINE
  000412dc  tgkill+12                                                                                                                                                                                                              /system/lib/libc.so
  0003fae5  pthread_kill+32                                                                                                                                                                                                        /system/lib/libc.so
  0001c30f  raise+10                                                                                                                                                                                                               /system/lib/libc.so
  000194c1  __libc_android_abort+34                                                                                                                                                                                                /system/lib/libc.so
  000174ac  abort+4                                                                                                                                                                                                                /system/lib/libc.so
  v------>  base::debug::(anonymous namespace)::DebugBreak()                                                                                                                                                                       /usr/local/google/home/mathp/clank/src/base/debug/debugger_posix.cc:221
  00088caf  base::debug::BreakDebugger()                                                                                                                                                                                           /usr/local/google/home/mathp/clank/src/base/debug/debugger_posix.cc:251
  0009cb55  ~LogMessage                                                                                                                                                                                                            /usr/local/google/home/mathp/clank/src/base/logging.cc:759
  00ac4089  data_reduction_proxy::DataReductionProxyRequestOptions::SetSecureSession(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)                                        /usr/local/google/home/mathp/clank/src/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc:208
  00abf0ff  data_reduction_proxy::DataReductionProxyConfigServiceClient::ParseAndApplyProxyConfig(data_reduction_proxy::ClientConfig const&)                                                                                       /usr/local/google/home/mathp/clank/src/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc:487
  00abf887  data_reduction_proxy::DataReductionProxyConfigServiceClient::HandleResponse(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, net::URLRequestStatus const&, int)  /usr/local/google/home/mathp/clank/src/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc:427
  00abf795  data_reduction_proxy::DataReductionProxyConfigServiceClient::OnURLFetchComplete(net::URLFetcher const*)                                                                                                                /usr/local/google/home/mathp/clank/src/components/data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc:347
  00335463  net::URLFetcherCore::InformDelegateFetchIsComplete()                                                                                                                                                                   /usr/local/google/home/mathp/clank/src/net/url_request/url_fetcher_core.cc:725
  003353e3  net::URLFetcherCore::OnCompletedURLRequest(base::TimeDelta)                                                                                                                                                            /usr/local/google/home/mathp/clank/src/net/url_request/url_fetcher_core.cc:718
  000895af  base::internal::RunMixin<base::Callback<void (), (base::internal::CopyMode)0, (base::internal::RepeatMode)0> >::Run() &&                                                                                               /usr/local/google/home/mathp/clank/src/base/callback.h:68
  00089495  base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*)                                                                                                                                                   /usr/local/google/home/mathp/clank/src/base/debug/task_annotator.cc:52
  000a3f3d  base::MessageLoop::RunTask(base::PendingTask*)                                                                                                                                                                         /usr/local/google/home/mathp/clank/src/base/message_loop/message_loop.cc:413
  000a4193  base::MessageLoop::DeferOrRunPendingTask(base::PendingTask)                                                                                                                                                            /usr/local/google/home/mathp/clank/src/base/message_loop/message_loop.cc:422
  000a4377  base::MessageLoop::DoWork()                                                                                                                                                                                            /usr/local/google/home/mathp/clank/src/base/message_loop/message_loop.cc:515
  000a68bd  base::MessagePumpLibevent::Run(base::MessagePump::Delegate*)                                                                                                                                                           /usr/local/google/home/mathp/clank/src/base/message_loop/message_pump_libevent.cc:218
  000a3d73  base::MessageLoop::RunHandler()                                                                                                                                                                                        /usr/local/google/home/mathp/clank/src/base/message_loop/message_loop.cc:378
  000bee8f  base::RunLoop::Run()                                                                                                                                                                                                   /usr/local/google/home/mathp/clank/src/base/run_loop.cc:37
  000e14f1  base::Thread::Run(base::RunLoop*)                                                                                                                                                                                      /usr/local/google/home/mathp/clank/src/base/threading/thread.cc:245
  006f6123  content::BrowserThreadImpl::IOThreadRun(base::RunLoop*)                                                                                                                                                                /usr/local/google/home/mathp/clank/src/content/browser/browser_thread_impl.cc:252
  006f6221  content::BrowserThreadImpl::Run(base::RunLoop*)                                                                                                                                                                        /usr/local/google/home/mathp/clank/src/content/browser/browser_thread_impl.cc:287
  000e18a5  base::Thread::ThreadMain()                                                                                                                                                                                             /usr/local/google/home/mathp/clank/src/base/threading/thread.cc:328
  000dc667  base::(anonymous namespace)::ThreadFunc(void*)                                                                                                                                                                         /usr/local/google/home/mathp/clank/src/base/threading/platform_thread_posix.cc:71
  0003f3e7  __pthread_start(void*)+30                                                                                                                                                                                              /system/lib/libc.so
  00019b43  __start_thread+6                                                                                                                                                                                                       /system/lib/libc.so

 

Comment 1 by ma...@chromium.org, Dec 16 2016

To be more precise, the crash happens when I open Chrome and the Data Saver screen opens.
The call to thread checker in Init is re-attaching to the UI thread, which is the wrong thread to be attached to, and causing the later DCHECK. Move the Detach from thread call to the Init method instead of the constructor and verify that Init is called on the UI thread maybe. It might actually be best to remove Init() altogether and do the work from the constructor.

void DataReductionProxyRequestOptions::Init() {
  DCHECK(thread_checker_.CalledOnValidThread());
  .....
}

The DCHECK was added and that CL was reverted. Here is the revert CL:https://codereview.chromium.org/2577413002/

 Issue 674854  has been merged into this issue.
Status: Fixed (was: Assigned)
Fixed in https://codereview.chromium.org/2577413002/.

Sign in to add a comment