New issue
Advanced search Search tips

Issue 737835 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 710062



Sign in to add a comment

2 processes may be created for service worker and navigation

Project Member Reported by horo@chromium.org, Jun 29 2017

Issue description

I landed the patch of "Reuse unmatched service worker processes for navigation".
https://chromium-review.googlesource.com/c/535220/
So now, the PlzNavigate's navigation will reuse the 'unmathced' service worker process.

But while I'm inspecting the logic of PlzNavigate, I found a edge case where two processes are created for service worker and navigation.

When PlzNavigate is enabled, a SiteInstance and a RenderProcessHost is created when NavigatorImpl::NavigateToPendingEntry() is called.

[1] NavigatorImpl::NavigateToPendingEntry()
 => NavigatorImpl::NavigateToEntry()
  => NavigatorImpl::RequestNavigation()
   => FrameTreeNode::CreatedNavigationRequest()
    => RenderFrameHostManager::DidCreateNavigationRequest()
     => RenderFrameHostManager::GetFrameHostForNavigation()
      => RenderFrameHostManager::CreateSpeculativeRenderFrameHost()
       => SiteInstanceImpl::GetProcess()

But RenderProcessHostImpl::AddExpectedNavigationToSite() is called when NavigatorImpl::OnBeginNavigation() is called asynchronously after NavigateToPendingEntry() is called.

[2] NavigatorImpl::OnBeginNavigation()
 => NavigationRequest::BeginNavigation()
  => NavigationHandleImpl::WillStartRequest()
   => NavigationRequest::OnStartChecksComplete()
    => RenderProcessHostImpl::AddExpectedNavigationToSite()


If the service worker is speculatively started from Omnibox, ServiceWorkerProcessManager::AllocateWorkerProcess() may be called between [1] NavigatorImpl::NavigateToPendingEntry() and [2] NavigatorImpl::OnBeginNavigation().
In that case, AllocateWorkerProcess() creates a new process.

I think it is a rare case. But I want to file a bug not to forget about it.
 

Comment 1 by creis@chromium.org, Jun 29 2017

Cc: creis@chromium.org
Components: UI>Browser>Navigation
Owner: clamy@chromium.org
clamy@ mentioned that this might be blocked on issue 710062?

Comment 2 by horo@chromium.org, Jun 30 2017

Blockedon: 710062
Project Member

Comment 3 by sheriffbot@chromium.org, Jul 2

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)
Probably still available.
Status: Assigned (was: Available)

Sign in to add a comment