| Summary: | [ Mac Debug ] TestWebKitAPI.ProcessSwap.ReuseSuspendedProcessForRegularNavigationRetainBundlePage is a flaky crash | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Shawn Roberts <sroberts> | ||||||||
| Component: | WebKit API | Assignee: | Chris Dumez <cdumez> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | achristensen, beidson, cdumez, commit-queue, darin, ggaren, webkit-bot-watchers-bugzilla, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Mac | ||||||||||
| OS: | macOS 10.14 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Shawn Roberts
2019-04-03 11:37:21 PDT
ASSERTION FAILED: m_state == State::Provisional m_state is State::Finished. I'm also hitting the ASSERT_NOT_REACHED() under if (fromItem->url() != pageLoadState().url()). I bet we need to do something like https://trac.webkit.org/changeset/243767/webkit but for didFailProvisionalLoadForFrame That didn't fix it. FrameLoadState::didFinishLoad is being called before FrameLoadState::didFailProvisionalLoad... It looks like didStartProvisionalLoad is not being called before didFailProvisionalLoadForFrame on a frame that has already completed a load. It's hard to debug though because even adding logs makes it not reproduce. Created attachment 367341 [details]
Patch
Comment on attachment 367341 [details]
Patch
I have a follow-up plan to see if we can avoid having to ignore leftover IPC explicitly. This will likely require some significant refactoring though so I think we should land this first.
Comment on attachment 367341 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367341&action=review > Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:217 > + // If the previous provisional load used an existing process, we may receive leftover IPC for a previous navigation, which we need to ignore. > + if (!m_mainFrame || m_mainFrame->frameID() != frameID) > + return; See below. Could have an overload that takes just a frame ID and not a navigation ID. > Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:226 > + // If the previous provisional load used an existing process, we may receive leftover IPC for a previous navigation, which we need to ignore. > + if (navigationID != m_navigationID || !m_mainFrame || m_mainFrame->frameID() != frameID) > return; With this idiom repeated so many times, I suggest adding a named member function that takes navigationID and frameID as arguments. A bonus is that the function’s name can help document and so we won’t have such repetitive comments either. > Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:347 > + if (!isMainFrame || (m_mainFrame && m_mainFrame->frameID() != frameID) || navigationID != m_navigationID) { I think we can even refactor this one to use the new helper. Comment on attachment 367341 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367341&action=review >> Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:226 >> return; > > With this idiom repeated so many times, I suggest adding a named member function that takes navigationID and frameID as arguments. A bonus is that the function’s name can help document and so we won’t have such repetitive comments either. Seems fine to land without my suggested refinement, but I think it’s better for the long term. Created attachment 367398 [details]
Patch
Created attachment 367399 [details]
Patch
Comment on attachment 367399 [details] Patch Clearing flags on attachment: 367399 Committed r244243: <https://trac.webkit.org/changeset/244243> All reviewed patches have been landed. Closing bug. |