Closed Bug 1882154 Opened 1 year ago Closed 1 year ago

Extremely degraded performance with long GC/CC pauses on YouTube after extended uptime

Categories

(Core :: Audio/Video: Playback, defect)

Firefox 123
defect

Tracking

()

RESOLVED DUPLICATE of bug 1865437

People

(Reporter: faekplastik3s, Unassigned)

References

Details

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

Steps to reproduce:

Profile capture of the issue here: https://share.firefox.dev/3Ic4QFM

The issue is consistent, but hard to reproduce due to the nature of the problem. Simply having a Firefox session with multiple tabs that spans a few days will result in degraded performance. This is happening on a new profile, with uBlock as the only extension installed.

The issue is visible no matter what tab, but is especially noticeable on YouTube (and I think YouTube might be the cause), where there will be a lag spike that freezes the UI every 30 seconds or so. The video keeps playing uninterrupted while the UI (seek bar, etc) is frozen. Freezes and degraded performance will be evident on other tabs as well.

The profile capture corresponds to a session where I am simply watching a YouTube video, not even moving the mouse or interacting, and have frequent and predictable GC pauses.

This is happening on a machine with 32GB of RAM and ~60% memory usage. Restarting the browser restores normal performance, which will last for about a day or so until the issue manifests itself again.

Actual results:

UI freezes for multiple seconds while long GC pauses occur every 30 seconds or so

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

Another capture of the issue, this time on my regular profile (with extensions), yet again doing nothing, simply looking at the screen: https://share.firefox.dev/49C9pp3

~1,5 days of uptime, but the same symptom - repeated, long GC pauses that freeze the UI while the video keeps playing.

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

For more information, please visit BugBot documentation.

Flags: needinfo?(jmathies)
See Also: → 1888696

Adding my hardware specs here, just in case there's something in common with all of these issues:

Thinkpad P53s:
Intel Core i7-8665U
Intel UHD Graphics 620 (this is the GPU in use by Firefox)
nVidia Quadro P520
32GB RAM

The timings are different in different processes, but some processes have gaps of only 2 seconds between GC/CC periods. More time is spent in CC than GC.

645MB heap size.

{
  "start": 161028694.60393983,
  "end": 161031851.35543984,
  "name": "GCMajor",
  "category": 5,
  "threadId": null,
  "data": {
    "type": "GCMajor",
    "timings": {
      "status": "completed",
      "max_pause": 101.082,
      "total_time": 1823.57,
      "reason": "FULL_GC_TIMER",
      "zones_collected": 14,
      "total_zones": 14,
      "total_compartments": 48,
      "minor_gcs": 29,
      "minor_gc_number": 27850,
      "major_gc_number": 1291,
      "slices": 116,
      "mmu_20ms": 0,
      "mmu_50ms": 0,
      "scc_sweep_total": 16.197,
      "scc_sweep_max_pause": 8.096,
      "allocated_bytes": 676405248,
      "post_heap_size": 669831168,
      "added_chunks": 2,
      "removed_chunks": 8,
      "slice_number": 55059,
      "phase_times": {
        "evict_nursery_for_major_gc": 579,
        "evict_nursery_for_major_gc.mark_roots": 92,
        "evict_nursery_for_major_gc.mark_roots.mark_stack": 0,
        "prepare": 10125,
        "prepare.mark_discard_code": 9540,
        "prepare.purge": 420,
        "prepare.join_parallel_tasks": 0,
        "mark": 673787,
        "mark.mark_roots": 3985,
        "mark.mark_roots.mark_ccws": 1,
        "mark.mark_roots.mark_stack": 0,
        "mark.mark_roots.mark_runtime_data": 98,
        "mark.mark_roots.mark_embedding": 3197,
        "sweep": 1137292,
        "sweep.mark": 1088027,
        "sweep.mark.mark_weak": 37639,
        "sweep.mark.mark_weak.mark_gray_weak": 13736,
        "sweep.mark.mark_incoming_gray": 14,
        "sweep.mark.mark_gray": 1050230,
        "sweep.finalize_start": 107,
        "sweep.finalize_start.weak_zones_callback": 12,
        "sweep.finalize_start.weak_compartment_callback": 84,
        "sweep.update_atoms_bitmap": 407,
        "sweep.sweep_atoms_table": 3841,
        "sweep.sweep_compartments": 20180,
        "sweep.sweep_compartments.sweep_discard_code": 2165,
        "sweep.sweep_compartments.sweep_finalization_observers": 1,
        "sweep.sweep_compartments.sweep_jit_data": 6847,
        "sweep.sweep_compartments.sweep_misc": 16,
        "sweep.sweep_compartments.join_parallel_tasks": 9728,
        "sweep.finalize_object": 6,
        "sweep.finalize_non_object": 5,
        "sweep.sweep_prop_map": 2844,
        "sweep.finalize_end": 42,
        "sweep.destroy": 1727,
        "sweep.find_dead_compartments": 24,
        "decommit": 12,
        "minor_gc": 55260,
        "minor_gc.mark_roots": 3248,
        "minor_gc.mark_roots.mark_stack": 1065
      }
    }
  }
}
{
  "start": 161032188.01973984,
  "name": "CC",
  "end": 161039706.77443984,
  "category": 5,
  "threadId": null,
  "data": {
    "type": "CC",
    "mReason": "MANY_SUSPECTED",
    "mSuspected": 381,
    "mForgetSkippable": 8,
    "mRemovedPurples": 2710,
    "mMaxSliceTime": 5395.55,
    "mSlices": 33,
    "mAnyManual": false,
    "mForcedGC": false,
    "mMergedZones": false,
    "mVisitedRefCounted": 411042,
    "mVisitedGCed": 4915293,
    "mFreedRefCounted": 349,
    "mFreedGCed": 847,
    "mFreedJSZones": 0
  }
}
Summary: Extremely degraded performance with long GC pauses on YouTube after extended uptime → Extremely degraded performance with long GC/CC pauses on YouTube after extended uptime

Would you have navigated to YouTube's subscriptions page during this session?

about:memory might have some hints as to what might be leaking.
Bug 1865437 also references some other tools that may be helpful.

Depends on: 1865437

Thank you.
Yes, I definitely would have, and having read #1865437, I believe it is the same issue, although my browser never actually fully hangs as described there. I have tried to follow the same diagnostic steps and have tried to analyze a GC dump by using the heapgraph script, which I did, but I now see that I need a DMD build of Firefox to do the actual analysis. Either way, the issue is recurrent and ever present.

Thanks. I'll dupe this to bug 1865437 so that we can track progress in one place.
We can reopen if it turns out to be different.

No longer depends on: 1865437
Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1865437
Resolution: --- → DUPLICATE
Flags: needinfo?(jmathies)
You need to log in before you can comment on or make changes to this bug.