Summary: | ASSERT(m_resourceTiming.networkLoadMetrics().isComplete() || m_resourceTiming.resourceLoadTiming().endTime()) is failing in PerformanceResourceTiming::responseEnd | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Fujii Hironori <Hironori.Fujii> | ||||||
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED DUPLICATE | ||||||||
Severity: | Normal | CC: | achristensen, cdumez, ews-watchlist, japhet | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Fujii Hironori
2021-08-29 13:32:33 PDT
This assertion failure is caused by the response of https://twitter.com/. https://twitter.com/ is retrieved by ServiceWorker fetch. ServiceWorkerFetchTask::didFinish sends a WebResourceLoader::DidFinishResourceLoad message with empty NetworkLoadMetrics. Created attachment 436751 [details]
WIP patch
This assertion failure can be reproduced also by Mac Debug MiniBrowser. 1. Start Mac Debug MiniBrowser 2. Go to https://twitter.com/ 3. Reload 2-4 times. 4. The assertion fails Callstack: Thread 1 Queue : com.apple.main-thread (serial) #0 0x00000003ac92dcfe in ::WTFCrash() at /Volumes/Data/webkit/gb/Source/WTF/wtf/Assertions.cpp:321 #1 0x000000038af941fb in WTFCrashWithInfo(int, char const*, char const*, int) at /Volumes/Data/webkit/gb/WebKitBuild/Debug/usr/local/include/wtf/Assertions.h:703 #2 0x000000038f131a4e in WebCore::PerformanceResourceTiming::responseEnd() const at /Volumes/Data/webkit/gb/Source/WebCore/page/PerformanceResourceTiming.cpp:225 #3 0x000000038c2568af in WebCore::jsPerformanceResourceTiming_responseEndGetter(JSC::JSGlobalObject&, WebCore::JSPerformanceResourceTiming&) at /Volumes/Data/webkit/gb/WebKitBuild/Debug/DerivedSources/WebCore/JSPerformanceResourceTiming.cpp:412 #4 0x000000038c1b94bf in long long WebCore::IDLAttribute<WebCore::JSPerformanceResourceTiming>::get<&(WebCore::jsPerformanceResourceTiming_responseEndGetter(JSC::JSGlobalObject&, WebCore::JSPerformanceResourceTiming&)), (WebCore::CastedThisErrorBehavior)3>(JSC::JSGlobalObject&, long long, JSC::PropertyName) at /Volumes/Data/webkit/gb/Source/WebCore/bindings/js/JSDOMAttribute.h:88 #5 0x000000038c1b936d in WebCore::jsPerformanceResourceTiming_responseEnd(JSC::JSGlobalObject*, long long, JSC::PropertyName) at /Volumes/Data/webkit/gb/WebKitBuild/Debug/DerivedSources/WebCore/JSPerformanceResourceTiming.cpp:417 #6 0x00000003ae794e1e in JSC::PropertySlot::customGetter(JSC::VM&, JSC::PropertyName) const at /Volumes/Data/webkit/gb/Source/JavaScriptCore/runtime/PropertySlot.cpp:47 #7 0x00000003acf97526 in JSC::PropertySlot::getValue(JSC::JSGlobalObject*, JSC::PropertyName) const at /Volumes/Data/webkit/gb/Source/JavaScriptCore/runtime/PropertySlot.h:408 #8 0x00000003ae34c1c5 in JSC::JSValue::get(JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&) const at /Volumes/Data/webkit/gb/Source/JavaScriptCore/runtime/JSCJSValueInlines.h:950 #9 0x00000003ae14185c in JSC::LLInt::performLLIntGetByID(JSC::Instruction const*, JSC::CodeBlock*, JSC::JSGlobalObject*, JSC::JSValue, JSC::Identifier const&, JSC::GetByIdModeMetadata&) at /Volumes/Data/webkit/gb/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:770 #10 0x00000003ae1415ea in ::llint_slow_path_get_by_id(JSC::CallFrame *, const JSC::Instruction *) at /Volumes/Data/webkit/gb/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:844 #11 0x00000003acfbe056 in llint_entry at /Volumes/Data/webkit/gb/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:97 #12 0x00000003acfd6339 in llint_entry at /Volumes/Data/webkit/gb/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1097 #13 0x00000003acfd6339 in llint_entry at /Volumes/Data/webkit/gb/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1097 #14 0x00000003acfd7221 in llint_entry at /Volumes/Data/webkit/gb/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1097 #15 0x0000225f77161e36 in 0x225f77161e36 () #16 0x00000003acfb3290 in vmEntryToJavaScript at /Volumes/Data/webkit/gb/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm:316 #17 0x00000003adf9b5cb in JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) at /Volumes/Data/webkit/gb/Source/JavaScriptCore/jit/JITCodeInlines.h:42 #18 0x00000003adf9bd2c in JSC::Interpreter::executeCall(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) at /Volumes/Data/webkit/gb/Source/JavaScriptCore/interpreter/Interpreter.cpp:903 #19 0x00000003ae39b3ad in JSC::call(JSC::JSGlobalObject*, JSC::JSValue, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) at /Volumes/Data/webkit/gb/Source/JavaScriptCore/runtime/CallData.cpp:57 #20 0x00000003ae39b683 in JSC::profiledCall(JSC::JSGlobalObject*, JSC::ProfilingReason, JSC::JSValue, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) at /Volumes/Data/webkit/gb/Source/JavaScriptCore/runtime/CallData.cpp:78 #21 0x00000003ae631121 in JSC::JSMicrotask::run(JSC::JSGlobalObject*) at /Volumes/Data/webkit/gb/Source/JavaScriptCore/runtime/JSMicrotask.cpp:93 #22 0x000000038d9d6dbe in WebCore::JSExecState::runTask(JSC::JSGlobalObject*, JSC::Microtask&) at /Volumes/Data/webkit/gb/Source/WebCore/bindings/js/JSExecState.h:91 #23 0x000000038d9ddd6b in WebCore::JSMicrotaskCallback::call() at /Volumes/Data/webkit/gb/Source/WebCore/bindings/js/JSMicrotaskCallback.h:47 #24 0x000000038d9ddba4 in WebCore::JSDOMWindowBase::queueMicrotaskToEventLoop(JSC::JSGlobalObject&, WTF::Ref<JSC::Microtask, WTF::RawPtrTraits<JSC::Microtask> >&&)::$_40::operator()() at /Volumes/Data/webkit/gb/Source/WebCore/bindings/js/JSDOMWindowBase.cpp:232 #25 0x000000038d9dda8e in WTF::Detail::CallableWrapper<WebCore::JSDOMWindowBase::queueMicrotaskToEventLoop(JSC::JSGlobalObject&, WTF::Ref<JSC::Microtask, WTF::RawPtrTraits<JSC::Microtask> >&&)::$_40, void>::call() at /Volumes/Data/webkit/gb/WebKitBuild/Debug/usr/local/include/wtf/Function.h:53 #26 0x000000038afad6e2 in WTF::Function<void ()>::operator()() const at /Volumes/Data/webkit/gb/WebKitBuild/Debug/usr/local/include/wtf/Function.h:82 #27 0x000000038e18ffee in WebCore::EventLoopFunctionDispatchTask::execute() at /Volumes/Data/webkit/gb/Source/WebCore/dom/EventLoop.cpp:159 #28 0x000000038e1d94eb in WebCore::MicrotaskQueue::performMicrotaskCheckpoint() at /Volumes/Data/webkit/gb/Source/WebCore/dom/Microtasks.cpp:64 #29 0x000000038e1849a1 in WebCore::EventLoop::performMicrotaskCheckpoint() at /Volumes/Data/webkit/gb/Source/WebCore/dom/EventLoop.cpp:51 #30 0x000000038e185f5d in WebCore::EventLoopTaskGroup::performMicrotaskCheckpoint() at /Volumes/Data/webkit/gb/Source/WebCore/dom/EventLoop.cpp:180 #31 0x000000038d97edfe in WebCore::JSExecState::didLeaveScriptContext(JSC::JSGlobalObject*) at /Volumes/Data/webkit/gb/Source/WebCore/bindings/js/JSExecState.cpp:42 #32 0x000000038d98b112 in WebCore::JSExecState::~JSExecState() at /Volumes/Data/webkit/gb/Source/WebCore/bindings/js/JSExecState.h:143 #33 0x000000038d98af35 in WebCore::JSExecState::~JSExecState() at /Volumes/Data/webkit/gb/Source/WebCore/bindings/js/JSExecState.h:132 #34 0x000000038da2b609 in WebCore::JSExecState::profiledEvaluate(JSC::JSGlobalObject*, JSC::ProfilingReason, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtr<JSC::Exception>&) at /Volumes/Data/webkit/gb/Source/WebCore/bindings/js/JSExecState.h:80 #35 0x000000038da2b1de in WebCore::ScriptController::evaluateInWorld(WebCore::ScriptSourceCode const&, WebCore::DOMWrapperWorld&) at /Volumes/Data/webkit/gb/Source/WebCore/bindings/js/ScriptController.cpp:148 #36 0x000000038da2b009 in WebCore::ScriptController::evaluateInWorldIgnoringException(WebCore::ScriptSourceCode const&, WebCore::DOMWrapperWorld&) at /Volumes/Data/webkit/gb/Source/WebCore/bindings/js/ScriptController.cpp:121 #37 0x000000038da2b8e5 in WebCore::ScriptController::evaluateIgnoringException(WebCore::ScriptSourceCode const&) at /Volumes/Data/webkit/gb/Source/WebCore/bindings/js/ScriptController.cpp:167 #38 0x000000038e28e4fa in WebCore::ScriptElement::executeClassicScript(WebCore::ScriptSourceCode const&) at /Volumes/Data/webkit/gb/Source/WebCore/dom/ScriptElement.cpp:407 #39 0x000000038e1c5e90 in WebCore::LoadableClassicScript::execute(WebCore::ScriptElement&) at /Volumes/Data/webkit/gb/Source/WebCore/dom/LoadableClassicScript.cpp:124 #40 0x000000038e28f1ea in WebCore::ScriptElement::executeScriptAndDispatchEvent(WebCore::LoadableScript&) at /Volumes/Data/webkit/gb/Source/WebCore/dom/ScriptElement.cpp:449 #41 0x000000038e28f3bd in WebCore::ScriptElement::executePendingScript(WebCore::PendingScript&) at /Volumes/Data/webkit/gb/Source/WebCore/dom/ScriptElement.cpp:462 #42 0x000000038e294b6e in WebCore::ScriptRunner::timerFired() at /Volumes/Data/webkit/gb/Source/WebCore/dom/ScriptRunner.cpp:138 #43 0x000000038e2b2de7 in decltype(*(std::__1::forward<WebCore::ScriptRunner*&>(fp0)).*fp()) std::__1::__invoke<void (WebCore::ScriptRunner::*&)(), WebCore::ScriptRunner*&, void>(void (WebCore::ScriptRunner::*&)(), WebCore::ScriptRunner*&) at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/type_traits:3688 #44 0x000000038e2b2d60 in std::__1::__bind_return<void (WebCore::ScriptRunner::*)(), std::__1::tuple<WebCore::ScriptRunner*>, std::__1::tuple<>, __is_valid_bind_return<void (WebCore::ScriptRunner::*)(), std::__1::tuple<WebCore::ScriptRunner*>, std::__1::tuple<> >::value>::type std::__1::__apply_functor<void (WebCore::ScriptRunner::*)(), std::__1::tuple<WebCore::ScriptRunner*>, 0ul, std::__1::tuple<> >(void (WebCore::ScriptRunner::*&)(), std::__1::tuple<WebCore::ScriptRunner*>&, std::__1::__tuple_indices<0ul>, std::__1::tuple<>&&) at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/functional:2852 #45 0x000000038e2b2d19 in std::__1::__bind_return<void (WebCore::ScriptRunner::*)(), std::__1::tuple<WebCore::ScriptRunner*>, std::__1::tuple<>, __is_valid_bind_return<void (WebCore::ScriptRunner::*)(), std::__1::tuple<WebCore::ScriptRunner*>, std::__1::tuple<> >::value>::type std::__1::__bind<void (WebCore::ScriptRunner::*&)(), WebCore::ScriptRunner*>::operator()<>() at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/functional:2885 #46 0x000000038e2b2c9e in WTF::Detail::CallableWrapper<std::__1::__bind<void (WebCore::ScriptRunner::*&)(), WebCore::ScriptRunner*>, void>::call() at /Volumes/Data/webkit/gb/WebKitBuild/Debug/usr/local/include/wtf/Function.h:53 #47 0x000000038afad6e2 in WTF::Function<void ()>::operator()() const at /Volumes/Data/webkit/gb/WebKitBuild/Debug/usr/local/include/wtf/Function.h:82 #48 0x000000038aff5cce in WebCore::Timer::fired() at /Volumes/Data/webkit/gb/Source/WebCore/platform/Timer.h:135 #49 0x000000038f2da634 in WebCore::ThreadTimers::sharedTimerFiredInternal() at /Volumes/Data/webkit/gb/Source/WebCore/platform/ThreadTimers.cpp:127 #50 0x000000038f2e5311 in WebCore::ThreadTimers::setSharedTimer(WebCore::SharedTimer*)::$_0::operator()() const at /Volumes/Data/webkit/gb/Source/WebCore/platform/ThreadTimers.cpp:67 #51 0x000000038f2e529e in WTF::Detail::CallableWrapper<WebCore::ThreadTimers::setSharedTimer(WebCore::SharedTimer*)::$_0, void>::call() at /Volumes/Data/webkit/gb/WebKitBuild/Debug/usr/local/include/wtf/Function.h:53 #52 0x000000038afad6e2 in WTF::Function<void ()>::operator()() const at /Volumes/Data/webkit/gb/WebKitBuild/Debug/usr/local/include/wtf/Function.h:82 #53 0x000000038f28912b in WebCore::MainThreadSharedTimer::fired() at /Volumes/Data/webkit/gb/Source/WebCore/platform/MainThreadSharedTimer.cpp:83 #54 0x000000038f371296 in WebCore::timerFired(__CFRunLoopTimer*, void*) at /Volumes/Data/webkit/gb/Source/WebCore/platform/cf/MainThreadSharedTimerCF.cpp:85 #55 0x00007fff204fe279 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ () #56 0x00007fff204fdd6d in __CFRunLoopDoTimer () #57 0x00007fff204fd8ca in __CFRunLoopDoTimers () #58 0x00007fff204e44a3 in __CFRunLoopRun () #59 0x00007fff204e361c in CFRunLoopRunSpecific () #60 0x00007fff21273607 in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] () #61 0x00007fff213014d1 in -[NSRunLoop(NSRunLoop) run] () #62 0x00007fff2013b38d in _xpc_objc_main () #63 0x00007fff2013acd3 in xpc_main () #64 0x0000000378f12055 in WebKit::XPCServiceMain(int, char const**) at /Volumes/Data/webkit/gb/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:243 #65 0x000000037a74263b in WKXPCServiceMain at /Volumes/Data/webkit/gb/Source/WebKit/Shared/API/Cocoa/WKMain.mm:33 #66 0x000000010f98cea2 in main at /Volumes/Data/webkit/gb/Source/WebKit/Shared/EntryPointUtilities/Cocoa/AuxiliaryProcessMain.cpp:30 #67 0x00007fff20407f3d in start () #68 0x00007fff20407f3d in start () I think a better fix would be to mark the end time. Is the start time also empty? m_resourceTiming.m_resourceLoadTiming.m_startTime isn't empty. Created attachment 436987 [details]
WIP patch
The end time is marked because DocumentLoader::notifyFinished calls addNavigationTiming before DocumentLoader::finishedLoading does markEndTime.
Does https://bugs.webkit.org/show_bug.cgi?id=229751 fix this too? Yes, it does. Thank you. *** This bug has been marked as a duplicate of bug 229751 *** |