Bug 184059 - Drop locks in SchemeRegistry that are no longer necessary
Summary: Drop locks in SchemeRegistry that are no longer necessary
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on: 184024 184029 184064 184068 184108 184125
Blocks:
  Show dependency treegraph
 
Reported: 2018-03-27 16:41 PDT by Chris Dumez
Modified: 2018-04-05 12:03 PDT (History)
4 users (show)

See Also:


Attachments
WIP Patch (2.69 KB, patch)
2018-03-27 17:56 PDT, Chris Dumez
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews114 for mac-sierra (1.17 MB, application/zip)
2018-03-27 19:05 PDT, EWS Watchlist
no flags Details
WIP patch (2.73 KB, patch)
2018-03-29 09:37 PDT, Chris Dumez
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-sierra (2.19 MB, application/zip)
2018-03-29 10:30 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews106 for mac-sierra-wk2 (3.19 MB, application/zip)
2018-03-29 10:41 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews115 for mac-sierra (1.95 MB, application/zip)
2018-03-29 10:52 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-wk2 (2.67 MB, application/zip)
2018-03-29 11:15 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews202 for win-future (12.24 MB, application/zip)
2018-03-29 11:33 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2018-03-27 16:41:45 PDT
Drop locks in SchemeRegistry that are no longer necessary now that SecurityOrigin objects are always constructed on the main thread.
Comment 1 Chris Dumez 2018-03-27 17:56:32 PDT
Created attachment 336632 [details]
WIP Patch
Comment 2 Chris Dumez 2018-03-27 18:34:06 PDT
Some remaining failures:
ASSERTION FAILED: isMainThread()
./platform/SchemeRegistry.cpp(118) : URLSchemesMap &WebCore::localURLSchemes()
1   0x25072c88d WTFCrash
2   0x24355e1ca WebCore::localURLSchemes()
3   0x24355e420 WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal(WTF::String const&)
4   0x2434597e9 WebCore::SecurityOrigin::isLocal() const
5   0x24345ace2 WebCore::SecurityOrigin::canAccessStorage(WebCore::SecurityOrigin const*, WebCore::SecurityOrigin::ShouldAllowFromThirdParty) const
6   0x24209e0f2 WebCore::SecurityOrigin::canAccessDatabase(WebCore::SecurityOrigin const&) const


ASSERTION FAILED: isMainThread()
./page/SecurityOrigin.cpp(150) : WebCore::SecurityOrigin::SecurityOrigin(const WebCore::URL &)
1   0x11e2f988d WTFCrash
2   0x1128f8664 WebCore::SecurityOrigin::SecurityOrigin(WebCore::URL const&)
3   0x1128f881d WebCore::SecurityOrigin::SecurityOrigin(WebCore::URL const&)
4   0x1128f8c47 WebCore::SecurityOrigin::create(WebCore::URL const&)
5   0x1128f9616 WebCore::SecurityOrigin::canRequest(WebCore::URL const&) const
6   0x11361e9a6 WebCore::XMLHttpRequest::createRequest()


1   0x1efb2888d WTFCrash
2   0x1e2855664 WebCore::SecurityOrigin::SecurityOrigin(WebCore::URL const&)
3   0x1e285581d WebCore::SecurityOrigin::SecurityOrigin(WebCore::URL const&)
4   0x1e2855c47 WebCore::SecurityOrigin::create(WebCore::URL const&)
5   0x1e17e3f1f WebCore::WebSocket::didReceiveMessage(WTF::String const&)
Comment 3 EWS Watchlist 2018-03-27 19:05:40 PDT
Comment on attachment 336632 [details]
WIP Patch

Attachment 336632 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/7119197

Number of test failures exceeded the failure limit.
Comment 4 EWS Watchlist 2018-03-27 19:05:42 PDT
Created attachment 336633 [details]
Archive of layout-test-results from ews114 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 5 Chris Dumez 2018-03-29 09:37:33 PDT
Created attachment 336778 [details]
WIP patch
Comment 6 EWS Watchlist 2018-03-29 10:30:19 PDT
Comment on attachment 336778 [details]
WIP patch

Attachment 336778 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/7138223

