[Windows] v2.29.0 regression: language server exits with code 2 (0xC0000005, PC=0x0 / bogus "out of memory") in protobuf decoder — triggered by Remote Control sessions on large conversations; v2.28.2 is stable

Summary

Since auto-updating from 2.28.2 to 2.29.0, the desktop app’s language server crashes repeatedly with exited with code 2. The window flashes black and reloads (“Port changed! Reloading all windows”), and after 3 crashes in a row it gives up (“Language server crashed 3 times in a row. Giving up”). Downgrading to 2.28.2 with the same data and the same usage pattern restores stability.

Environment

  • Antigravity desktop app 2.29.0 (Language server version 2.29.0), Windows x64
  • Windows: Microsoft Windows 11 Pro build 26200, RAM: 64 GB
  • Usage: several long-running agent processes; I follow them from my phone via Remote Control

Crash frequency by version (counted from main.log on the same machine)

Version Language server crashes “Giving up” events Period
2.28.2 2 0 ~6 days continuously open
2.29.0 33 4 < 1 day (some during my own testing)

Crash signatures (language_server.log)

All variants point to the same code path: the protobuf decoder (google_arena_unsafe) receives a type pointer where an allocation size is expected.

Variant A — bogus out of memory

runtime: out of memory: cannot allocate 140700171632640-byte block (2110783488 in use)
fatal error: out of memory
goroutine 533 [running]:
runtime.mallocgc(0x7ff74f80eb78, 0x7ff74f80eb78, 0x0)
.../protobuf/v2/internal/impl/impl.newObject           (google_arena_unsafe.go:174)
.../protobuf/v2/internal/impl/impl.consumeMessageInfo  (codec_field.go:200)
.../protobuf/v2/internal/impl/impl.(*MessageInfo).unmarshalPointerEager

The requested size (0x7FF74F80EB78) is an address inside the executable image, not a size. The same value shows up in rbx in the register dump of Variant B.

Variant B — execution at address 0

Exception 0xc0000005 0x8 0x0 0x0
PC=0x0
runtime: g 474: unknown pc 0x270e

The goroutine is the summaries reconciler (reconcile_summaries.go), which crashes right after logging [Summaries] failed to generate summary for <id> while reconciling: conversation <id> not found.

Variant C — wild PC / corrupted return address

Exception 0xc0000005 0x8 0x16c456609e0 0x16c456609e0
PC=0x16c456609e0
runtime: g 16587: unknown pc 0x16c456609e0          (created by actor/tracing.Go)
runtime: g 319: unexpected return pc for runtime.mallocgc called from 0x195

In this case mallocgc again receives a type pointer as the size, and returns into the protobuf impl region.

Trigger correlation

  • With a Remote Control session (phone): the session opened at 09:30:27 (mesh_routing.go: Pinned server-vouched WebCrypto public key for session ...), and the crash followed at 09:31:34. Before any mitigation, crashes came about 1 minute after the phone connected.
  • Without the phone: about 4 minutes until a crash with the original data. After compacting the conversation databases, about 52 minutes (still crashes, with no remote session, while the agent is actively working).
  • Conversation size matters: several conversation DBs in ~/.gemini/antigravity/conversations/ were 0.9–1.3 GB each. The largest active one had 80,006 steps (~460 MB of real data). Checkpoint summary was too long and was truncated to 38400 tokens appears for it. At the time of Variant A, the Go heap was at 2.1 GB.
  • Moving the largest conversations and conversation_summaries.db / agyhub_summaries_proto.pb out only delays the crash, because the summaries are regenerated from the remaining conversations and the crash comes back.

Ruled out

  • GPU: still crashes with hardware acceleration disabled. No Crashpad dumps; it is the Go process exiting, not Electron.
  • Hardware: no relevant WHEA events, and no other common apps crashing.
  • A single “poisoned” conversation: the crash moves between subsystems (summaries, tracing, allocation), which is consistent with an unsafe-arena decoding bug under large payloads rather than with one bad record.

Workaround that works

  1. Back up ~/.gemini/antigravity and %APPDATA%\Antigravity (do not delete them).
  2. Install 2.28.2 over 2.29.0. winget download --id Google.Antigravity --version 2.28.2 gets the official, Google-signed installer from storage.googleapis.com.
  3. Prevent the auto-updater from reinstalling 2.29.0. It downloads the update ~10 s after launch and installs it on quit. Move %LOCALAPPDATA%\antigravity-updater\pending away and replace it with an empty read-only file named pending. The updater then fails with EEXIST ... mkdir pending and leaves the installed version alone.
  4. Optional: VACUUM of large conversation DBs. One went from 1226 MB to 504 MB with identical row counts and integrity_check = ok.

Additional issues noticed along the way

  1. language_server.log is truncated on every restart, so the crash dump is lost as soon as auto-restart kicks in. Keeping the previous log (e.g. language_server.prev.log) would make this much easier to diagnose.
  2. The summaries reconciler references conversations that are “not found” even though their .db exists on disk.
  3. Conversation DBs become heavily fragmented (about 60% free space inside pages, with an empty freelist). Periodic compaction, or a size warning in the UI, would help.
  4. The auto-updater produces an UnhandledPromiseRejectionWarning when it cannot create its cache directory.
    I can share the full crash snapshots privately if that helps.

Update: 2.28.2 also crashes, but much less often (1 crash in ~2 h of heavy agent use, vs every few minutes on 2.29.0) — and this time the language server printed a clean Go panic, which points at the trajectory size:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x50 pc=0x7ff6fc989d4a]

goroutine 193282 [running]:
.../protobuf/v2/internal/impl/impl.mergeStringNoZero              (merge_gen.go:191)
.../protobuf/v2/internal/impl/impl.(*MessageInfo).mergePointer    (merge.go:79)
.../protobuf/v2/internal/impl/impl.mergeMessageSlice              (merge.go:179)
...
.../protobuf/v2/proto/proto.Clone                                 (merge.go:70)
.../jetski/cortex/trajectory/dbtrajectory.(*dbTrajectory).toProtoLocked   (dbtrajectory.go:1365)
.../jetski/cortex/trajectory/dbtrajectory.(*dbTrajectory).ToReadProto     (dbtrajectory.go:648)
.../agentexecutor.(*AgentExecutor).getTrajectorySegment(..., 0x13cee, 0x839d, ...)   (telemetry.go:21)
.../agentexecutor.(*AgentExecutor).recordTelemetryAfterExecution                      (telemetry.go:62)
.../agentexecutor.(*AgentExecutor).Run.func2                                          (agentexecutor.go:315)

The segment indices are 0x13cee = 81,134 and 0x839d = 33,693 — the conversation has ~81k steps, so after every agent run the telemetry path proto.Clone()s tens of thousands of steps and hits a nil pointer in the middle of the copy. It looks like the same underlying weakness (huge trajectories going through protobuf copy/decode) that 2.29.0 turned from occasional into constant.

Suggestions: bound the telemetry segment size (or skip cloning when it exceeds a limit), and recover() in that goroutine so a telemetry failure cannot take down the whole language server.

Second 2.28.2 crash (~7 h after the first), different call site but same operation — proto.Clone on trajectory data while the agent is running:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x1 addr=0x9 pc=0x7ff6fc989cf1]
.../protobuf/v2/internal/impl/impl.mergeString                     (merge_gen.go:187)
...
.../protobuf/v2/proto/proto.Clone                                  (merge.go:70)
.../jetski/cortex/trajectory/dbtrajectory.(*dbTrajectory).ExecutorMetadata             (dbtrajectory.go:851)
.../agent_state_component.buildFullTrajectoryUpdate                                     (agent_state.go:871)
.../agent_state_component.(*AgentState).buildFullStateUpdateLocked                      (agent_state.go:1299)
.../agent_state_component.(*AgentState).Updates                                         (agent_state.go:267)
.../agentexecutor.(*AgentExecutor).startMessageWatcherLocked.func2.1                    (runstatehelpers.go:152)

Two different callers (telemetry in the first trace, the agent-state watcher here), both crashing inside proto.Clone with a garbage pointer (addr=0x9 / 0x50). This looks like a data race: the trajectory/executor metadata is being mutated by the running agent while another goroutine clones it. With an ~81k-step trajectory each clone is huge, so the race window is wide, which would explain why crash frequency scales with conversation size (and why 2.29.0’s extra copies/decodes made it near-constant). Running the language server under -race on a long trajectory should reproduce it.

Hi @Diego_Silva,

Welcome to the Forum,

Thank you for the thorough debugging across all three posts and for capturing the Go panic stack traces in proto.Clone (dbtrajectory.go:1365 and dbtrajectory.go:851) alongside the google_arena_unsafe.go:174 crash signatures on 80k-step conversation databases.

  • 1. Update from v2.29.0 to v2.31.0: Please remove the pending updater block file and update to the latest Antigravity App (v2.31.0) from the Download page (Changelog), which shipped significant performance and memory improvements for large conversation histories, many artifacts, and app startup (v2.30.0–v2.31.0).
  • 2. Keep active conversation step counts bounded: When a single .db file in ~/.gemini/antigravity/conversations/ grows past ~50,000–80,000 steps (>500 MB), archiving that completed .db file and starting a New Conversation prevents multi-gigabyte Go heap allocations during state updates and Remote Control sync.

Please let us know if you still see any language_server.exe crashes after updating to v2.31.0.