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

Issue 707010 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

Remove base::ScopedAllowCrossThreadRefCountAccess from HttpServer.

Project Member Reported by michaeldo@chromium.org, Mar 30 2017

Issue description

The |process_request| block in HttpServer::InitHttpServer() is called back on an arbitrary block. This is a threading issue and now DCHECKs after https://codereview.chromium.org/2666423002 due to cross thread access to a non-thread-safe RefCount.

An exemption has been added, but the threading issue should be fixed.

The following tests were hitting this DCHECK:
VisibleURLTestCase.testDoubleBackNavigation
VisibleURLTestCase.testStoppingPendingBackNavigationAndReload
VisibleURLTestCase.testRendererInitiatedNavigationWithPendingBackNavigation
VisibleURLTestCase.testBackNavigationWithPendingRendererInitiatedNavigation
VisibleURLTestCase.testBackNavigationWithPendingReload

ref: https://build.chromium.org/p/chromium.fyi/builders/EarlGreyiOS/builds/25954

Example failure:
VisibleURLTestCase.testDoubleBackNavigation:
[0330/092319.550617:FATAL:ref_counted.h(52)] Check failed: CalledOnValidSequence().
0   ios_chrome_web_egtests              0x000000010301322d base::debug::StackTrace::StackTrace(unsigned long) + 157
1   ios_chrome_web_egtests              0x00000001030132ad base::debug::StackTrace::StackTrace(unsigned long) + 29
2   ios_chrome_web_egtests              0x0000000103011f6c base::debug::StackTrace::StackTrace() + 28
3   ios_chrome_web_egtests              0x0000000103080d90 logging::LogMessage::~LogMessage() + 80
4   ios_chrome_web_egtests              0x000000010307ea85 logging::LogMessage::~LogMessage() + 21
5   ios_chrome_web_egtests              0x0000000102129a4c base::subtle::RefCountedBase::AddRef() const + 364
6   ios_chrome_web_egtests              0x0000000102f55055 base::RefCounted<web::test::RefCountedResponseProviderWrapper>::AddRef() const + 21
7   ios_chrome_web_egtests              0x0000000102f55039 scoped_refptr<web::test::RefCountedResponseProviderWrapper>::AddRef(web::test::RefCountedResponseProviderWrapper*) + 25
8   ios_chrome_web_egtests              0x0000000102f54fec scoped_refptr<web::test::RefCountedResponseProviderWrapper>::operator=(web::test::RefCountedResponseProviderWrapper*) + 44
9   ios_chrome_web_egtests              0x0000000102f53d40 scoped_refptr<web::test::RefCountedResponseProviderWrapper>::operator=(scoped_refptr<web::test::RefCountedResponseProviderWrapper> const&) + 32
10  ios_chrome_web_egtests              0x0000000102f51090 web::test::HttpServer::GetResponseProviderForRequest(web::ResponseProvider::Request const&) + 960
11  ios_chrome_web_egtests              0x0000000102f50787 ___ZN3web4test10HttpServer14InitHttpServerEv_block_invoke + 103
12  ios_chrome_web_egtests              0x0000000102f90f9f __79-[GCDWebServer(Handlers) addDefaultHandlerForMethod:requestClass:processBlock:]_block_invoke + 127
13  ios_chrome_web_egtests              0x0000000102f9b882 -[GCDWebServerConnection(Subclassing) processRequest:completion:] + 178
14  ios_chrome_web_egtests              0x0000000102f97b39 -[GCDWebServerConnection _startProcessingRequest] + 233
15  ios_chrome_web_egtests              0x0000000102f9a137 __45-[GCDWebServerConnection _readRequestHeaders]_block_invoke + 3319
16  ios_chrome_web_egtests              0x0000000102f95375 __65-[GCDWebServerConnection(Read) _readHeaders:withCompletionBlock:]_block_invoke + 709
17  ios_chrome_web_egtests              0x0000000102f94bb1 __69-[GCDWebServerConnection(Read) _readData:withLength:completionBlock:]_block_invoke + 369
18  libdispatch.dylib                   0x00000001152812e2 __dispatch_read_block_invoke_2.52 + 39
19  libdispatch.dylib                   0x0000000115265810 _dispatch_call_block_and_release + 12
20  libdispatch.dylib                   0x000000011528712e _dispatch_client_callout + 8
21  libdispatch.dylib                   0x000000011526ec04 _dispatch_root_queue_drain + 1008
22  libdispatch.dylib                   0x000000011526e7b4 _dispatch_worker_thread3 + 113
23  libsystem_pthread.dylib             0x00000001155ee712 _pthread_wqthread + 1299
24  libsystem_pthread.dylib             0x00000001155ee1ed start_wqthread + 13
 

Comment 1 by jif@chromium.org, Mar 31 2017

Owner: baxley@chromium.org
Status: Assigned (was: Untriaged)

Comment 2 by baxley@chromium.org, Mar 31 2017

Components: -Tests Test>iOS
Owner: huangml@chromium.org
This will likely be WontFix, since Menglu is introducing a new http server. We should keep this bug open until that happens.

Comment 3 by jif@chromium.org, Apr 3 2017

Cc: huangml@chromium.org michaeldo@chromium.org
 Issue 707764  has been merged into this issue.
Cc: -huangml@chromium.org
Status: WontFix (was: Assigned)

Sign in to add a comment