With process isolation for error pages, reloading an error page can create a new navigation entry |
|||||
Issue descriptionAfter crrev.com/c/762520 landed, an issue showed up where an extra history entry is added when navigating through an error page. This was first seen with committed interstitials on, after proceeding through an interstitial, if you try to navigate back, Chrome tries to navigate back to the interstitial (which, since it is now in the whitelist, just results in staying in the current page). This was first noticed in crrev.com/c/1041126 as one of the tests that that CL enables for committed interstitials now fails. It seems the reason that this doesn't show up when reloading an error page (without proceeding through it), is because NavigationControllerImpl::ClassifyNavigation returns NAVIGATION_TYPE_EXISTING_PAGE for regular reloads since pending_entry_ gets cleared before ClassifyNavigation gets called, while for proceeding through an error page, the pending_entry still exists, and the call returns NAVIGATION_TYPE_NEW_PAGE. While debugging we tried forcing ClassifyNavigation to return existing page, and that got rid of the issue (but we are not entirely sure if this has other side effects). cc:+estark, who noticed this also happens for network errors, if the network issue is fixed while the error page is showing and reload is then clicked.
,
May 7 2018
,
May 8 2018
Thanks for the bug report! I confirmed the repro steps in comment 2 do work for me. One small note is that one can avoid making changes to /etc/hosts and can just use an extension like Offline Mode (https://chrome.google.com/webstore/detail/offline-mode/jmfdoanbhalcgkfhpedjnljaoadhlmeg) to cause an error page to be rendered (while in offline mode) and later on reload to succeed (when in online mode). A detail I noticed is that if the reload is done through the browser top level UI button, the issue does reproduce. However if the reload is initiated through the HTML button on the error page itself, it does not add a new entry. I will investigate further and see what the difference in the underlying behavior is.
,
May 9 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d515cab0d9f6913d8a139dc0484a451f6d23524a commit d515cab0d9f6913d8a139dc0484a451f6d23524a Author: Nasko Oskov <nasko@chromium.org> Date: Wed May 09 15:34:20 2018 Disable error page isolation temporarily. The isolation of error pages has caused at least one functional regression described https://crbug.com/840485 and causes various renderer process terminations. This CL disables the isolation functionality so these can be investigated and fixed before re-enabling. Bug: 838161 , 840485 , 840794, 840701 Change-Id: Id25937f6f400578c7c8bf315551b3878b4a4937c Reviewed-on: https://chromium-review.googlesource.com/1050431 Commit-Queue: Nasko Oskov <nasko@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Cr-Commit-Position: refs/heads/master@{#557191} [modify] https://crrev.com/d515cab0d9f6913d8a139dc0484a451f6d23524a/chrome/browser/chrome_content_browser_client.cc [modify] https://crrev.com/d515cab0d9f6913d8a139dc0484a451f6d23524a/chrome/browser/chrome_security_exploit_browsertest.cc [modify] https://crrev.com/d515cab0d9f6913d8a139dc0484a451f6d23524a/content/browser/frame_host/navigation_handle_impl_browsertest.cc [modify] https://crrev.com/d515cab0d9f6913d8a139dc0484a451f6d23524a/content/browser/frame_host/navigation_request.cc [modify] https://crrev.com/d515cab0d9f6913d8a139dc0484a451f6d23524a/content/browser/frame_host/render_frame_host_manager.cc [modify] https://crrev.com/d515cab0d9f6913d8a139dc0484a451f6d23524a/content/browser/frame_host/render_frame_host_manager_browsertest.cc [modify] https://crrev.com/d515cab0d9f6913d8a139dc0484a451f6d23524a/content/public/browser/content_browser_client.cc [modify] https://crrev.com/d515cab0d9f6913d8a139dc0484a451f6d23524a/content/public/browser/site_isolation_policy.cc [modify] https://crrev.com/d515cab0d9f6913d8a139dc0484a451f6d23524a/content/public/browser/site_isolation_policy.h
,
May 30 2018
,
Jun 1 2018
Just a quick update on this bug - it is actually not restricted to error page isolation, it was just easily discovered this way. In general, we add a new session history entry every time we perform browser-initiated reload of a document which changes its SiteInstance. There is already an existing test for this - AppApiTest.ReloadIntoAppProcess, however it does not check whether we add more session history entries, just checks process separation. I will be adding checks to this test to ensure we don't regress it again in the future.
,
Jun 4 2018
,
Jun 15 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/aee2f86ac16f51525a7058c5339a8dcad3a38bc7 commit aee2f86ac16f51525a7058c5339a8dcad3a38bc7 Author: Nasko Oskov <nasko@chromium.org> Date: Fri Jun 15 00:05:52 2018 Fix session history navigations and reloads which change SiteInstance. Reloading an URL usually does not change its SiteInstance, however there are a couple of exceptions - hosted apps and recently isolation of error pages. In both of these cases, a commit for a specific URL can happen in SiteInstance A and a subsequent reload results in a change to SiteInstance B. With error page isolation, this can happen easily due to timeout or some other transient network error on the initial navigation to the URL, which ends up in an error page process. A later successful reload then results in a different SiteInstance for the same URL. Session history navigations are similar in behavior. When navigating back/forward, the navigation can be redirected cross-site, resulting in a SiteInstance change. This CL changes ClassifyNavigation to account for these and classifies them as NEW_PAGE with replacement. It ensures that when an entry's SiteInstance changes, which means the security context has changed, we don't reuse and update the existing entry, but rather we replace it with a newly constructed one. The CL adds a specific test for session history navigations that are redirected and adds session history length checks to the existing test of reloading a hosted app, which changes SiteInstances. Bug: 840485 , 848446 Change-Id: Iabacc60ce5726d5d919877b6e65e5d2f51dff3e2 Reviewed-on: https://chromium-review.googlesource.com/1086876 Commit-Queue: Nasko Oskov <nasko@chromium.org> Reviewed-by: Charlie Reis <creis@chromium.org> Reviewed-by: Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/master@{#567492} [modify] https://crrev.com/aee2f86ac16f51525a7058c5339a8dcad3a38bc7/chrome/browser/extensions/app_process_apitest.cc [modify] https://crrev.com/aee2f86ac16f51525a7058c5339a8dcad3a38bc7/content/browser/frame_host/navigation_controller_impl.cc [modify] https://crrev.com/aee2f86ac16f51525a7058c5339a8dcad3a38bc7/content/browser/frame_host/navigation_controller_impl_browsertest.cc [modify] https://crrev.com/aee2f86ac16f51525a7058c5339a8dcad3a38bc7/content/browser/frame_host/navigation_request.cc [modify] https://crrev.com/aee2f86ac16f51525a7058c5339a8dcad3a38bc7/content/browser/frame_host/render_frame_host_manager.cc [modify] https://crrev.com/aee2f86ac16f51525a7058c5339a8dcad3a38bc7/content/browser/frame_host/render_frame_host_manager_browsertest.cc
,
Jun 15 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/307e8978a2282eb186f3a67d1017b38fb92762f0 commit 307e8978a2282eb186f3a67d1017b38fb92762f0 Author: Nasko Oskov <nasko@chromium.org> Date: Fri Jun 15 18:40:23 2018 Add ErrorPageNavigationReload test This is a browser test for https://crbug.com/840485 . Actual fix is more complex and will come later. It is useful to have this test committed so it can be exercised locally with error page isolation enabled. Bug: 840485 Change-Id: I755c55694be191e0a0d569fa64b2093e9deb9da7 Reviewed-on: https://chromium-review.googlesource.com/1086875 Commit-Queue: Nasko Oskov <nasko@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Cr-Commit-Position: refs/heads/master@{#567744} [modify] https://crrev.com/307e8978a2282eb186f3a67d1017b38fb92762f0/content/browser/frame_host/render_frame_host_manager_browsertest.cc
,
Jun 19 2018
I think this bug can now be considered fixed, even though error page isolation itself is not yet enabled. A test for this was landed in r567744. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by est...@chromium.org
, May 7 2018