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

Issue 772175 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Previews Blacklist crashes in debug mode when the URL doesn't have a host

Project Member Reported by sclit...@chromium.org, Oct 5 2017

Issue description

Originally from CL https://chromium-review.googlesource.com/c/chromium/src/+/703715, by rlanday@chromium.org.

Chrome Version: 63.0.3233.0
OS: Android (but probably reproducible on Desktop too with other file URIs)

What steps will reproduce the problem?
(1) Run a debug build of Chrome, with a preview type enabled, e.g. Client LoFi
(2) Navigate to "file:///sdcard"
(3) Chrome crashes

What is the expected result?

The page loads normally without crashing

What happens instead?

Chrome crashes.

Note that Release builds don't crash - the DCHECK is just skipped and everything seems to work fine.
 
Stack trace courtesy of rlanday@, copied from https://chromium-review.googlesource.com/c/chromium/src/+/703715:

The stack trace is:

[FATAL:previews_black_list.cc(128)] Check failed: url.has_host().

Stack Trace:
  RELADDR   FUNCTION                                                                                                                                                                                                                                                                                                                                                                                                                      FILE:LINE
  000a662b  ~LogMessage                                                                                                                                                                                                                                                                                                                                                                                                                   /usr/local/google/code/clankium/src/base/logging.cc:560
  00a51d93  previews::PreviewsBlackList::IsLoadedAndAllowed(GURL const&, previews::PreviewsType) const                                                                                                                                                                                                                                                                                                                                    /usr/local/google/code/clankium/src/components/previews/core/previews_black_list.cc:134
  00a532f9  previews::PreviewsIOData::ShouldAllowPreviewAtECT(net::URLRequest const&, previews::PreviewsType, net::EffectiveConnectionType, std::__ndk1::vector<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::allocator<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > > > const&) const                                   /usr/local/google/code/clankium/src/components/previews/core/previews_io_data.cc:154
  002c2d35  data_reduction_proxy::DataReductionProxyIOData::ShouldEnableLoFi(net::URLRequest const&, previews::PreviewsDecider*)                                                                                                                                                                                                                                                                                                          /usr/local/google/code/clankium/src/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc:292
  00962d1d  content::ResourceDispatcherHostImpl::BeginNavigationRequest(content::ResourceContext*, net::URLRequestContext*, storage::FileSystemContext*, content::NavigationRequestInfo const&, std::__ndk1::unique_ptr<content::NavigationUIData, std::__ndk1::default_delete<content::NavigationUIData> >, content::NavigationURLLoaderImplCore*, content::ServiceWorkerNavigationHandleCore*, content::AppCacheNavigationHandleCore*)  /usr/local/google/code/clankium/src/content/browser/loader/resource_dispatcher_host_impl.cc:2110
-----------------------------------------------------

     r0 00000000  r1 00002675  r2 00000006  r3 00000008
     r4 ccb8b978  r5 00000006  r6 ccb8b920  r7 0000010c
     r8 ccb8aca4  r9 00000042  sl ccb8a834  fp d6eef280
     ip 0000000b  sp ccb8a7b0  lr f4aca507  pc f4accd64
Stack Trace:
  RELADDR   FUNCTION                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    FILE:LINE
  00049d64  tgkill+12                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   /system/lib/libc.so
  00047503  pthread_kill+34                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             /system/lib/libc.so
  0001d855  raise+10                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    /system/lib/libc.so
  000193a1  __libc_android_abort+34                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     /system/lib/libc.so
  00017014  abort+4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     /system/lib/libc.so
  v------>  base::debug::(anonymous namespace)::DebugBreak()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            /usr/local/google/code/clankium/src/base/debug/debugger_posix.cc:228
  000951ad  base::debug::BreakDebugger()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /usr/local/google/code/clankium/src/base/debug/debugger_posix.cc:258
  000a6819  ~LogMessage                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 /usr/local/google/code/clankium/src/base/logging.cc:791
  00a51d93  previews::PreviewsBlackList::IsLoadedAndAllowed(GURL const&, previews::PreviewsType) const                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  /usr/local/google/code/clankium/src/components/previews/core/previews_black_list.cc:134
  00a532f7  previews::PreviewsIOData::ShouldAllowPreviewAtECT(net::URLRequest const&, previews::PreviewsType, net::EffectiveConnectionType, std::__ndk1::vector<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::allocator<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > > > const&) const                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 /usr/local/google/code/clankium/src/components/previews/core/previews_io_data.cc:154
  002c2d35  data_reduction_proxy::DataReductionProxyIOData::ShouldEnableLoFi(net::URLRequest const&, previews::PreviewsDecider*)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        /usr/local/google/code/clankium/src/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc:292
  00962d1b  content::ResourceDispatcherHostImpl::BeginNavigationRequest(content::ResourceContext*, net::URLRequestContext*, storage::FileSystemContext*, content::NavigationRequestInfo const&, std::__ndk1::unique_ptr<content::NavigationUIData, std::__ndk1::default_delete<content::NavigationUIData> >, content::NavigationURLLoaderImplCore*, content::ServiceWorkerNavigationHandleCore*, content::AppCacheNavigationHandleCore*)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                /usr/local/google/code/clankium/src/content/browser/loader/resource_dispatcher_host_impl.cc:2110
  0095a057  content::NavigationURLLoaderImplCore::Start(content::ResourceContext*, net::URLRequestContextGetter*, storage::FileSystemContext*, content::ServiceWorkerNavigationHandleCore*, content::AppCacheNavigationHandleCore*, std::__ndk1::unique_ptr<content::NavigationRequestInfo, std::__ndk1::default_delete<content::NavigationRequestInfo> >, std::__ndk1::unique_ptr<content::NavigationUIData, std::__ndk1::default_delete<content::NavigationUIData> >)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 

... See the comment on the CL for the rest of the stack trace, since crbug doesn't allow super long comments
Thanks for finding this. I'm surprised we haven't seen this by now, but I plan to block all non-host previews from the blacklist perspective, as it's very likely we don't want to provide a preview for these.
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 6 2017

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

commit b1007d4202e961bbf529e2e4f87a885041c664ca
Author: Ryan Sturm <ryansturm@chromium.org>
Date: Fri Oct 06 02:39:21 2017

Prevent previews when the url has no host

In this case, we don't want to serve a preview.

Bug:  772175 
Change-Id: I320d6ad26cb7cf51dba9797447e388816115df91
Reviewed-on: https://chromium-review.googlesource.com/703859
Reviewed-by: Scott Little <sclittle@chromium.org>
Commit-Queue: Ryan Sturm <ryansturm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506955}
[modify] https://crrev.com/b1007d4202e961bbf529e2e4f87a885041c664ca/components/previews/core/previews_io_data.cc
[modify] https://crrev.com/b1007d4202e961bbf529e2e4f87a885041c664ca/components/previews/core/previews_io_data_unittest.cc

Status: Fixed (was: Assigned)

Comment 5 by efoo@chromium.org, Dec 5 2017

Components: Blink>Previews

Comment 6 by efoo@chromium.org, Dec 5 2017

Components: -UI>Browser>Previews

Sign in to add a comment