New issue
Advanced search Search tips

Issue 883686 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 8
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

system_network_context_manager() called on wrong sequence in WebRtcLogUploader::UploadCompressedLog

Project Member Reported by grunell@chromium.org, Sep 13

Issue description

[7810:20739:0913/132204.428790:FATAL:browser_process_impl.cc(643)] Check failed: (sequence_checker_).CalledOnValidSequence(). 
0   libbase.dylib                       0x0000000112dde8dc base::debug::StackTrace::StackTrace(unsigned long) + 28
1   libbase.dylib                       0x0000000112cd89ff logging::LogMessage::~LogMessage() + 223
2   libchrome_dll.dylib                 0x000000010c812d71 BrowserProcessImpl::system_network_context_manager() + 97
3   libchrome_dll.dylib                 0x000000010c90bd72 WebRtcLogUploader::UploadCompressedLog(WebRtcLogUploadDoneData const&, std::__1::unique_ptr<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::default_delete<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >) + 546
4   libchrome_dll.dylib                 0x000000010c90d950 base::internal::Invoker<base::internal::BindState<void (WebRtcLogUploader::*)(WebRtcLogUploadDoneData const&, std::__1::unique_ptr<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::default_delete<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >), base::internal::UnretainedWrapper<WebRtcLogUploader>, WebRtcLogUploadDoneData, std::__1::unique_ptr<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::default_delete<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >, void ()>::RunOnce(base::internal::BindStateBase*) + 64
5   libbase.dylib                       0x0000000112cbb911 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 321
6   libbase.dylib                       0x0000000112cf3aae base::MessageLoop::RunTask(base::PendingTask*) + 286
7   libbase.dylib                       0x0000000112cf3ed3 base::MessageLoop::DoWork() + 387
8   libbase.dylib                       0x0000000112e04ef4 base::MessagePumpLibevent::Run(base::MessagePump::Delegate*) + 244
9   libbase.dylib                       0x0000000112cf3644 base::MessageLoop::Run(bool) + 132
10  libbase.dylib                       0x0000000112d31819 base::RunLoop::Run() + 249
11  libbase.dylib                       0x0000000112d9eeee base::Thread::Run(base::RunLoop*) + 206
12  libcontent.dylib                    0x000000011445f744 content::BrowserProcessSubThread::IOThreadRun(base::RunLoop*) + 20
13  libcontent.dylib                    0x000000011445f6e4 content::BrowserProcessSubThread::Run(base::RunLoop*) + 212
14  libbase.dylib                       0x0000000112d9f557 base::Thread::ThreadMain() + 839
15  libbase.dylib                       0x0000000112df00bf base::(anonymous namespace)::ThreadFunc(void*) + 95
16  libsystem_pthread.dylib             0x00007fff6917f661 _pthread_body + 340
17  libsystem_pthread.dylib             0x00007fff6917f50d _pthread_body + 0
18  libsystem_pthread.dylib             0x00007fff6917ebf9 thread_start + 13

Looks like it started with https://chromium-review.googlesource.com/c/chromium/src/+/1102492
 
Summary: system_network_context_manager() called on wrong sequence in WebRtcLogUploader::UploadCompressedLog (was: system_network_context_manager() called on wrong thread in WebRtcLogUploader::UploadCompressedLog)
Owner: mmenke@chromium.org
Matt, can you take a look or re-assign?
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 8

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

commit fbb7d2e309369c8539c63851da1e49d3e13a2018
Author: Matt Menke <mmenke@chromium.org>
Date: Mon Oct 08 20:07:12 2018

Fix a WebRtcLogUploader threading bug.

It was grabbing a UI-thread-bound URLLoaderFactory Mojo interface on
the IO thread, and using it there. This CL modifies it to creates its
own IO-thread-bound URLLoaderFactory (It doesn't share with anything
else, because SystemNetworkContextManager isn't used much on the IO
thread).

It may be possible to just move the requests over to the UI thread,
and use a shared URLLoaderFactory, but this seems the simplest fix.
Also, requests come in on the IO thread through a
content::MessageHandler, so we're stuck with extra hops, either way.

Bug:  883686 
Change-Id: I71b2050d5ac4c7d58d30640c0579fa0ae5bf8e13
Reviewed-on: https://chromium-review.googlesource.com/c/1264920
Commit-Queue: Matt Menke <mmenke@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597656}
[modify] https://crrev.com/fbb7d2e309369c8539c63851da1e49d3e13a2018/chrome/browser/media/webrtc/webrtc_log_uploader.cc
[modify] https://crrev.com/fbb7d2e309369c8539c63851da1e49d3e13a2018/chrome/browser/media/webrtc/webrtc_log_uploader.h

Status: Fixed (was: Assigned)

Sign in to add a comment