Utility process crash (SIGSEGV, use-after-free in bundled @parcel/watcher) on Linux

Environment: Antigravity IDE 1.107.0 (Electron 39.2.3), Arch Linux (Omarchy) kernel 7.2.5, standalone Linux install under ~/.local/opt/antigravity-ide.

What happened: A background utility process crashed with SIGSEGV during normal use (the editor stayed open – this is a Node.js utility subprocess, not the main window). The command line shows it is the node.mojom.NodeService utility process. The main IDE window and other processes kept running; no visible data loss.

Root cause, from a symbolized core dump: The crash is inside the bundled @parcel/watcher v2.5.1 native module (resources/app/node_modules/@parcel/watcher/build/Release/watcher.node), which ships unstripped. The crashing frame, symbol-resolved via gdb:

std::_Sp_counted_deleter<DirTree*, DirTreeDeleter, std::allocator<void>, __gnu_cxx::_Lock_policy::_S_atomic>::_M_dispose()

  mov (%r10),%r8      ; load a DirTree pointer from the shared_ptr control block
  test %r8,%r8
  je   <skip>          ; null check passes
  mov (%r8),%r12       ; SIGSEGV here

At the time of the fault, register r8 held the value 0xbadbad00badbad00 – a non-null but invalid pointer, consistent with a freed/poisoned DirTree pointer. This looks like a use-after-free: a shared_ptr control block was disposed with a DirTree pointer that had already been freed elsewhere, likely a race during directory-tree teardown/rebuild in the watcher’s Linux/inotify backend.

The app binary and watcher.node are both dated 2026-08-13 (unchanged for weeks), so this is not tied to a recent update – it’s a latent bug in the bundled watcher version that got triggered by some filesystem event.

Repro: No isolated repro yet – happened during normal editing/file-watching activity on a workspace.

Ask: Since this crashes inside the vendored parcel-bundler/watcher release 2.5.1, it may be worth checking whether a newer release fixes a known DirTree use-after-free, or filing upstream if not already tracked.

Hi @Shawn_Skaggs ,

Thank you for taking the time to analyze the core dump and share the gdb trace for the bundled @parcel/watcher (v2.5.1) module on Linux.

Since your installation version is 1.107.0, could you please update to the latest Antigravity IDE (v2.5.5) release from Google Antigravity - Download, which includes the latest background process and session stability improvements.

Please let us know if you run into any further issues after updating.

Still crashing on 2.6.0: same module, same fault offset (twice)

I’m seeing what looks like the same crash on Linux, and it is not fixed in the version suggested above.

Environment

- Ubuntu 26.04 LTS, GNOME, kernel 7.0

- Antigravity IDE ideVersion 2.6.0 (from product.json; the VS Code base version in package.json is 1.107.0)

- Bundled @parcel/watcher is still 2.5.1 (resources/app/node_modules/@parcel/watcher/package.json)

What happens

The node.mojom.NodeService utility process dies with SIGSEGV. Two crashes within about 11 minutes, with the same kernel trap line each time except for the load address:

traps: antigravity-ide[…] general protection fault ip:… sp:… error:0 in watcher.node[40775,…+4e000]

Both crashes fault at watcher.node + 0x40775, so this looks like a repeatable bug in the module, not random corruption. There were 12 crashes of this program in the journal since mid-October, so it is not a one-off. Others are SIGTRAP (int3) in the main binary, which may be a different problem.

What I ruled out

- Memory: no OOM kill during these crashes

- inotify limits: fs.inotify.max_user_watches = 524288, max_user_instances = 1024

What I could not do

I have no symbolized backtrace for my cores (frame 0 is unresolved, n/a), so I can’t confirm the DirTree use-after-free described in this thread. The matching module and the same crash type are why I think it is the same bug.

Questions

1. Can you confirm whether 2.6.0 ships a newer @parcel/watcher? On my install it is still 2.5.1.

2. The Arch AUR package for antigravity-ide replaces the bundled watcher with 2.5.6, and says 2.5.1 has a teardown race that 2.5.6 fixes (parcel-bundler/watcher#216). Could the bundled module be updated the same way?

I can provide the full journal entries or the kernel trap lines if useful.

Summary

On Linux x86_64, the Antigravity IDE 2.7.0 file-watcher utility process (--type=utility --utility-sub-type=node.mojom.NodeService) crashes with SIGTRAP (signal 5) during process exit (e.g., on window reload or close).

This is the same root cause previously reported for 2.6.0 in google-antigravity/antigravity-cli#1475 (still reproducible in 2.7.0), manifesting here as a Chromium PartitionAlloc double-free trap (SIGTRAP) instead of SIGSEGV.

Environment

  • Antigravity IDE: 2.7.0 (version: 1.107.0, distro: 0c7d350c3a9e8639ea238cc996ec4f6dcf1e35cd)
  • Runtime: Electron 39.2.3 / Chromium 142.0.7444.175
  • OS: Linux x86_64 (Ubuntu 26.04)
  • Bundled @parcel/watcher: 2.5.1 (parcel-bundler/watcher#1ca032aa8339260a8a3bcf825c3a1a71e3e43542, watcher.node BuildID 18d1f697cfcc5d8e4239227c3bed33f2f96b696b)

Technical Details

  • The crashing utility process has resources/app/node_modules/@parcel/watcher/build/Release/watcher.node as its only loaded native addon.
  • Process terminates with trap int3 at ELF file offset 0x6cf6e22 (VMA 0x6cf7e22) in the antigravity-ide binary, inside PartitionAlloc’s DoubleFreeDetected handler (a 0x70-byte slot already present on the slot-span freelist at entrypos = 50, InSlotMetadata refcount 0, zapped with 0xef).
  • In @parcel/watcher 2.5.1 (watcher.node), static destruction order (LIFO in __cxa_finalize) triggers a double-free on exit:
    1. sharedBackends (_GLOBAL__sub_I_Backend.cc) is registered via __cxa_atexit at module load time, while function-local dirTreeCache()::cache is registered lazily on first watch.
    2. On exit, dirTreeCache()::cache::~unordered_map() runs first, zeroes _M_element_count, and frees _M_buckets (watcher.node+0x3fc6d) without resetting _M_buckets, _M_bucket_count, or the static guard variable.
    3. Next, sharedBackends destroys InotifyBackend (~InotifyBackend()), releasing InotifySubscription → DirTree, which invokes DirTreeDeleter::operator()(DirTree*) (watcher.node+0x40280).
    4. After deleting DirTree, DirTreeDeleter observes dirTreeCache()::cache._M_element_count == 0 (watcher.node+0x40452) and calls rehash(0) → _Hashtable::_M_rehash() (watcher.node+0x40130), which calls operator delete(_M_buckets, _M_bucket_count * 8) (watcher.node+0x401da) a second time on the already-freed bucket array.

Suggested Fix

Upgrade @parcel/watcher in resources/app/package.json from parcel-bundler/watcher#1ca032aa8339260a8a3bcf825c3a1a71e3e43542 (2.5.1) to >= 2.5.2 (e.g., ^2.5.6 as used by upstream VS Code, or 2.6.0), which includes the static-destruction-order fix from parcel-bundler/watcher#216 (9c895798e3).


Update (Antigravity IDE 2.8.0): Still unfixed in 2.8.0 (version: 1.107.0, commit 8dc5315afe097a21a6cb38dda76edc0835dfabfa, build date 2026-11-19T00:10:16.000Z). resources/app/package.json still pins @parcel/watcher to parcel-bundler/watcher#1ca032aa8339260a8a3bcf825c3a1a71e3e43542 (2.5.1) and ships the identical watcher.node binary (BuildID 18d1f697cfcc5d8e4239227c3bed33f2f96b696b).