New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 848464 link

Starred by 6 users

Issue metadata

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



Sign in to add a comment

Switching tabs on mac takes ~5s

Reported by tw...@rsglab.com, May 31 2018

Issue description

Chrome Version       : Google Chrome	67.0.3396.62 (Official Build) (64-bit)
Operating System and Version: MacOS 10.13.4 (17E202)
URLs: Various examples include Github, Jira and Confluence (SAAS variants).
Description of performance problem: Switching tabs can have an arbitrary latency of upwards of 5 seconds or more. This occurs most reproducibly when switching to Github or Atlassian (JIRA/Confluence) websites. As shown in the information below I've attempted to add --disable-site-isolation-trials. This did not have any effect on the described behavior.


Remember to attach your trace file to this bug!


Google Chrome	67.0.3396.62 (Official Build) (64-bit)
Revision	babbbb5b433370f9a7feeb9f98a57599ad1c4676-refs/branch-heads/3396@{#702}
OS	Mac OS X
JavaScript	V8 6.7.288.42
Flash	29.0.0.171 /Users/user/Library/Application Support/Google/Chrome/PepperFlash/29.0.0.171/PepperFlashPlayer.plugin
User Agent	Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36
Command Line	/Applications/Google Chrome.app/Contents/MacOS/Google Chrome --flag-switches-begin --site-per-process --disable-site-isolation-trials --enable-features=BookmarkAppsMac --flag-switches-end
Executable Path	/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Profile Path	/Users/user/Library/Application Support/Google/Chrome/Profile 1
Variations	c134752e-f3c7849
5f419cc9-ca7d8d80
31101bd6-71a713bf
a6674cf-ca7d8d80
3095aa95-3f4a17df
47e5d3db-3d47f4f4
4dc30737-b8a5ea08
589b4e9f-3f4a17df
f9884634-659882c0
ceff87ec-3f4a17df
44827ee5-ca7d8d80
d0ecf1da-ca7d8d80
8f1e27f-ca7d8d80
9773d3bd-f23d1dea
9e5c75f1-73498251
f79cb77b-3d47f4f4
4ea303a6-ecbb250e
bcc34a89-3f4a17df
2b33233e-cc2bd7de
2c1d398c-ca7d8d80
58a025e3-c2b41702
2a32876a-ca7d8d80
4bc337ce-69465896
1354da85-ca7d8d80
17507c76-ca7d8d80
494d8760-52325d43
f47ae82a-86f22ee5
3ac60855-486e2a9c
f296190c-97304ce3
4442aae2-6bdfffe7
ed1d377-e1cc0f14
12e17bc5-e1cc0f14
75f0f0a0-d7f6b13c
e2b18481-d7f6b13c
e7e71889-e1cc0f14
f5fff3a2-fe8847a
94e68624-803f8fc4
 

Comment 1 by tw...@rsglab.com, May 31 2018

Trace file attached
trace_slowtabs.json.gz
2.9 MB Download
Cc: -rsch...@chromium.org rpop@chromium.org vmi...@chromium.org
Components: Internals>GPU
Labels: OS-Mac
Summary: Switching tabs on mac takes ~5s (was: Performance issue: Arbitrary tab switching latency)
Thanks for the report!

@Victor CommandBufferService:PutChanged seems to be taking 1 second each call, way too high. Could you help triage?

cc rpop fyi because tabs

Comment 3 by gov...@chromium.org, May 31 2018

Cc: pbomm...@chromium.org ricea@chromium.org horo@chromium.org rsesek@chromium.org
May be related to  bug 848210 ?
Cc: ccameron@chromium.org piman@chromium.org
twood@, thanks for the report.  Could you please attach a copy of the output from navigating to "chrome://gpu"?  Did this work on an earlier version of Chrome?

ccameron@ have you seen anything like this in the past?


Labels: Needs-Triage-M67

Comment 6 by horo@chromium.org, Jun 1 2018

twood@
Can you see the deprecation message of Synchronous XMLHttpRequest in DevTools?

> [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

If so this is the same issue as the  issue 848210 .

Cc: phanindra.mandapaka@chromium.org
Labels: Triaged-ET Needs-Feedback
@ Reporter: As per comment #6 could you please confirm the issue.Hence adding Needs-Feedback label.

Thanks.! 

Comment 8 by tw...@rsglab.com, Jun 1 2018

horo@, I've checked a few different pages and do not see any mention of XMLHttpRequest in the console. In checking various sites I noticed the tab containing this thread began exhibiting the behavior described. I noticed the slowdown was not immediate. Switching to the tab seems to perform as expected for a short while. After opening about a half dozen tabs over the course of about 15 minutes to check for XMLHttpRequest, I returned to this thread and noticed considerable latency in the time between the tab focus switching and the content of the screen rendering (pausing for several seconds at a blank white screen).

Comment 9 by tw...@rsglab.com, Jun 1 2018

ccameron@, You'll find the chrome://gpu report attached
gpu.report
45.5 KB Download
Project Member

Comment 10 by sheriffbot@chromium.org, Jun 1 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 11 by tw...@rsglab.com, Jun 1 2018

Apologies for the comment spam. Moments after posting #9 I discovered this behavior is not exhibited without my external monitor connected. The gpu report above is from no external monitor attached. In case the information is different/relevant I've generated and attached another report from chrome://gpu with the external monitor attached.
gpu2.report
52.5 KB Download
Labels: Needs-Feedback
Owner: ccameron@chromium.org

Comment 13 Deleted

Issue 848952 has been merged into this issue.
Oops, this is a separate bug from issue 848952 -- this is not related to ClearLevel.

The trace attached for this bug is calling ClearLevel, but that only accounts for a tiny fraction of the slowness.

The PutChanged calls are lasting exactly 1 second, and there are lots of them. That sounds like something going wrong in scheduling (either on our side or on Apple's side). Adding sunnyps to take a look

(and separating off the ClearLevel issue).
wait.png
106 KB View Download
Owner: sunn...@chromium.org
->sunnyps to take a look at the "exactly 1 second" issue in the trace
Cc: sunn...@chromium.org
Owner: ccameron@chromium.org
Status: Assigned (was: Unconfirmed)
-> ccameron's fix is here: https://chromium-review.googlesource.com/c/chromium/src/+/1083782
Operating system	Mac OS X 10.13.4
GPU0	VENDOR = 0x1002, DEVICE= 0x6821
GPU1	VENDOR = 0x8086, DEVICE= 0x0d26 *ACTIVE*

I'm seeing that, when using the dGPU on my machine, some GL calls are extremely slow. Haven't figured out why -- it might be a regression in 10.13.4.
Project Member

Comment 19 by bugdroid1@chromium.org, Jun 7 2018

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

commit a3d6a216d1aacfe441cd1874cf96cbeae24f69f6
Author: Christopher Cameron <ccameron@chromium.org>
Date: Thu Jun 07 02:39:58 2018

Add instrumentation for macOS jank

We are seeing very long calls to TexSubImage2D. Add instrumentation
to determine which path is being taken when this is slow (not all
calls are slow).

We are seeing lots of time in ClientWait in
ImageTransportSurfaceOverlayMac. Add instrumentation to determine
in which part of the function we are spending time.

Bug: 848464
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ic8b5835d0373e93863462e1580cc9875b5699fdf
Reviewed-on: https://chromium-review.googlesource.com/1090218
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565155}
[modify] https://crrev.com/a3d6a216d1aacfe441cd1874cf96cbeae24f69f6/gpu/command_buffer/service/texture_manager.cc
[modify] https://crrev.com/a3d6a216d1aacfe441cd1874cf96cbeae24f69f6/gpu/ipc/service/image_transport_surface_overlay_mac.mm

Issue 807037 has been merged into this issue.
Could this be a similar or dupe of issue 851506?
The next time you see this:

to get the pid of the browser process, run:

ps aux | grep "Google Chrome" | grep -v "type" | grep -v "Framework" | grep -v "grep" | awk  '{print $2}'

Then run:

vmmap -v -interleaved [insert_pid_here] > /tmp/vmmap.txt
Slack is encountering this as well, as far back as Chrome 61 | Electron 2.0.2. Interestingly macOS 10.13.3 / 10.13.4 don't seem to be affected, so your theory that this depends on some system call that changed in 10.13.5 seems reasonable.

Other findings:

* So far every repro we have is specific to the AMD Radeon R9 dGPU
* Disconnecting the external monitor or forcing iGPU using --disable-gpu makes the problem go away

Sign in to add a comment