Open Bug 1871524 Opened 2 years ago Updated 1 month ago

Stuck at tabswitch spinner when opening a new tab

Categories

(Core :: Graphics, defect, P2)

Firefox 123
Desktop
All
defect

Tracking

()

Performance Impact medium
Tracking Status
firefox123 --- affected

People

(Reporter: eight04, Unassigned)

References

(Blocks 1 open bug)

Details

(4 keywords)

Attachments

(7 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0

Steps to reproduce:

  1. Open any page.
  2. Select some text, drag-n-drop the selection to the tab bar.
  3. A tab (googling the selection) is opened in the background.
  4. Wait until the tab is loaded.
  5. Switch to the new tab.

Actual results:

https://imgsh.net/a/rNrg8hc.png
The tab stuck at the loading animation.

The page is actually loaded, you can interact with the page via mouse/keyboard as seen in the screenshot.

Expected results:

Just show the page normally.

The Bugbug bot thinks this bug should belong to the 'Firefox::Tabbed Browser' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Tabbed Browser

Hello, thank you for the bug report!
Unfortunately I could not reproduce your issue. Would you be so kind as to answer a few questions so we can investigate this further?

Thank you.

Flags: needinfo?(eight04)

(In reply to Ardelean Oana, Desktop QA [:oardelean] from comment #2)

Tested it again. Now I'm not able to reproduce this issue anymore.

Tested on my original profile, a new profile, and my original profile with trouble shoot mode.

Flags: needinfo?(eight04)

Saw this bug again today.

I middle-clicked a Google search result.
Later I switched to that tab, the tab stuck at the loading animation. (while you can still interact with the page)

BUT before I submitted this comment (probably in one minute), I checked the tab again and the page was shown correctly.

The severity field is not set for this bug.
:dao, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(dao+bmo)

Saw this bug again.

  1. I noticed one tab was stuck.
  2. After a while, I checked the tab again and found that it was still stuck.
  3. I pressed the "Print Screen" key to take a screenshot with PicPick.
  4. After the screenshot was taken, PicPick opened the image editor.
  5. I minimized the image editor and the tab loaded correctly.

Hy :eight04, thank you so much for the additional information!
I could reproduce this issue on Firefox Nightly 123.0a1 on Ubuntu 22 so far. I used the STR provided by the reporter until I caught the issue.
Please note that this issue is intermittent and does not reproduce reliably.
Setting as NEW so the developing team can have a look.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(dao+bmo)
OS: Unspecified → All
Hardware: Unspecified → Desktop
Summary: Stuck at loading animation when opening a new tab → Stuck at tabswitch spinner when opening a new tab

Hi eight04,

Thanks for continuing to provide feedback here. I think the next thing we need here is a performance profile recording to get a deeper sense of what might be going wrong.

If you follow the instructions at https://firefox-source-docs.mozilla.org/performance/reporting_a_performance_problem.html, it will guide you through enabling the profiler button in Firefox and starting a recording. Once recording, you can keep it on in the background until you see the issue (it uses a circular buffer). Once you see the issue, hit the button again, and a new tab will open with the profile that was collected. There are instructions here on how to upload and share the profile here in this bug, and then we can examine it.

Flags: needinfo?(eight04)

(In reply to Mike Conley (:mconley) (:⚙️) from comment #8)

Hi eight04,

Thanks for continuing to provide feedback here. I think the next thing we need here is a performance profile recording to get a deeper sense of what might be going wrong.

QA may also be able to help with this as they managed to reproduce the issue.

Flags: needinfo?(oardelean)
QA Whiteboard: [qa-regression-triage]

Saw this bug again. Unfortunately I didn't run the profiler at browser start so the report only includes the loading screen I saw.
https://share.firefox.dev/48YGZFF

At 50s, I minimized the window and maximize it again, which fixed the issue.

Flags: needinfo?(eight04)

Thanks for the profile, eight04.

From examining the profile, what I see is that the Twitter page (during the recording of the profile) never seems to have its refresh driver tick / WebRender display list upload until the window is restored. I'm going to move this bug over to Core :: Graphics for now.

Performance Impact: --- → ?
Component: Tabbed Browser → Graphics
Product: Firefox → Core

I also managed to capture a profile of the issue. Note that the bug was caught towards the end. Please let me know if the profile is usable and if there’s anything else I can help with.
Profile: https://share.firefox.dev/4bA0Yfh

Flags: needinfo?(oardelean)

The Performance Impact Calculator has determined this bug's performance impact to be medium. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.

Platforms: Windows
Impact on site: Renders site effectively unusable
Configuration: Rare
Websites affected: Major
[x] Able to reproduce locally

Performance Impact: ? → medium

Thanks oardelean,

From what I can tell, your profile is similar to eight04's - we tab switch, and request displaylists from the underlying tab, but they never arrive or get composited, so we hit our timeout and show the spinner.

oardelean and eight04, can you please visit about:support and click "Copy text to clipboard" and paste your clipboard into a new comment in this bug? I want to look for commonalities in your graphics stack.

Flags: needinfo?(oardelean)
Flags: needinfo?(eight04)
Attached file about_support.txt —
Flags: needinfo?(oardelean)
Attachment #9379208 - Attachment description: about_support → about_support.txt
Attachment #9379208 - Attachment mime type: application/octet-stream → text/plain
Attached file about:support —
```

Hm. Nothing is jumping out from those about:supports that might explain this.

oardelean - how reliabily can you reproduce this? Are you able to get a regression range?

Flags: needinfo?(oardelean)

Unfortunately I wasn’t able to find a regression range. This particular bug is quite tricky to catch - most of the times it does not reproduce, and when it does, the browser sometimes tends to freeze for a short while, which makes it difficult to come with a correct regression range. I was only able to reproduce once on today’s Nightly build(using the same profile which has the about:support attached), but had no success whatsoever on older builds.

Flags: needinfo?(oardelean)

Got a similar tab today, without the spinner.
https://imgur.com/iAh6nN6

This time, minimizing & maximizing the window doesn't fix it.

Here is the log from the browser console:
https://imgur.com/tlrFvn6

There are some sendAsyncMessage errors. Don't know if it's relevant.

Flags: needinfo?(eight04)

The severity field is not set for this bug.
:bhood, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(bhood)
Severity: -- → S3
Flags: needinfo?(bhood)
Priority: -- → P2
Attached image Spinner forever —

Tab preview feature causes this bug from v131.0.
Issue gone by disabling below in about:config.

browser.tabs.hoverPreview.enabled = false
browser.tabs.hoverPreview.showThumbnails = false

Thank you. I'm going to try this setting over a few days and see if this issue occurs or not.
Since it's a bug, I presume it's on the roadmap to be fixed sometime in the future?

We don't currently have enough information to reproduce this particular bug. If you can confirm that disabling tab hover previews fixes the issue for yourself, that gives us an extra clue, but we still need to determine why it's happening and then how to fix it - and we may need information from you after you've done this check.

The issue still persist.

I confirm that in my about:config, browser.tabs.hoverPreview.enabled and browser.tabs.hoverPreview.showThumbnails is toggled to false. I've also restarted the browser to ensure the configuration took effect before the video recording.

This also happens to me on occasion, at least for the last few months and multiple versions of Firefox.
Here's how it seems to happen:

  1. Open a link in a new tab, or right-click an image and click "Open Image in New Tab".
  2. Tab seems to load, based on correct title in tab, but if you click on it, all you see is the spinner.
  3. Pressing Reload (Ctrl+R) is not helpful. You still just see the spinning icon.
  4. Navigating to another webpage entirely is not helpful. That new page loads fine behind the spinner, but you can't see it.

But I did come across a way today that gets the tab back to normal SORT OF, but not entirely. Here's what happened:

  1. I right-clicked and opened youtube.com in a new window.
  2. After clicking to the new tab (showing only the spinner), I clicked the home button (duckduckgo.com). No change in spinner, but new title appeared.
  3. I navigated to another frequently visited site. Same thing, still just a spinner, but the title changed.
  4. I pressed either the back button or Alt+LeftArrow. NOW DuckDuckGo was properly showing. However, both the forward and backward buttons are grayed out (disabled), as though DuckDuckGo were the first and only page ever visited in that tab, which is NOT true, since the pages actually did load behind the spinner, and the visits generated history in the library.

If I had to guess, I'd suspect some kind of race condition or other timing bug. Heavy swap-file activity MAY be a factor in reproducing this, but I can't say for sure if that helps.

Hi firefoxbugs,

Are you able to provide a performance profile recording for when you experience this?: https://firefox-source-docs.mozilla.org/performance/reporting_a_performance_problem.html

Flags: needinfo?(firefoxbugs)

(In reply to Mike Conley (:mconley) (:⚙️) from comment #31)
Not at all likely. This only happens every week or two, and there's no way I can run the profiler 24/7.

[Note: In fact, even when I tried running the profiler a few seconds, it slowed my entire system to be completely unusable and I had to log in from a TTY and kill the firefox process. This is more or less how I usually close Firefox anyway; I use it for hours or days until it eats up too much memory and swap, as it inevitably does, and then I kill the process. I never quit normally, because I've found that could take an incredibly long time (potentially hours) for Firefox to read back all the data from swap only to free it. So this behavior was kind of normal, but the profiler seemed to accelerate the need to kill the process when I hadn't even had Firefox open that long.]

Is there information which would be useful that could be collected only starting once the spinning tab is observed? If so, I can try, but you will need to let me know exactly what settings to use, specifically, whatever you think is the minimal set of data that would still be helpful.

FWIW, this bug doesn't seem to be the cause of a performance problem, so I'm not really clear on what you're hoping to see. The spinning icon is not indicative of it actually doing anything. In other words, my CPU usage, page loading speed, etc. is not in any way affected, even if I leave that spinning tab open for hours.

Flags: needinfo?(firefoxbugs)

This matches bug 2071626: a warmed background tab (tab hover previews warm tabs) that changes content process loses its layer state, so the tab switcher waits for layers forever until something toggles them, such as minimizing and restoring the window. Adding the dependency; worth retesting once it lands.

Depends on: 2071626
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: