Open Bug 1853047 Opened 2 years ago Updated 6 months ago

unloaded pinned tabs still spawn a process when pref browser.sessionstore.restore_pinned_tabs_on_demand is true

Categories

(Firefox :: Session Restore, defect, P3)

Firefox 117
Desktop
All
defect

Tracking

()

Tracking Status
firefox-esr102 --- affected
firefox-esr115 --- affected
firefox117 --- affected
firefox118 --- affected
firefox119 --- affected

People

(Reporter: promarbler14, Unassigned)

References

(Depends on 1 open bug)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/117.0

Steps to reproduce:

  • Have session restore enabled
  • Have on-demand loading set for tabs (default?) and pinned tabs (have pref browser.sessionstore.restore_pinned_tabs_on_demand = true)
  • Optionally, have pref browser.tabs.tooltipsShowPidAndActiveness set to true and the "Auto Tab Discard" extension installed.

Open some tabs, pin some of those tabs, then quit and reopen Firefox. Hover over the tab for a pid, or check about:processes.

Actual results:

When Firefox is started, neither pinned tabs nor unpinned tabs will be loaded after the windows are restored. However, when examining about:processes (and formerly about:performance), the pinned tabs would still have a process (OS task with a pid) created for them. Each tab will be idle. Unpinned tabs would have no process created. Multiple processes would be created for a pinned site (seemingly per-domain) with only one (discarded) tab assigned to it (in this case, about:processes reports it consumes 13-15 MB per redundant process). With many pinned tabs present, this created a lot of wasted processes and memory on the system. As an example from my case, while I only have one Twitter tab open in its container, I have four unloaded pinned Twitter tabs as well. This created four processes, three of which are completely redundant and have consumed zero CPU time.

Note that after startup, "unloaded" and loaded pinned tabs can still be manually discarded (via an extension, from the tab context menu) to remove the process from the tab. As far as I know, there is no way to do this in batch.

Expected results:

Processes should just be spawned only for the tabs that are focused in each window. Pinned tabs, with the aforementioned on-demand preference set, should not differ from unpinned tabs in this regard. Processes should also not exist solely for the purpose of storing a single unloaded (pinned) tab.

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

Component: Untriaged → Session Restore

I can confirm the reporter's observations on Windows and Linux systems.

Steps confirmed:

  1. Session Restore,
  2. pref browser.sessionstore.restore_pinned_tabs_on_demand = true (false by default in nightly)
  3. pref browser.tabs.tooltipsShowPidAndActiveness = true (default in nightly)
  4. Install the Auto Tab Discard extension
  5. Load Twitter/Facebook and log in
  6. Load at least another 3 subpages of the same domain.
  7. Pin 2 tabs.
  8. Load about:processes page
  9. Close and reopen browser.
  10. Observe the processes
    Actual: There are 2 processes for the 2 pinned tabs, but no processes for the unpinned tabs.
    Expected: The reporter expects there are no active processes for pinned tabs in this situation.

I am not familiar with these prefs and settings and I can't determine if this is a valid or invalid behavior, but I will confirm this report and let developers have a better opinion on it. The same behavior can be observed even in ESR 102.15.1esr.

Thank you for your contribution!

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → Desktop

(In reply to Daniel Bodea [:danibodea] from comment #2)

I can confirm the reporter's observations on Windows and Linux systems.

Steps confirmed:

  1. Session Restore,
  2. pref browser.sessionstore.restore_pinned_tabs_on_demand = true (false by default in nightly)
  3. pref browser.tabs.tooltipsShowPidAndActiveness = true (default in nightly)
  4. Install the Auto Tab Discard extension

Is this extension necessary to reproduce the issue :danibodea? In comment #0 its indicated as optional.

Flags: needinfo?(dbodea)

Note that after startup, "unloaded" and loaded pinned tabs can still be manually discarded (via an extension, from the tab context menu) to remove the process from the tab.

The extension is only used to provide a way to discard a tab after startup, to illustrate the point that pinned tabs can still be discarded manually. Likewise, the pref browser.tabs.tooltipsShowPidAndActiveness is used to more easily tell if a process for the tab exists. For the issue itself (pids exist for unloaded pinned tabs on startup), they should be completely optional and checking about:processes should be sufficient.

I confirm that the issue also reproduces without installing the addon.

Flags: needinfo?(dbodea)

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)
Severity: -- → S4
Depends on: 1862481
Flags: needinfo?(dao+bmo)
Priority: -- → P3

I can reliably reproduce this bug in the latest stable release of Firefox v147.0.3 (64-bit)

Firefox continues to spawn processes for all pinned tabs on browser start even when
browser.sessionstore.restore_pinned_tabs_on_demand is set to true

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