Bug 195506 - Assert in WebPageProxy::suspendCurrentPageIfPossible()
Summary: Assert in WebPageProxy::suspendCurrentPageIfPossible()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-08 18:19 PST by Simon Fraser (smfr)
Modified: 2019-03-11 16:31 PDT (History)
7 users (show)

See Also:


Attachments
Patch (6.02 KB, patch)
2019-03-11 15:35 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2019-03-08 18:19:43 PST
I keep hitting this when typing in the URL field in MobileSafari in the simulator:

SHOULD NEVER BE REACHED
/Volumes/Data/Development/system/webkit/OpenSource/Source/WebKit/UIProcess/WebPageProxy.cpp(792) : bool WebKit::WebPageProxy::suspendCurrentPageIfPossible(API::Navigation &, Optional<uint64_t>, WebKit::ProcessSwapRequestedByClient)
1   0x10a61dbf9 WTFCrash
2   0x10e99d76b WTFCrashWithInfo(int, char const*, char const*, int)
3   0x10f15dc89 WebKit::WebPageProxy::suspendCurrentPageIfPossible(API::Navigation&, WTF::Optional<unsigned long long>, WebKit::ProcessSwapRequestedByClient)
4   0x10f16ef87 WebKit::WebPageProxy::commitProvisionalPage(unsigned long long, unsigned long long, WTF::String const&, bool, unsigned int, WebCore::CertificateInfo const&, bool, WTF::Optional<WebCore::HasInsecureContent>, WebKit::UserData const&)
5   0x10f04847a WebKit::ProvisionalPageProxy::didCommitLoadForFrame(unsigned long long, unsigned long long, WTF::String const&, bool, unsigned int, WebCore::CertificateInfo const&, bool, WTF::Optional<WebCore::HasInsecureContent>, WebKit::UserData const&)
6   0x10f05f440 void IPC::callMemberFunctionImpl<WebKit::ProvisionalPageProxy, void (WebKit::ProvisionalPageProxy::*)(unsigned long long, unsigned long long, WTF::String const&, bool, unsigned int, WebCore::CertificateInfo const&, bool, WTF::Optional<WebCore::HasInsecureContent>, WebKit::UserData const&), std::__1::tuple<unsigned long long, unsigned long long, WTF::String, bool, unsigned int, WebCore::CertificateInfo, bool, WTF::Optional<WebCore::HasInsecureContent>, WebKit::UserData>, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul, 8ul>(WebKit::ProvisionalPageProxy*, void (WebKit::ProvisionalPageProxy::*)(unsigned long long, unsigned long long, WTF::String const&, bool, unsigned int, WebCore::CertificateInfo const&, bool, WTF::Optional<WebCore::HasInsecureContent>, WebKit::UserData const&), std::__1::tuple<unsigned long long, unsigned long long, WTF::String, bool, unsigned int, WebCore::CertificateInfo, bool, WTF::Optional<WebCore::HasInsecureContent>, WebKit::UserData>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul, 8ul>)
7   0x10f05dd50 void IPC::callMemberFunction<WebKit::ProvisionalPageProxy, void (WebKit::ProvisionalPageProxy::*)(unsigned long long, unsigned long long, WTF::String const&, bool, unsigned int, WebCore::CertificateInfo const&, bool, WTF::Optional<WebCore::HasInsecureContent>, WebKit::UserData const&), std::__1::tuple<unsigned long long, unsigned long long, WTF::String, bool, unsigned int, WebCore::CertificateInfo, bool, WTF::Optional<WebCore::HasInsecureContent>, WebKit::UserData>, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul, 8ul> >(std::__1::tuple<unsigned long long, unsigned long long, WTF::String, bool, unsigned int, WebCore::CertificateInfo, bool, WTF::Optional<WebCore::HasInsecureContent>, WebKit::UserData>&&, WebKit::ProvisionalPageProxy*, void (WebKit::ProvisionalPageProxy::*)(unsigned long long, unsigned long long, WTF::String const&, bool, unsigned int, WebCore::CertificateInfo const&, bool, WTF::Optional<WebCore::HasInsecureContent>, WebKit::UserData const&))
8   0x10f04ae2e void IPC::handleMessage<Messages::WebPageProxy::DidCommitLoadForFrame, WebKit::ProvisionalPageProxy, void (WebKit::ProvisionalPageProxy::*)(unsigned long long, unsigned long long, WTF::String const&, bool, unsigned int, WebCore::CertificateInfo const&, bool, WTF::Optional<WebCore::HasInsecureContent>, WebKit::UserData const&)>(IPC::Decoder&, WebKit::ProvisionalPageProxy*, void (WebKit::ProvisionalPageProxy::*)(unsigned long long, unsigned long long, WTF::String const&, bool, unsigned int, WebCore::CertificateInfo const&, bool, WTF::Optional<WebCore::HasInsecureContent>, WebKit::UserData const&))
9   0x10f049bdd WebKit::ProvisionalPageProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
10  0x10ea30219 IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&)
11  0x10f01f944 WebKit::AuxiliaryProcessProxy::dispatchMessage(IPC::Connection&, IPC::Decoder&)
12  0x10f241b0a WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
13  0x10e9e08a9 IPC::Connection::dispatchMessage(IPC::Decoder&)
14  0x10e9d8f82 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)
15  0x10e9df83a IPC::Connection::dispatchIncomingMessages()
16  0x10ea02335 IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14::operator()()
17  0x10ea02269 WTF::Function<void ()>::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14>::call()
18  0x10a6486fa WTF::Function<void ()>::operator()() const
19  0x10a6aa083 WTF::RunLoop::performWork()
20  0x10a6aaa0e WTF::RunLoop::performWork(void*)
21  0x105285bd1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
22  0x105285453 __CFRunLoopDoSources0
23  0x10527fb0f __CFRunLoopRun
24  0x10527f2f2 CFRunLoopRunSpecific
25  0x11a7362fe GSEventRunModal
26  0x11765fba2 UIApplicationMain
27  0x10313c80f main
28  0x10a0b6541 start
(lldb)
Comment 1 Radar WebKit Bug Importer 2019-03-08 18:20:18 PST
<rdar://problem/48733477>
Comment 2 Alex Christensen 2019-03-11 14:07:33 PDT
I've seen this, too.  Should we just remove the ASSERT_NOT_REACHED in if (fromItem->url() != pageLoadState().url()) ?
Comment 3 Chris Dumez 2019-03-11 14:12:06 PDT
(In reply to Alex Christensen from comment #2)
> I've seen this, too.  Should we just remove the ASSERT_NOT_REACHED in if
> (fromItem->url() != pageLoadState().url()) ?

This is a real bug that needs to be investigated. This should never happen.
Comment 4 Chris Dumez 2019-03-11 14:13:21 PDT
(In reply to Chris Dumez from comment #3)
> (In reply to Alex Christensen from comment #2)
> > I've seen this, too.  Should we just remove the ASSERT_NOT_REACHED in if
> > (fromItem->url() != pageLoadState().url()) ?
> 
> This is a real bug that needs to be investigated. This should never happen.

I will take a look at this today.
Comment 5 Chris Dumez 2019-03-11 14:56:01 PDT
Ok, I can reproduce on device:
fromItem url https://m.youtube.com/watch?v=mcZdTvOqmvI, committedURL:
fromItem url https://www.google.com/?client=safari, committedURL:

Likely caused by the top-hit preloading logic in MobileSafari. We do not have a committed URL, even though we have a fromItem. This is likely because MobileSafari swapped view and restored the back forward list on the new view.
Comment 6 Chris Dumez 2019-03-11 15:35:38 PDT
Created attachment 364302 [details]
Patch
Comment 7 WebKit Commit Bot 2019-03-11 16:31:29 PDT
Comment on attachment 364302 [details]
Patch

Clearing flags on attachment: 364302

Committed r242755: <https://trac.webkit.org/changeset/242755>
Comment 8 WebKit Commit Bot 2019-03-11 16:31:31 PDT
All reviewed patches have been landed.  Closing bug.