Number of test failures exceeded the failure limit.
Comment 7 EWS Watchlist 2018-03-29 10:30:20 PDT
Created attachment 336783 [details]
Archive of layout-test-results from ews102 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 8 Chris Dumez 2018-03-29 10:40:14 PDT
Some more failures:
Thread 36 Crashed:: WebCore: LocalStorage
0   com.apple.WebCore             	0x0000000111ed9788 0x110ed9000 + 16779144
1   com.apple.WebCore             	0x0000000111e76c2f WebCore::SecurityOrigin::SecurityOrigin(WebCore::URL const&) + 79 (SecurityOrigin.cpp:149)
2   com.apple.WebCore             	0x0000000111e7715b WebCore::SecurityOrigin::create(WebCore::URL const&) + 571 (Ref.h:152)
3   com.apple.WebCore             	0x0000000111e781d7 WebCore::SecurityOrigin::create(WTF::String const&, WTF::String const&, std::optional<unsigned short>) + 375 (utility:753)
4   com.apple.WebCore             	0x0000000111e78875 WebCore::SecurityOriginData::securityOrigin() const + 85 (utility:753)
5   com.apple.WebKitLegacy        	0x0000000114531bcb WebStorageTrackerClient::dispatchDidModifyOrigin(WTF::String const&) + 91 (DumbPtrTraits.h:41)
6   com.apple.WebKitLegacy        	0x000000011449c107 WebKit::StorageTracker::syncSetOriginDetails(WTF::String const&, WTF::String const&) + 311 (Atomics.h:248)
7   com.apple.WebKitLegacy        	0x000000011449a445 WebCore::StorageThread::threadEntryPoint() + 101 (StorageThread.cpp:71)
8   com.apple.JavaScriptCore      	0x000000010f252054 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 228 (memory:2735)
9   com.apple.JavaScriptCore      	0x000000010f2537e9 WTF::wtfThreadEntryPoint(void*) + 9 (ThreadingPthreads.cpp:223)
10  libsystem_pthread.dylib       	0x00007fffcc43293b _pthread_body + 180
11  libsystem_pthread.dylib       	0x00007fffcc432887 _pthread_start + 286
12  libsystem_pthread.dylib       	0x00007fffcc43208d thread_start + 13


Thread 43 Crashed:: WebCore: LocalStorage
0   com.apple.WebCore             	0x00000001073c0788 0x1063c0000 + 16779144
1   com.apple.WebCore             	0x000000010735dc2f WebCore::SecurityOrigin::SecurityOrigin(WebCore::URL const&) + 79 (SecurityOrigin.cpp:149)
2   com.apple.WebCore             	0x000000010735e15b WebCore::SecurityOrigin::create(WebCore::URL const&) + 571 (Ref.h:152)
3   com.apple.WebCore             	0x000000010735f1d7 WebCore::SecurityOrigin::create(WTF::String const&, WTF::String const&, std::optional<unsigned short>) + 375 (utility:753)
4   com.apple.WebCore             	0x000000010735f875 WebCore::SecurityOriginData::securityOrigin() const + 85 (utility:753)
5   com.apple.WebKitLegacy        	0x0000000109a1ebcb WebStorageTrackerClient::dispatchDidModifyOrigin(WTF::String const&) + 91 (DumbPtrTraits.h:41)
6   com.apple.WebKitLegacy        	0x0000000109989107 WebKit::StorageTracker::syncSetOriginDetails(WTF::String const&, WTF::String const&) + 311 (Atomics.h:248)
7   com.apple.WebKitLegacy        	0x0000000109987445 WebCore::StorageThread::threadEntryPoint() + 101 (StorageThread.cpp:71)
8   com.apple.JavaScriptCore      	0x0000000103801054 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 228 (memory:2735)
9   com.apple.JavaScriptCore      	0x00000001038027e9 WTF::wtfThreadEntryPoint(void*) + 9 (ThreadingPthreads.cpp:223)
10  libsystem_pthread.dylib       	0x00007fffcc43293b _pthread_body + 180
11  libsystem_pthread.dylib       	0x00007fffcc432887 _pthread_start + 286
12  libsystem_pthread.dylib       	0x00007fffcc43208d thread_start + 13

Thread 39 Crashed:: WebCore: Worker
0   com.apple.WebCore             	0x00000001072e2788 0x1062e2000 + 16779144
1   com.apple.WebCore             	0x000000010727fc2f WebCore::SecurityOrigin::SecurityOrigin(WebCore::URL const&) + 79 (SecurityOrigin.cpp:149)
2   com.apple.WebCore             	0x000000010728015b WebCore::SecurityOrigin::create(WebCore::URL const&) + 571 (Ref.h:152)
3   com.apple.WebCore             	0x00000001072805ae WebCore::SecurityOrigin::canRequest(WebCore::URL const&) const + 302 (DumbPtrTraits.h:41)
4   com.apple.WebCore             	0x0000000106e91877 WebCore::ScriptExecutionContext::dispatchErrorEvent(WTF::String const&, int, int, WTF::String const&, JSC::Exception*, WebCore::CachedScript*) + 151 (ScriptExecutionContext.cpp:398)
5   com.apple.WebCore             	0x0000000106e91613 WebCore::ScriptExecutionContext::reportException(WTF::String const&, int, int, WTF::String const&, JSC::Exception*, WTF::RefPtr<Inspector::ScriptCallStack, WTF::DumbPtrTraits<Inspector::ScriptCallStack> >&&, WebCore::CachedScript*) + 339 (ScriptExecutionContext.cpp:411)
6   com.apple.WebCore             	0x0000000106be528f WebCore::reportException(JSC::ExecState*, JSC::Exception*, WebCore::CachedScript*, WebCore::ExceptionDetails*) + 591 (JSDOMExceptionHandling.cpp:104)
7   com.apple.WebCore             	0x0000000106bf1902 WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext&, WebCore::Event&) + 1426 (JSEventListener.cpp:185)
8   com.apple.WebCore             	0x0000000106e547e1 WebCore::EventTarget::fireEventListeners(WebCore::Event&, WTF::Vector<WTF::RefPtr<WebCore::RegisteredEventListener, WTF::DumbPtrTraits<WebCore::RegisteredEventListener> >, 1ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>) + 801 (InspectorInstrumentation.h:275)
9   com.apple.WebCore             	0x0000000106e4ee6d WebCore::EventTarget::fireEventListeners(WebCore::Event&) + 541 (EventTarget.cpp:232)
10  com.apple.WebCore             	0x0000000106e5449c WebCore::EventTarget::dispatchEvent(WebCore::Event&) + 108 (EventTarget.cpp:192)
11  com.apple.WebCore             	0x00000001077b5faa WTF::Function<void (WebCore::ScriptExecutionContext&)>::CallableWrapper<WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope(WebCore::MessageWithMessagePorts&&)::$_1>::call(WebCore::ScriptExecutionContext&) + 138 (Ref.h:60)
12  com.apple.WebCore             	0x00000001077b3349 WebCore::WorkerRunLoop::runInMode(WebCore::WorkerGlobalScope*, WebCore::ModePredicate const&, WebCore::WorkerRunLoop::WaitMode) + 441 (Function.h:56)
13  com.apple.WebCore             	0x00000001077b3130 WebCore::WorkerRunLoop::run(WebCore::WorkerGlobalScope*) + 96 (WorkerRunLoop.cpp:138)
14  com.apple.WebCore             	0x00000001077b57c6 WebCore::WorkerThread::workerThread() + 1046 (RefPtr.h:59)
15  com.apple.JavaScriptCore      	0x0000000102f38054 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 228 (memory:2735)
16  com.apple.JavaScriptCore      	0x0000000102f397e9 WTF::wtfThreadEntryPoint(void*) + 9 (ThreadingPthreads.cpp:223)
17  libsystem_pthread.dylib       	0x00007fffcc43293b _pthread_body + 180
18  libsystem_pthread.dylib       	0x00007fffcc432887 _pthread_start + 286
19  libsystem_pthread.dylib       	0x00007fffcc43208d thread_start + 13


Thread 39 Crashed:: WebCore: Worker
0   com.apple.WebCore             	0x0000000104e46788 0x103e46000 + 16779144
1   com.apple.WebCore             	0x0000000104de3c2f WebCore::SecurityOrigin::SecurityOrigin(WebCore::URL const&) + 79 (SecurityOrigin.cpp:149)
2   com.apple.WebCore             	0x0000000104de415b WebCore::SecurityOrigin::create(WebCore::URL const&) + 571 (Ref.h:152)
3   com.apple.WebCore             	0x0000000104de45ae WebCore::SecurityOrigin::canRequest(WebCore::URL const&) const + 302 (DumbPtrTraits.h:41)
4   com.apple.WebCore             	0x00000001049f546b WebCore::ScriptExecutionContext::canIncludeErrorDetails(WebCore::CachedScript*, WTF::String const&) + 75 (ScriptExecutionContext.cpp:398)
5   com.apple.WebCore             	0x00000001047890f3 WebCore::WorkerScriptController::evaluate(WebCore::ScriptSourceCode const&, WTF::NakedPtr<JSC::Exception>&, WTF::String*) + 291 (WorkerScriptController.cpp:154)
6   com.apple.WebCore             	0x0000000104788f6c WebCore::WorkerScriptController::evaluate(WebCore::ScriptSourceCode const&, WTF::String*) + 44 (WorkerScriptController.cpp:129)
7   com.apple.WebCore             	0x00000001053195df WebCore::WorkerThread::workerThread() + 559 (utility:753)
8   com.apple.JavaScriptCore      	0x0000000101291054 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 228 (memory:2735)
9   com.apple.JavaScriptCore      	0x00000001012927e9 WTF::wtfThreadEntryPoint(void*) + 9 (ThreadingPthreads.cpp:223)
10  libsystem_pthread.dylib       	0x00007fffcc43293b _pthread_body + 180
11  libsystem_pthread.dylib       	0x00007fffcc432887 _pthread_start + 286
12  libsystem_pthread.dylib       	0x00007fffcc43208d thread_start + 13


Thread 41 Crashed:: WebCore: Worker
0   com.apple.WebCore             	0x0000000111e1d788 0x110e1d000 + 16779144
1   com.apple.WebCore             	0x0000000111dbac2f WebCore::SecurityOrigin::SecurityOrigin(WebCore::URL const&) + 79 (SecurityOrigin.cpp:149)
2   com.apple.WebCore             	0x0000000111dbb15b WebCore::SecurityOrigin::create(WebCore::URL const&) + 571 (Ref.h:152)
3   com.apple.WebCore             	0x0000000111dbb5ae WebCore::SecurityOrigin::canRequest(WebCore::URL const&) const + 302 (DumbPtrTraits.h:41)
4   com.apple.WebCore             	0x00000001115818d5 WebCore::FetchRequest::initializeOptions(WebCore::FetchRequestInit const&) + 613 (FetchRequest.cpp:61)
5   com.apple.WebCore             	0x0000000111581de0 WebCore::FetchRequest::initializeWith(WTF::String const&, WebCore::FetchRequestInit&&) + 544 (Expected.h:400)
6   com.apple.WebCore             	0x000000011157b799 WebCore::FetchRequest::create(WebCore::ScriptExecutionContext&, WTF::Variant<WTF::RefPtr<WebCore::FetchRequest, WTF::DumbPtrTraits<WebCore::FetchRequest> >, WTF::String>&&, WebCore::FetchRequestInit&&) + 1609 (FetchRequest.cpp:250)
7   com.apple.WebCore             	0x000000011158881f WebCore::WorkerGlobalScopeFetch::fetch(WebCore::WorkerGlobalScope&, WTF::Variant<WTF::RefPtr<WebCore::FetchRequest, WTF::DumbPtrTraits<WebCore::FetchRequest> >, WTF::String>&&, WebCore::FetchRequestInit&&, WTF::Ref<WebCore::DeferredPromise, WTF::DumbPtrTraits<WebCore::DeferredPromise> >&&) + 47 (WorkerGlobalScopeFetch.cpp:45)
8   com.apple.WebCore             	0x00000001114db265 WebCore::jsWorkerGlobalScopePrototypeFunctionFetch(JSC::ExecState*) + 389 (JSWorkerGlobalScope.cpp:2726)
9   ???                           	0x000005f766595fc5 0 + 6560132194245
10  com.apple.JavaScriptCore      	0x000000010c8acfb6 llint_entry + 30548 (LowLevelInterpreter.asm:830)
11  com.apple.JavaScriptCore      	0x000000010c8ad416 llint_entry + 31668 (LowLevelInterpreter.asm:830)
12  com.apple.JavaScriptCore      	0x000000010c8acf37 llint_entry + 30421 (LowLevelInterpreter.asm:830)
13  com.apple.JavaScriptCore      	0x000000010c8acfb6 llint_entry + 30548 (LowLevelInterpreter.asm:830)
14  com.apple.JavaScriptCore      	0x000000010c8a567a vmEntryToJavaScript + 304 (LowLevelInterpreter64.asm:268)
15  com.apple.JavaScriptCore      	0x000000010cfb44f9 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) + 89 (JITCode.cpp:82)
16  com.apple.JavaScriptCore      	0x000000010cf7f4c4 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 532 (Interpreter.cpp:1028)
17  com.apple.JavaScriptCore      	0x000000010d16fa42 JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) + 178 (CallData.cpp:41)
18  com.apple.JavaScriptCore      	0x000000010d233045 JSC::JSJobMicrotask::run(JSC::ExecState*) + 485 (VM.h:824)
19  com.apple.WebCore             	0x0000000111724307 WebCore::JSGlobalObjectCallback::call() + 215 (JSDOMGlobalObjectTask.cpp:68)
20  com.apple.WebCore             	0x00000001122ee349 WebCore::WorkerRunLoop::runInMode(WebCore::WorkerGlobalScope*, WebCore::ModePredicate const&, WebCore::WorkerRunLoop::WaitMode) + 441 (Function.h:56)
21  com.apple.WebCore             	0x00000001122ee130 WebCore::WorkerRunLoop::run(WebCore::WorkerGlobalScope*) + 96 (WorkerRunLoop.cpp:138)
22  com.apple.WebCore             	0x00000001122f07c6 WebCore::WorkerThread::workerThread() + 1046 (RefPtr.h:59)
23  com.apple.JavaScriptCore      	0x000000010c88e054 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) + 228 (memory:2735)
24  com.apple.JavaScriptCore      	0x000000010c88f7e9 WTF::wtfThreadEntryPoint(void*) + 9 (ThreadingPthreads.cpp:223)
25  libsystem_pthread.dylib       	0x00007fffcc43293b _pthread_body + 180
26  libsystem_pthread.dylib       	0x00007fffcc432887 _pthread_start + 286
27  libsystem_pthread.dylib       	0x00007fffcc43208d thread_start + 13
Comment 9 EWS Watchlist 2018-03-29 10:41:28 PDT
Comment on attachment 336778 [details]
WIP patch

Attachment 336778 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/7138254

Number of test failures exceeded the failure limit.
Comment 10 EWS Watchlist 2018-03-29 10:41:30 PDT
Created attachment 336784 [details]
Archive of layout-test-results from ews106 for mac-sierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-sierra-wk2  Platform: Mac OS X 10.12.6
Comment 11 EWS Watchlist 2018-03-29 10:52:27 PDT
Comment on attachment 336778 [details]
WIP patch

Attachment 336778 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/7138237

Number of test failures exceeded the failure limit.
Comment 12 EWS Watchlist 2018-03-29 10:52:28 PDT
Created attachment 336785 [details]
Archive of layout-test-results from ews115 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 13 EWS Watchlist 2018-03-29 11:15:35 PDT
Comment on attachment 336778 [details]
WIP patch

Attachment 336778 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/7138302

Number of test failures exceeded the failure limit.
Comment 14 EWS Watchlist 2018-03-29 11:15:37 PDT
Created attachment 336786 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 15 EWS Watchlist 2018-03-29 11:32:53 PDT
Comment on attachment 336778 [details]
WIP patch

Attachment 336778 [details] did not pass win-ews (win):
Output: http://webkit-queues.webkit.org/results/7138486

New failing tests:
http/tests/workers/worker-importScripts.html
http/tests/websocket/tests/hybi/workers/receive-arraybuffer.html
http/tests/workers/worker-importScriptsOnError.html
http/tests/websocket/tests/hybi/workers/receive-blob.html
Comment 16 EWS Watchlist 2018-03-29 11:33:03 PDT
Created attachment 336789 [details]
Archive of layout-test-results from ews202 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews202  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 17 Chris Dumez 2018-04-05 12:03:27 PDT
Made SecurityOrigin thread safe instead.