Open Bug 2054675 Opened 4 months ago Updated 2 months ago

YouTube keeps crashing or freezing

Categories

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

Firefox 152
defect

Tracking

()

UNCONFIRMED

People

(Reporter: ashley.guinn88, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: perf)

Attachments

(1 file)

40.38 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document
Details

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

Steps to reproduce:

Open YouTube.
Play a normal video.
Seek backwards or allow an advert to begin.
Sometimes scroll the page.
The tab freezes.

Actual results:

The YouTube tab becomes unresponsive.
Audio frequently continues playing.
Other Firefox tabs continue working normally.
Embedded YouTube videos on other websites show the same behaviour.

Expected results:

Video continues playing normally.

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, but is not confident enough to move the bug to that component.

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

Could you help us out by trying to capture a Firefox performance profile when this happens? Visit https://profiler.firefox.com/ for more information and to enable the profiling toolbar button. When capturing a profile, please follow these steps -

  1. Navigate to about:logging
  2. In the logging preset drop down, select 'Media playback' and then click 'Set Log Modules'
  3. Click 'Start Logging' and conduct your testing. Keep this part short. Capture the issue well.
  4. Upload the resulting performance profile and post the url provided to this bug.

Thanks!

Flags: needinfo?(ashley.guinn88)
Flags: needinfo?(ashley.guinn88)

You have accessibility features enabled, that's going to slow things down a bit. The client that enabled them is your Norton 360 anti-virus software. I would suggest looking into their settings to see if you can turn whatever feature that enables accessibility off.

Bug 2054675 Triage Analysis

Generated: 2026-07-28
Bug URL: https://bugzilla.mozilla.org/show_bug.cgi?id=2054675

Bug Information

  • Summary: YouTube keeps crashing or freezing
  • Reporter: ashley.guinn88@hotmail.com (Ashley, external)
  • Status: UNCONFIRMED
  • Product: Core
  • Component: Audio/Video: Playback
  • Created: 2026-07-13 (Firefox 152, Windows 10/11 x64)
  • Severity / Priority: -- / -- (unset)
  • Security: No
  • CC: alice0775@gmail.com, jprickett@mozilla.com
  • Attachment: "Mozilla About Information.docx" (about:support, ID 9607929)
  • STR: Open YouTube, play a video, seek backwards or let an advert begin, sometimes scroll -> the tab freezes; audio frequently keeps playing; other tabs fine; embedded YouTube elsewhere behaves the same.

Research Summary and Key Findings

The reported symptom — the tab freezes while audio keeps playing and other tabs stay responsive —
is the classic signature of a single content process's main thread being saturated, not a media
decode failure ("crashing" here means unresponsive, not a browser crash; there is no crash signature).
The profile confirms this precisely.

Profiler analysis (share.firefox.dev/4yFzKiQ, Firefox 153 / Windows 11, 65 s)

  • The content-process main thread (t-8) is the bottleneck: ~16.7 s of CPU over 65 s, far above any
    other thread. Media threads (MediaDecoderStateMachine, MediaSupervisor, AudioIPC) keep running — which
    is why audio continues while the page is frozen.
  • Work is almost entirely refresh-driver / vsync ticks. ~35% of the main thread is under
    PVsync::Msg_Notify -> VsyncMainChild::RecvNotify -> nsRefreshDriver::Tick. Within each tick, two
    costs dominate:
    1. Mouse-event dispatch / hit-testing — ~27% of the tick.
      BrowserChild::ProcessPendingCoalescedMouseDataAndDispatchEvents ->
      HandleRealMouseButtonEvent -> PresShell::HandleEventUsingCoordinates. Heavy coalesced
      mouse-event handling / hit-testing on YouTube's large DOM (consistent with "sometimes scroll the
      page" and with a user moving the mouse trying to interact during the stall).
    2. The accessibility engine — ~9% of the whole main thread.
      a11y::NotificationController::WillRefresh (8.7%), DocAccessible::ProcessQueuedCacheUpdates
      (7.9%), LocalAccessible::BundleFieldsForCache (7.5%). Accessibility is instantiated and
      continuously rebuilding its cache for the dynamic YouTube document.
  • The freeze is real and repeated: Jank markers up to 715 ms, RefreshObserver ticks up to
    986 ms, and LongTask up to 702 ms — i.e. repeated sub-second-to-~1s main-thread stalls that
    read as "frozen."

about:support (attached .docx) — key confirmation

  • Accessibility -> Activated: true, Prevent Accessibility: 0. (The "Accessibility Instantiator"
    field is blank in the report, so what activated a11y is not attributed.) This corroborates the
    profile's a11y cost: the accessibility engine is running on this machine.
  • Graphics: Intel GPU (Vendor 0x8086, Device 0xA7A8), Compositing = WebRender, hardware compositing
    available — no obvious GPU/driver blocklisting; the problem is main-thread, not GPU.

