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

Issue 659949 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit 26 days ago
Closed: Oct 2016
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Failing DCHECK_EQ in GetCanonicalHostRegistryLength

Project Member Reported by foolip@chromium.org, Oct 27 2016

Issue description

Introduced in https://codereview.chromium.org/2451353002

Since then, there have been at least two crashes in http/tests/xmlhttprequest/origin-whitelisting-ip-addresses-with-subdomains.html on WebKit Mac10.11 (dbg):
https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Mac10_11__dbg_/5537/layout-test-results/results.html
https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Mac10_11__dbg_/5541/layout-test-results/results.html

crash log for renderer (pid <unknown>):
STDOUT: <empty>
STDERR: [6141:1295:1026/195321:1039388423152:FATAL:registry_controlled_domain.cc(400)] Check failed: net::CanonicalizeHost(canon_host, &host_info) == canon_host (%2A.0.0.1 vs. *.0.0.1)
STDERR: 0   libbase.dylib                       0x000000011391755e _ZN4base5debug10StackTraceC2Ev + 30
STDERR: 1   libbase.dylib                       0x00000001139175c5 _ZN4base5debug10StackTraceC1Ev + 21
STDERR: 2   libbase.dylib                       0x00000001139b04f0 _ZN7logging10LogMessageD2Ev + 80
STDERR: 3   libbase.dylib                       0x00000001139ae0a5 _ZN7logging10LogMessageD1Ev + 21
STDERR: 4   libnet.dylib                        0x0000000117e605f7 _ZN3net27registry_controlled_domains30GetCanonicalHostRegistryLengthEN4base16BasicStringPieceINSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEENS0_21UnknownRegistryFilterENS0_21PrivateRegistryFilterE + 279
STDERR: 5   libcontent.dylib                    0x000000010be1db83 _ZN7content23WebPublicSuffixListImpl21getPublicSuffixLengthERKN5blink9WebStringE + 83
STDERR: 6   libblink_platform.dylib             0x000000011dea364c _ZN5blink17OriginAccessEntryC2ERKN3WTF6StringES4_NS0_16SubdomainSettingE + 300
STDERR: 7   libblink_platform.dylib             0x000000011dea3a6b _ZN5blink17OriginAccessEntryC1ERKN3WTF6StringES4_NS0_16SubdomainSettingE + 43
STDERR: 8   libblink_platform.dylib             0x000000011deb2d0f _ZN5blink14SecurityPolicy29addOriginAccessWhitelistEntryERKNS_14SecurityOriginERKN3WTF6StringES7_b + 1151
STDERR: 9   libblink_web.dylib                  0x000000011fbd17eb _ZN5blink17WebSecurityPolicy29addOriginAccessWhitelistEntryERKNS_6WebURLERKNS_9WebStringES6_b + 171
STDERR: 10  libtest_runner.dylib                0x00000001202d2e64 _ZN11test_runner10TestRunner29AddOriginAccessWhitelistEntryERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_S9_b + 244
STDERR: 11  libtest_runner.dylib                0x00000001202cb994 _ZN11test_runner18TestRunnerBindings29AddOriginAccessWhitelistEntryERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_S9_b + 116
STDERR: 12  libtest_runner.dylib                0x00000001202e97e0 _ZN4base8internal13FunctorTraitsIMN11test_runner18TestRunnerBindingsEFvRKNSt3__112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEESC_SC_bEvE6InvokeIPS3_JSC_SC_SC_bEEEvSE_OT_DpOT0_ + 224
STDERR: 13  libtest_runner.dylib                0x00000001202e96f1 _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIRKMN11test_runner18TestRunnerBindingsEFvRKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEESE_SE_bEJPS5_SE_SE_SE_bEEEvOT_DpOT0_ + 161
STDERR: 14  libtest_runner.dylib                0x00000001202e9645 _ZN4base8internal7InvokerINS0_9BindStateIMN11test_runner18TestRunnerBindingsEFvRKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESD_SD_bEJEEEFvPS4_SD_SD_SD_bEE7RunImplIRKSF_RKNS5_5tupleIJEEEJEEEvOT_OT0_NS_13IndexSequenceIJXspT1_EEEEOSH_SD_SD_SD_Ob + 117
STDERR: 15  libtest_runner.dylib                0x00000001202e9556 _ZN4base8internal7InvokerINS0_9BindStateIMN11test_runner18TestRunnerBindingsEFvRKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESD_SD_bEJEEEFvPS4_SD_SD_SD_bEE3RunEPNS0_13BindStateBaseEOSH_SD_SD_SD_Ob + 150
STDERR: 16  libtest_runner.dylib                0x00000001202e93be _ZNK4base8internal8RunMixinINS_8CallbackIFvPN11test_runner18TestRunnerBindingsERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEESE_SE_bELNS0_8CopyModeE1ELNS0_10RepeatModeE1EEEE3RunES5_SE_SE_SE_b + 174
STDERR: 17  libtest_runner.dylib                0x00000001202e8fca _ZN3gin8internal7InvokerINS0_13IndicesHolderIJLm0ELm1ELm2ELm3ELm4EEEEJPN11test_runner18TestRunnerBindingsERKNSt3__112basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEESF_SF_bEE18DispatchToCallbackEN4base8CallbackIFvS6_SF_SF_SF_bELNSH_8internal8CopyModeE1ELNSK_10RepeatModeE1EEE + 74
STDERR: 18  libtest_runner.dylib                0x00000001202e8d2f _ZN3gin8internal10DispatcherIFvPN11test_runner18TestRunnerBindingsERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEESD_SD_bEE18DispatchToCallbackERKN2v820FunctionCallbackInfoINSG_5ValueEEE + 383
STDERR: 19  libv8.dylib                         0x000000011c4f96ef _ZN2v88internal25FunctionCallbackArguments4CallEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEE + 415
STDERR: 20  libv8.dylib                         0x000000011c5c1cac _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperILb0EEENS0_11MaybeHandleINS0_6ObjectEEEPNS0_7IsolateENS0_6HandleINS0_10HeapObjectEEESA_NS8_INS0_20FunctionTemplateInfoEEENS8_IS4_EENS0_16BuiltinArgumentsE + 1036
STDERR: 21  libv8.dylib                         0x000000011c5c0938 _ZN2v88internalL26Builtin_Impl_HandleApiCallENS0_16BuiltinArgumentsEPNS0_7IsolateE + 344
STDERR: 22  libv8.dylib                         0x000000011c5c05b4 _ZN2v88internal21Builtin_HandleApiCallEiPPNS0_6ObjectEPNS0_7IsolateE + 212
STDERR: 23  ???                                 0x00001e885ec043a7 0x0 + 33571054044071
STDERR: 
 

