New issue
Advanced search Search tips

Issue 736509 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Long task notifications delivered to all tabs when they share renderer process

Project Member Reported by dproy@chromium.org, Jun 23 2017

Issue description

Chrome Version: Version 58.0.3029.110

What steps will reproduce the problem?
- Launch chrome with the flag "--renderer-process-limit=1"
- Open http://deepanjan.me/long-tasks-single-process
- Click "Run Long Task" just to verify the long task performance observer is working for the same site.
- Open theverge.com in a new tab
- See all the long tasks being showing up in the original tab. 

What is the expected result?
Longs tasks from theverge.com should not show up in the other tab.

What happens instead?
It does.

From what I understand, generally tabs can share renderer process in certain situations (low memory, too many tabs etc) even when they're hosting sites from different origins, so this can be problematic.

 
Cc: panicker@chromium.org
Owner: npm@chromium.org
Status: Assigned (was: Untriaged)
Nicholas, can you take a look at this?

Comment 2 by npm@chromium.org, Jul 26 2017

*Nicolas without an h can take a look.

Is this related at all to the fact that they're long tasks or does this happen with other types?

Comment 3 by panicker@google.com, Jul 26 2017

This is specific to Long Tasks

Comment 4 by dproy@google.com, Jul 26 2017

You mean other types to performance observers? I'm not sure but I think not. Long task notifications are going to all the tabs in the renderer essentially because they share the same renderer scheduler and it's non-trivial to tell which tab a task originated from. Most other performance entries (.e.g. resource requests) are much easier to scope to a particular tab and so my guess will be they don't have the same bug.
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0b4a4a6e1b7d9004fe52cf19249358edbd716400

commit 0b4a4a6e1b7d9004fe52cf19249358edbd716400
Author: Nicolas Pena <npm@chromium.org>
Date: Tue Oct 17 03:56:40 2017

Omit reporting tasks whose local root does not match monitor's local root

Currently, if two tabs share the renderer process then the longtasks from one
tab are also reported to observers in the other tab. This CL fixes that by
ensuring that only tasks involving the PerformanceMonitor's |local_root_| are
reported by the PerformanceMonitor.

Bug:  chromium:736509 
Change-Id: I3be72ec81c0c2735b6a092f848f4c4b6cb58ddfe
Reviewed-on: https://chromium-review.googlesource.com/705175
Reviewed-by: Nate Chapin <japhet@chromium.org>
Reviewed-by: Timothy Dresser <tdresser@chromium.org>
Reviewed-by: Shubhie Panicker <panicker@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509274}
[modify] https://crrev.com/0b4a4a6e1b7d9004fe52cf19249358edbd716400/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/0b4a4a6e1b7d9004fe52cf19249358edbd716400/third_party/WebKit/LayoutTests/external/wpt/longtask-timing/shared-renderer/longtask-in-new-window.html
[add] https://crrev.com/0b4a4a6e1b7d9004fe52cf19249358edbd716400/third_party/WebKit/LayoutTests/external/wpt/longtask-timing/shared-renderer/resources/frame-with-longtask.html
[add] https://crrev.com/0b4a4a6e1b7d9004fe52cf19249358edbd716400/third_party/WebKit/LayoutTests/virtual/single-renderer-process/external/wpt/longtask-timing/shared-renderer/README.txt
[modify] https://crrev.com/0b4a4a6e1b7d9004fe52cf19249358edbd716400/third_party/WebKit/Source/core/frame/PerformanceMonitor.cpp
[modify] https://crrev.com/0b4a4a6e1b7d9004fe52cf19249358edbd716400/third_party/WebKit/Source/core/frame/PerformanceMonitor.h
[modify] https://crrev.com/0b4a4a6e1b7d9004fe52cf19249358edbd716400/third_party/WebKit/Source/core/frame/PerformanceMonitorTest.cpp

Comment 6 by npm@chromium.org, Oct 24 2017

This example is fixed. Shall we leave this bug open to determine how to fix tasks that only involve UpdateLayout and RecalculateStyle?
Yup, leaving the bug open SGTM.

Comment 9 by npm@chromium.org, Dec 1 2017

Status: Fixed (was: Assigned)

Sign in to add a comment