Root-cause hypothesis

A content-process main-thread saturation on YouTube driven by (1) the accessibility engine's
per-refresh cache updates
on a heavy, highly dynamic DOM, plus (2) expensive coalesced mouse-event
dispatch/hit-testing
, producing repeated ~0.5–1 s stalls. This matches a well-known class of
a11y-induced jank (see related bugs). The a11y contribution is especially suspicious because
accessibility is active on this user's machine and may have been instantiated by third-party software
rather than an intentional assistive tool.

Related bugs

  • 1901159 — "Investigate jank when loading WHATWG HTML spec page with a11y enabled" (NEW). Directly about a11y-induced main-thread jank.
  • 1948375 — "High cpu usage on NtUserNotifyWinEvent causing entire system to slow down" (FIXED). a11y event-notification CPU.
  • 1951571 — "Block corplink-uc.exe accessibility client (Firefox becomes very slow)" (FIXED). Third-party program instantiating a11y -> severe slowness; same pattern as a blank/unexpected instantiator here.
  • Symptom siblings (mostly closed INCOMPLETE/WORKSFORME for lack of a profile): 1982575, 1986170, 1993583, 1999830. No confirmed open duplicate with a diagnosed root cause — this bug's profile is more actionable than those.

Regression Timeline

Not reported as a regression and no regressed_by set. No version-where-it-worked was given. Given the
likely a11y + event-handling interaction, bisection is not the best first step; disabling accessibility
to confirm the driver (below) is more economical.

Assessment

  • Suggested Severity: S3 (could rise to S2 if reproducible independent of accessibility)
  • Suggested Priority: P2

Assessment Reasoning

Repeated multi-hundred-ms to ~1 s freezes on YouTube — a top site — is a serious usability problem for
the affected user, and the profile gives a concrete, actionable signature (main-thread saturation:
accessibility cache updates + coalesced mouse-event dispatch under the refresh driver). That justifies
P2 and active investigation. Severity is held at S3 because the strongest contributor
(accessibility being active) appears tied to this machine's configuration rather than confirmed as a
universal YouTube regression; if the freeze reproduces with accessibility disabled / on clean profiles,
it should move to S2.

The single most valuable confirmation is to establish whether accessibility is the primary driver:
disabling it should sharply reduce the per-tick cost the profile attributes to
NotificationController/ProcessQueuedCacheUpdates. Because accessibility is Activated: true with a
blank instantiator, a third-party accessibility client (as in bug 1951571) is a real possibility worth
ruling in or out. This is not a good-first-bug — it spans a11y cache performance and event
dispatch, with real regression risk.

Codebase Investigation

Kept light: the profile points at the accessibility and event-dispatch subsystems under the refresh
driver, and the priority next step is confirming the driver with the reporter rather than changing code.

Relevant Files / Areas

  • Accessibility cache updates: accessible/base/NotificationController.* (WillRefresh), accessible/generic/DocAccessible.cpp (ProcessQueuedCacheUpdates, QueueCacheUpdate), LocalAccessible::BundleFieldsForCache.
  • Refresh driver tick: layout/base/nsRefreshDriver.cpp (Tick, TickObserverArray).
  • Coalesced mouse event dispatch: dom/ipc/BrowserChild.cpp (ProcessPendingCoalescedMouseDataAndDispatchEvents, HandleRealMouseButtonEvent) and PresShell::HandleEventUsingCoordinates.

Findings

Main-thread saturation with ~9% in a11y cache bundling and ~27% of each refresh tick in mouse-event
dispatch/hit-testing; repeated ~0.5–1 s janks. Media pipeline healthy (audio continues). GPU/WebRender
healthy per about:support.

Suggested Investigation Areas

  • Confirm the accessibility contribution: have the reporter set accessibility.force_disabled = 1 (about:config), restart, and retry YouTube. If freezes stop/greatly reduce, a11y is the primary driver.
  • Identify what instantiated accessibility (blank instantiator + Activated:true) — ask about assistive tools and enterprise/security software; compare to bug 1951571.
  • Examine the coalesced mouse-event / hit-testing cost on YouTube (JS listeners vs APZ hit-test) as a secondary contributor.
  • If a11y-confirmed, loop in the accessibility team (Core :: Disability Access APIs) and relate to 1901159.

Requesting Feedback

The needinfo (profile) has been answered. Next, to pin the driver (exclude items already provided —
about:support and a profile are in hand):

  • Result of setting accessibility.force_disabled = 1 and restarting, then retrying YouTube (does the freeze stop?).
  • What assistive technology or accessibility-adjacent software runs on the machine (screen reader, magnifier, enterprise/security/remote tools)? — to explain Accessibility Activated: true.
  • Whether the freeze also reproduces in a fresh profile with no extensions.

Bugzilla Use Tracking

  • Total Bugzilla Queries: 6 (fields, comments, history for 2054675; 2 related-bug searches; attachment download)
  • Total Bugs Processed: 1 (plus related-search scan of ~2 components)
  • Estimated Download Bandwidth Used: ~1 MB (profile + about:support docx)
  • Inaccessible Bugs Due to Permissions: 0
Component: Audio/Video: Playback → Disability Access APIs

Marking s2 for now.

It'd be good to understand what is so different about the usage pattern on YouTube here. I've never seen this myself, nor have we seen any other reports of such extreme performance degradation on YouTube caused by the accessibility engine.

Morgan, are you able to reproduce this? it looks like we are spending a lot of time building the viewport cache and the display list building stack is very, very deep.

Blocks: a11yperf
Severity: -- → S2
Flags: needinfo?(mreschenberg)
Keywords: perf

(In reply to Jim Mathies [:jimm] from comment #5)

The "Accessibility Instantiator"
field is blank in the report, so what activated a11y is not attributed.)

Hmm, looks like the AI triage tool you're using messed this bit up: the instantiator is definitely present in the report as you noted in comment 4. I wonder what happened there?

We should consider blocking NortonUI.exe from instantiating accessibility. If we don't know why it's instantiating, it likely has no particularly good reason to do so.

That doesn't address the underlying perf problem we're seeing here, though.

(In reply to James Teh [:Jamie] from comment #6)

Marking s2 for now.

It'd be good to understand what is so different about the usage pattern on YouTube here. I've never seen this myself, nor have we seen any other reports of such extreme performance degradation on YouTube caused by the accessibility engine.

Morgan, are you able to reproduce this? it looks like we are spending a lot of time building the viewport cache and the display list building stack is very, very deep.

I can't seem to reproduce this on macOS. My STR:

  1. Enable VoiceOver and ensure about:config doesn't have force_disable set to -1. Ensure "mouse:" is set to "moves VO cursor" in VO utility to enable hittesting
  2. Open youtube.com and hittest various regions of the hompage. Scroll the homepage down, hittest the scrollable region. Scroll it back up, do the same
    Results: hittesting behaves normally and there is no lag
  3. Load a youtube video
  4. Hittest the video element and on-screen elements like description, links, sidebar.
    Results: hittesting behaves normally and there is no lag
  5. Seek the video forwards and backwards using the mouse. hittest the video element and on-screen elements again
    Results: hittesting behaves normally and there is no lag
  6. Scroll the comments several times, hittest the comment content
    Results: hittesting behaves normally and there is no lag
Flags: needinfo?(mreschenberg)

(In reply to Ashley from comment #0)

Open YouTube.
Play a normal video.

Ashley, are there particular videos where you can reproduce this more easily than others? Or does it happen with particular window sizes and not others? Any info you can provide to help pin point this would be helpful. As noted in comment 9, we can't reproduce this, and given the complexity of YouTube, this makes it rather hard for us to diagnose without being able to reproduce it.

Also, can you please try to reproduce this in Troubleshoot Mode (all add-ons disabled)? You can access this in about:support.

Thanks.

Flags: needinfo?(ashley.guinn88)

Hi, it is most reproduceable on long videos, it does not happen on Shorts, but can still happen on short videos that are 3-5 minutes, but is more likely to happen on long videos. I reproduced in Troubleshoot Mode-

https://share.firefox.dev/4fsdFgr

Flags: needinfo?(ashley.guinn88)

Hi, any further updates?

(In reply to Ashley from comment #12)

Hi, any further updates?

Hi Ashley, I don't see any accessibility calls in the profile you sent, so I'm going to move this back over to the Media folks.
Did you disable your Norton software before capturing the profile? Did you experience the performance problem when the profile was captured?

Component: Disability Access APIs → Audio/Video: Playback
Flags: needinfo?(ashley.guinn88)

Clearing severity due to component reassignment.

Severity: S2 → --

(In reply to Morgan Reschenberg [:morgan] from comment #13)

(In reply to Ashley from comment #12)

Hi, any further updates?

Hi Ashley, I don't see any accessibility calls in the profile you sent, so I'm going to move this back over to the Media folks.
Did you disable your Norton software before capturing the profile? Did you experience the performance problem when the profile was captured?

I thought that it was mentioned the Norton Software could not fully explain the issue? I was experiencing the problem when capturing the profile, but Norton was running.

Flags: needinfo?(ashley.guinn88)

Having said that, I just tried disabling Norton's Firewall and running Youtube, and it seems to be running normally now without crashing.

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)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: