Bug 191919 - ASSERTION FAILED: dataRequest.requestedLength >= (dataRequest.currentOffset - dataRequest.requestedOffset) in WebCoreAVFResourceLoader::fulfillRequestWithResource() on apple.com/iphone-xr
Summary: ASSERTION FAILED: dataRequest.requestedLength >= (dataRequest.currentOffset -...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Local Build
Hardware: iPhone / iPad iOS 12
: P2 Normal
Assignee: Nobody
URL: https://www.apple.com/iphone-xr/
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-22 21:10 PST by Daniel Bates
Modified: 2018-11-25 15:23 PST (History)
4 users (show)

See Also:


Attachments
[Web Archive] apple.com/iphone-xr captured on Mac Safari with iOS 11.3 iPad UA (4.60 MB, application/x-webarchive)
2018-11-22 21:13 PST, Daniel Bates
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2018-11-22 21:10:35 PST
Seen with a debug build of WebKit r238256 using Simulator.app to simulate an iPad.

Visit <https://www.apple.com/iphone-xr/>. Then the WebContent process will crash because ASSERT(dataRequest.requestedLength >= (dataRequest.currentOffset - dataRequest.requestedOffset)) fails in WebCoreAVFResourceLoader::fulfillRequestWithResource() [1]:

#0  0x0000000476327d90 in ::WTFCrash() at /Volumes/.../Source/WTF/wtf/Assertions.cpp:255
#1  0x000000047aa197bb in WTFCrashWithInfo(int, char const*, char const*, int) at /Volumes/.../WebKitBuild/Debug-iphonesimulator/usr/local/include/wtf/Assertions.h:550
#2  0x000000047e69bcbc in WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource(WebCore::CachedResource&) at /Volumes/.../Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:190
#3  0x000000047e69c5c7 in WebCore::WebCoreAVFResourceLoader::notifyFinished(WebCore::CachedResource&) at /Volumes/.../Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:166
#4  0x000000047d54194f in WebCore::CachedResource::checkNotify() at /Volumes/.../Source/WebCore/loader/cache/CachedResource.cpp:349
#5  0x000000047d53cd41 in WebCore::CachedResource::finishLoading(WebCore::SharedBuffer*) at /Volumes/.../Source/WebCore/loader/cache/CachedResource.cpp:365
#6  0x000000047d53c8c9 in WebCore::CachedRawResource::finishLoading(WebCore::SharedBuffer*) at /Volumes/.../Source/WebCore/loader/cache/CachedRawResource.cpp:120
#7  0x000000047d4bc9d4 in WebCore::SubresourceLoader::didFinishLoading(WebCore::NetworkLoadMetrics const&) at /Volumes/.../Source/WebCore/loader/SubresourceLoader.cpp:634
#8  0x0000000468d04d16 in WebKit::WebResourceLoader::didFinishResourceLoad(WebCore::NetworkLoadMetrics const&) at /Volumes/.../Source/WebKit/WebProcess/Network/WebResourceLoader.cpp:162
#9  0x000000046906abca in void IPC::callMemberFunctionImpl<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&), std::__1::tuple<WebCore::NetworkLoadMetrics>, 0ul>(WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&), std::__1::tuple<WebCore::NetworkLoadMetrics>&&, std::__1::integer_sequence<unsigned long, 0ul>) at /Volumes/.../Source/WebKit/Platform/IPC/HandleMessage.h:41
#10 0x000000046906a980 in void IPC::callMemberFunction<WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&), std::__1::tuple<WebCore::NetworkLoadMetrics>, std::__1::integer_sequence<unsigned long, 0ul> >(std::__1::tuple<WebCore::NetworkLoadMetrics>&&, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&)) at /Volumes/.../Source/WebKit/Platform/IPC/HandleMessage.h:47
#11 0x00000004690695f0 in void IPC::handleMessage<Messages::WebResourceLoader::DidFinishResourceLoad, WebKit::WebResourceLoader, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&)>(IPC::Decoder&, WebKit::WebResourceLoader*, void (WebKit::WebResourceLoader::*)(WebCore::NetworkLoadMetrics const&)) at /Volumes/.../Source/WebKit/Platform/IPC/HandleMessage.h:133
#12 0x0000000469068dbc in WebKit::WebResourceLoader::didReceiveWebResourceLoaderMessage(IPC::Connection&, IPC::Decoder&) at /Volumes/.../WebKitBuild/Debug-iphonesimulator/DerivedSources/WebKit2/WebResourceLoaderMessageReceiver.cpp:66
#13 0x0000000468cfa3c6 in WebKit::NetworkProcessConnection::didReceiveMessage(IPC::Connection&, IPC::Decoder&) at /Volumes/.../Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp:78
#14 0x00000004680cfce9 in IPC::Connection::dispatchMessage(IPC::Decoder&) at /Volumes/.../Source/WebKit/Platform/IPC/Connection.cpp:978
#15 0x00000004680c83d2 in IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) at /Volumes/.../Source/WebKit/Platform/IPC/Connection.cpp:1005
#16 0x00000004680d04a3 in IPC::Connection::dispatchOneIncomingMessage() at /Volumes/.../Source/WebKit/Platform/IPC/Connection.cpp:1074
#17 0x00000004680f198b in IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14::operator()() at /Volumes/.../Source/WebKit/Platform/IPC/Connection.cpp:956
#18 0x00000004680f18a9 in WTF::Function<void ()>::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14>::call() at /Volumes/.../WebKitBuild/Debug-iphonesimulator/usr/local/include/wtf/Function.h:101
#19 0x0000000476351efa in WTF::Function<void ()>::operator()() const at /Volumes/.../WebKitBuild/Debug-iphonesimulator/usr/local/include/wtf/Function.h:56
#20 0x00000004763b3125 in WTF::RunLoop::performWork() at /Volumes/.../Source/WTF/wtf/RunLoop.cpp:123
#21 0x00000004763b43fe in WTF::RunLoop::performWork(void*) at /Volumes/.../Source/WTF/wtf/cf/RunLoopCF.cpp:38
#22 0x000000046ef54841 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
#23 0x000000046ef5407f in __CFRunLoopDoSources0 ()
#24 0x000000046ef4e6df in __CFRunLoopRun ()
#25 0x000000046ef4de72 in CFRunLoopRunSpecific ()
#26 0x0000000104e34e5a in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] ()
#27 0x0000000104e3507a in -[NSRunLoop(NSRunLoop) run] ()
#28 0x0000000470bf4e7f in _xpc_objc_main ()
#29 0x0000000470bf735a in xpc_main ()
#30 0x0000000104b02bb7 in WebKit::XPCServiceMain(int, char const**) at /Volumes/.../Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:157
#31 0x0000000104b02f02 in main at /Volumes/.../Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:165
#32 0x0000000470928b0d in start ()
#33 0x0000000470928b0d in start ()

[1] <https://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm?rev=238256#L190>
Comment 1 Daniel Bates 2018-11-22 21:10:52 PST
(lldb) p resource.url()
(const WebCore::URL) $0 = { blob:https://www.apple.com/0015d2ee-4aaf-443e-b034-d2e71a59bdf4 }
(lldb) p dataRequest.requestedLength
(NSInteger) $1 = 16384
(lldb) p dataRequest.currentOffset
(long long) $2 = 612501
(lldb) p dataRequest.requestedOffset
(long long) $3 = 16384
(lldb) p contentRange
(const WebCore::ParsedContentRange) $4 = {
  m_firstBytePosition = 0
  m_lastBytePosition = 0
  m_instanceLength = 9223372036854775807
  m_isValid = false
}
Comment 2 Radar WebKit Bug Importer 2018-11-22 21:11:28 PST
<rdar://problem/46217461>
Comment 3 Radar WebKit Bug Importer 2018-11-22 21:11:30 PST
<rdar://problem/46217460>
Comment 4 Daniel Bates 2018-11-22 21:13:21 PST
Created attachment 355496 [details]
[Web Archive] apple.com/iphone-xr captured on Mac Safari with iOS 11.3 iPad UA
Comment 5 Daniel Bates 2018-11-22 21:15:57 PST
Not sure if this is meaningful to know:

(lldb) p data->size()
(size_t) $7 = 612501