Skip to content

V8 OOM crash → white screen after extended sessions (Linux) #1686

@mihai2mn

Description

@mihai2mn

Description

T3 Code (Alpha) desktop app on Linux freezes and goes to a white screen during extended sessions. The window frame stays alive but the renderer is dead.

Root Cause (from logs)

The Electron renderer process hits V8's heap limit (~3.7 GB) and crashes with OOM:

[585758:0x1144004e0000] Mark-Compact (reduce) 3746.0 (4003.8) -> 3746.0 (4002.8) MB, pooled: 0.0 MB, 540.68 / 0.00 ms (average mu = 0.058, current mu = 0.000) last resort; GC in old space requested
V8 javascript OOM (Ineffective mark-compacts near heap limit).
Process 585758 (t3-code-desktop) dumped core.
Consumed 3h 22min 35.026s CPU time over 1h 6min 45.825s wall clock time, 22.3G memory peak, 448.4M memory swap peak.

V8 GC runs "last resort" compaction twice but reclaims 0 bytes — the entire 3.7 GB heap is live/reachable.

Reproduction

  1. Open T3 Code desktop on Linux
  2. Run an extended session (~1 hour) with heavy tool use (many Bash calls, large file reads, code diffs)
  3. App freezes, then goes to white screen

Happens intermittently but reproducibly on long sessions with large tool outputs.

Environment

  • App: T3 Code (Alpha), installed from AUR (t3code-bin) at /opt/t3code-bin/
  • OS: CachyOS (Arch-based), Linux 6.19.10-1-cachyos, x86-64
  • Memory: System has sufficient RAM; the issue is V8 heap exhaustion in the renderer process

Expected Behavior

The app should either:

  • Evict old conversation turns from the renderer's DOM/React state to stay within heap limits
  • Gracefully recover (reload the renderer) instead of showing a dead white screen
  • Show an error message suggesting the user start a fresh conversation

Workaround

Using the CLI (claude) instead of the desktop app avoids the issue entirely since there's no Electron layer.

Log Locations

  • Desktop main log: ~/.t3/userdata/logs/desktop-main.log
  • Server child log: ~/.t3/userdata/logs/server-child.log
  • Provider logs: ~/.t3/userdata/logs/provider/_global.log
  • Core dump: captured by systemd-coredump

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions