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

Issue 686118 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug

Blocking:
issue 348655



Sign in to add a comment

Content-Security-Policy - WTF::isBeforeThreadCreated() assertion fail when calling registerURLSchemeAsBypassingContentSecurityPolicy()

Project Member Reported by arthurso...@chromium.org, Jan 27 2017

Issue description

Chrome Version: commit 04445b9ca99cf8248808d81df014e389ad75efc2
OS: All

Some layout test are crashing (sometimes):
* http/tests/security/contentSecurityPolicy/register-bypassing-scheme-script.https.html
* http/tests/security/contentSecurityPolicy/register-bypassing-scheme-partial.html
* http/tests/security/contentSecurityPolicy/register-bypassing-scheme.html                      


It happens when the ContentSecurityPolicy object try to modify the SchemeRegistry before some initialization.

Crash log
---------

STDOUT: #CRASHED - renderer
STDERR: [102136:102136:0127/171457.464578:184788877651:FATAL:SchemeRegistry.cpp(92)] Check failed: WTF::isBeforeThreadCreated(). 
STDERR: #0 0x2ac463e93fde base::debug::StackTrace::StackTrace()
STDERR: #1 0x2ac463f003af logging::LogMessage::~LogMessage()
STDERR: #2 0x2ac469eab50e blink::(anonymous namespace)::getMutableURLSchemesRegistry()
STDERR: #3 0x2ac469eadb6c blink::SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy()
STDERR: #4 0x000000543e40 blink::Internals::registerURLSchemeAsBypassingContentSecurityPolicy()
STDERR: #5 0x000000611949 blink::InternalsV8Internal::registerURLSchemeAsBypassingContentSecurityPolicy1Method()
STDERR: #6 0x0000005fee7a blink::InternalsV8Internal::registerURLSchemeAsBypassingContentSecurityPolicyMethod()
STDERR: #7 0x0000005fedf5 blink::V8Internals::registerURLSchemeAsBypassingContentSecurityPolicyMethodCallback()
STDERR: #8 0x2ac468a7ebcb v8::internal::FunctionCallbackArguments::Call()
STDERR: #9 0x2ac468b4d8a3 v8::internal::(anonymous namespace)::HandleApiCallHelper<>()
STDERR: #10 0x2ac468b4c3e0 v8::internal::Builtin_Impl_HandleApiCall()
STDERR: #11 0x06cd7b58426e <unknown>
 
Cc: arthurso...@chromium.org
These tests are still very flaky (mostly crashing) on debug build of Linux and Mac according to the flakiness dashboard:
- register-bypassing-scheme.html
- register-bypassing-scheme-partial.html

https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webkit_tests&tests=register-bypassing-scheme

Comment 3 by mkwst@chromium.org, Feb 22 2017

Labels: -OS-All OS-Android OS-Chrome OS-Linux OS-Mac OS-Windows
Owner: andypaicu@chromium.org
Status: Assigned (was: Untriaged)
Hi, Andy! :)

Comment 4 by horo@chromium.org, Mar 9 2017

Cc: kinuko@chromium.org csharrison@chromium.org
 Issue 699347  has been merged into this issue.

Comment 5 by horo@chromium.org, Mar 9 2017

Blocking: 348655
Cc: andypaicu@chromium.org
Owner: csharrison@chromium.org
I should own it, as I made the restriction that the scheme registry should be immutable once other threads start up. Otherwise we need to re-add the mutex :(

As I mentioned in the other linked bug, we need to look through these tests to see which ones do modification after/during a page load. Hopefully they can all be rewritten to do their modifications earlier.

Comment 7 by kinuko@chromium.org, Mar 10 2017

These tests call registerURLSchemeAsBypassingContentSecurityPolicy() from javascript via Internals, I can imagine that could happen after thread creation.

I believe this is test-only failure, but I don't have a great idea about how to fix this...
In the duped bug I said maybe we could do this from SimTests? In SimTest setup we should be okay here I think (not totally familiar though).
Project Member

Comment 9 by bugdroid1@chromium.org, Aug 17 2017

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

commit 70a5474589c0ede71345672a01777a60891b6036
Author: Max Morin <maxmorin@chromium.org>
Date: Thu Aug 17 14:30:14 2017

Add crash expectation to register-bypassing-scheme tests.

They crash a lot.

BUG=686118
TBR=csharrison
NOTRY=true

Change-Id: I865a8261a1a055bf854d7145c30797306b2b9d6c
Reviewed-on: https://chromium-review.googlesource.com/619089
Reviewed-by: Max Morin <maxmorin@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Commit-Queue: Max Morin <maxmorin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495168}
[modify] https://crrev.com/70a5474589c0ede71345672a01777a60891b6036/third_party/WebKit/LayoutTests/TestExpectations

Labels: Hotlist-EnamelAndFriendsFixIt
Labels: -Hotlist-EnamelAndFriendsFixIt
Project Member

Comment 12 by bugdroid1@chromium.org, Jul 13

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

commit 0c881ee2276c5528873915860d3ca5c95fc37587
Author: Peter Mayo <petermayo@chromium.org>
Date: Fri Jul 13 02:24:48 2018

Update TestExpectations for crashy layout test

https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webkit_layout_tests&tests=http/tests/security/setDomainRelaxationForbiddenForURLScheme.html
indicates that on many builders (probably all those without DCHECK
on) this test passes.

Bug:  699347 , 686118
Change-Id: I7496ce45d0ce5c196073acba954f8cd48c7f1f3b
Reviewed-on: https://chromium-review.googlesource.com/1135661
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Commit-Queue: Peter Mayo <petermayo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574820}
[modify] https://crrev.com/0c881ee2276c5528873915860d3ca5c95fc37587/third_party/WebKit/LayoutTests/TestExpectations

Sign in to add a comment