Comment 1 by foolip@chromium.org, Oct 27 2016

Labels: Sheriff-Chromium
http://test-results.appspot.com/dashboards/flakiness_dashboard.html is down so I can't tell if this is widespread or not, but I'll revert now.

Comment 2 by foolip@chromium.org, Oct 27 2016

Filed issue 659952 for flakiness dashboard.
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 27 2016

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

commit f2903f44f5ed9d756fb182a0fdd88fe85d172aab
Author: foolip <foolip@chromium.org>
Date: Thu Oct 27 10:00:02 2016

Revert of Reduce buggy usage of the registry controlled domain service. (patchset #2 id:20001 of https://codereview.chromium.org/2451353002/ )

Reason for revert:
Failing DCHECK_EQ in GetCanonicalHostRegistryLength on WebKit Mac10.11 (dbg) running http/tests/xmlhttprequest/origin-whitelisting-ip-addresses-with-subdomains.html

BUG= 659949 

Original issue's description:
> Reduce buggy usage of the registry controlled domain service.
>
> GetRegistryLength for host names canonicalizes the input for the caller, but
> then returns the length in the canonicalized input, which is not necessarily
> the same as the length in the original string. As a result, computations
> performed by the caller based on this value can be wrong (see the bug for
> more).
>
> All callers of this function were audited and changed to use on of the
> following:
>
> - Many callers don't need the offsets. A new function
>   HostHasRegistryControlledDomain is added to check for the presence of
>   a R.C.D. without the risk of returning incorrect string lengths.
>
> - Many callers already have guaranteed-canonical strings (they came out of
>   a GURL or KURL object soon before the call) These were changed to use a
>   new GetCanonicalHostRegistryLength function. A further advantage is that
>   these calls will be faster.
>
> - A new Permissive function is added that handles cases where the input
>   is necessarily non-canonical.
>
> Adds an IDN test case to the unit tests.
>
> Removes checking for IP addresses in the already-known-canonical cases.
> This requires a separate full canonicalization and IP addresses should
> never match the R.C.D. list.
>
> Reland of https://codereview.chromium.org/2446273004/ with fix which was a
> reland of https://codereview.chromium.org/2433583002/ with fix.
>
> TBR=pkasting@chromium.org
> BUG= 657199 
>
> Committed: https://crrev.com/1b0d95acde33777b9b9ab136c35eeefc11a64718
> Cr-Commit-Position: refs/heads/master@{#427908}

TBR=pkasting@chromium.org,brettw@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 657199 

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

[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/chrome/browser/android/history_report/delta_file_commons.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/chrome/browser/supervised_user/supervised_user_url_filter.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/chrome/browser/supervised_user/supervised_user_url_filter.h
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/chrome/renderer/safe_browsing/phishing_url_feature_extractor.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/components/google/core/browser/google_util.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/components/history/core/browser/history_backend.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/components/omnibox/browser/autocomplete_input.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/components/omnibox/browser/history_quick_provider.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/components/omnibox/browser/history_url_provider.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/components/search_engines/template_url_service.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/components/ssl_errors/error_classification.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/components/ssl_errors/error_classification.h
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/components/ssl_errors/error_classification_unittest.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/components/url_formatter/url_fixer.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/content/renderer/webpublicsuffixlist_impl.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/content/renderer/webpublicsuffixlist_impl.h
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/extensions/common/csp_validator.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/extensions/common/manifest_handlers/externally_connectable.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/extensions/common/permissions/permission_message_util.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/extensions/common/url_pattern.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/net/base/registry_controlled_domains/effective_tld_names_unittest1.gperf
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/net/base/registry_controlled_domains/registry_controlled_domain.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/net/base/registry_controlled_domains/registry_controlled_domain.h
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/net/base/registry_controlled_domains/registry_controlled_domain_unittest.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/net/base/url_util.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/net/cert/cert_verify_proc.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/net/cert/x509_certificate.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/third_party/WebKit/public/platform/WebPublicSuffixList.h
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/url/url_canon.h
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/url/url_canon_host.cc
[modify] https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab/url/url_canon_unittest.cc

Comment 5 by foolip@chromium.org, Oct 27 2016

And Windows:
https://storage.googleapis.com/chromium-layout-test-archives/WebKit_Win7__dbg_/7885/layout-test-results/results.html

FWIW, I'm not certain that what I reverted is the culprit or if something after it started triggering the asserts.

Comment 7 by brettw@chromium.org, Oct 27 2016

Status: Fixed (was: Assigned)

Sign in to add a comment