MV3 extensions fail on low‑power devices during Chrome startup

Summary

Manifest V3 (MV3) extensions leveraging webRequestBlocking fail uniformly on thermally-constrained devices (e.g., Intel Pentium Silver N6000) during Chrome startup. Chromium’s 60-second StartTimeoutTimer kills service workers (SW) before they complete initialization due to main thread saturation from browser-internal tasks. The SW is immediately restarted, but the system degrades further without cooldown or backoff, resulting in an infinite restart loop that never self-recovers.


Root Cause

  • Hardcoded 60-second timeout: Chromium enforces a strict StartTimeoutTimer budget for SW startup, measured as wall-clock time, not actual execution time.
  • Main thread saturation during browser startup: On constrained devices, the main thread spends 34+ seconds on browser internals (e.g., ProfileManager::DoFinalInit, ChromeExtensionSystem::Init) before extensions can meaningfully initialize.
  • Immediate restart with no backoff: After timeout, Chromium queues a restart within ~255ms, causing cascading failures as the system remains overloaded.
  • WebRequestBlocking triggers restarts: Extensions declaring webRequestBlocking have pending callbacks that force Chromium to restart the SW immediately after termination (debug.Restart = true).

Why This Happens in Real Systems

  • Low TDP devices are inherently slower: CPUs like the Intel N6000 prioritize power efficiency over raw performance, struggling with concurrent workloads during startup.
  • MV3 design assumptions: The spec assumes fast startup times, but thermal throttling or resource contention invalidates this on constrained hardware.
  • No backpressure mechanism: Chromium lacks adaptive timeouts or exponential backoff for SW restarts, leading to runaway loops under load.
  • Shared browser resources: Extensions compete for CPU during critical browser initialization phases, exacerbating delays.

Real-World Impact

  • All extensions fail collectively: On affected devices, multiple unrelated extensions time out simultaneously due to shared resource bottlenecks.
  • Browser instability: Users experience 10+ minute hangs or perpetually unresponsive extension behavior.
  • Resource exhaustion: The restart loop consumes CPU and memory continuously, worsening performance over time.
  • Education environment risks: Managed deployments with many extensions face systemic failures on budget hardware (e.g., Chromebooks).

How Senior Engineers Fix It

  • Optimize extension startup: Minimize blocking operations and defer non-critical logic to post-initialization.
  • Advocate for Chromium improvements:
    • Propose adaptive timeouts based on actual SW execution time rather than wall-clock.
    • Suggest exponential backoff for restart loops to prevent cascading failures.
  • Graceful degradation: Implement fallback logic for critical features if SW startup fails (e.g., default settings).
  • Resource-aware design: Use APIs like chrome.idle or hardware detection to adjust extension behavior on constrained devices.

Why Juniors Miss It

  • Ignoring timeout constraints: Overlooking that 60s is tight for complex extensions on underpowered hardware.
  • Misunderstanding restart triggers: Assuming restarts are optional; webRequestBlocking enforces mandatory restarts.
  • Testing on high-end hardware: Missing edge-case failures in development-only on fast machines.
  • Ignoring main thread saturation: Failing to profile or trace the browser startup process to identify shared resource contention.
  • Lack of backoff awareness: Not realizing Chromium’s restart logic lacks delays, turning transient delays into permanent loops.

Leave a Comment