Skip to content

Daemon OOMs (~4 GB heap) on small project during startup catch-up sync; stale daemon.pid + OS PID reuse then blocks all daemon restarts (unlock does not help) #1553

Closed

Description

@hcg1023

Summary

Two related problems observed with v1.5.0 (latest) on macOS (Apple Silicon):

  1. The background daemon crashes with FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory — 178 times in this project's daemon.log — on a small project (524 indexed files, ~22 MB codegraph.db). Memory balloons to the default ~4 GB heap cap during what looks like the startup catch-up sync, usually ~20–30 s after the daemon starts.
  2. After the daemon dies it leaves stale daemon.pid / daemon.sock / lock files behind. If the OS later reuses the dead daemon's PID for an unrelated process, the daemon liveness check (PID exists ⇒ daemon alive) is permanently wrong: every new daemon exits with Another daemon (pid …) already holds the lock; exiting, and codegraph unlock does not fix it.

Environment

  • codegraph 1.5.0 (latest on npm), installed globally via pnpm (bundled node from @colbymchenry/codegraph-darwin-arm64)
  • macOS, Apple Silicon
  • Project: React Native 0.84 app (iOS/Android/HarmonyOS), 524 indexed files, codegraph.db ≈ 22 MB; status --json reports pendingChanges: 0, index state complete — the index itself is healthy

Bug 1 — daemon OOM during startup catch-up sync

Typical crash pattern (most entries look like this — heap pinned at the ~4 GB default cap ~20–30 s after daemon start):

[44485:0xa4380c000]  21323 ms: Scavenge (interleaved) 4041.6 (4058.8) -> 4041.6 (4105.8) MB … allocation failure
[44485:0xa4380c000]  23695 ms: Mark-Compact (reduce) 4041.6 (4105.8) -> 4041.6 (4044.0) MB …
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

The first daemon in the log survived ~21 minutes before its first OOM (1260216 ms into the run) — consistent with the OOM being triggered by a large catch-up sync rather than steady-state serving. My hypothesis: a mass file-change event (e.g. npm install / patch-package touching many files under node_modules) makes the watcher enqueue a huge change set that is then processed in memory all at once; the watcher appears to follow the whole project tree including node_modules even though the index excludes it.

Workaround I verified — raising the heap cap makes the same startup sync survive:

NODE_OPTIONS=--max-old-space-size=12288 codegraph serve --mcp …

With 12 GB: the startup sync balloons to ~3.6 GB RSS, then completes and exits cleanly; the daemon settles at ~230 MB RSS, queries work, and no new FATALs occur. So this looks like a legitimately large transient allocation (or a leak confined to the sync pass) rather than a steady-state leak. Either way, ~4 GB for a 524-file project's sync seems well worth a look (streaming/chunking the change set, or excluding node_modules from the watcher).

Bug 2 — stale daemon.pid + OS PID reuse permanently blocks daemon startup; unlock doesn't help

After an OOM crash the daemon left daemon.pid (containing 54444), daemon.sock, and a lock file. Later, macOS assigned pid 54444 to a completely unrelated system process (cloudd). From then on:

  • Every daemon start logs [CodeGraph daemon] Another daemon (pid 54444) already holds the lock; exiting. (28 occurrences) — and this kept happening even after codegraph unlock removed the lock file, because the liveness check appears to be "does the pid in daemon.pid exist" (a bare kill(pid, 0)/process-exists check succeeds against cloudd).
  • codegraph daemons reports the phantom daemon as real: pid 54444 v1.5.0 up 5358m …
  • codegraph serve --mcp (spawned by editor/agent integrations at session start) can never become ready, so MCP clients just time out.

Only manual cleanup recovers:

rm .codegraph/daemon.pid .codegraph/daemon.sock
codegraph unlock

Suggestions

  • Verify daemon liveness by process identity (match the process command line / binary path against the codegraph install, or probe daemon.sock with a handshake) instead of relying on PID existence — PIDs get reused by the OS all the time.
  • Have codegraph unlock (or daemon startup) also invalidate daemon.pid / daemon.sock when the pid fails identity verification.
  • Consider a crash/exit handler that cleans up daemon.pid / daemon.sock / lock on exit.

Happy to provide the full 2.1 MB daemon.log if useful — it contains all 178 OOM stack traces.

Activity

  1. colbymchenry commented on Aug 20, 2026

    @colbymchenry
    Owner

    The second half of this report — the stale daemon.pid + OS PID reuse permanently blocking daemon restarts — is fixed in #1562 (thanks @danusha2345): daemon management now proves a recorded process is really a CodeGraph daemon via its socket handshake before trusting or signaling it, a reused PID can never wedge startup or be signaled by mistake, and codegraph unlock clears stale daemon artifacts too. That ships in the next release.

    The first half — the daemon OOMing at the ~4 GB heap cap during startup catch-up sync on a 524-file project — is still unexplained and stays open here. The 178 crash logs you captured are exactly the right evidence; if you can share one more thing, it would help a lot: the tail of .codegraph/daemon.log from daemon start to the first OOM (the phase labels would tell us whether it dies in scan, parse, store, or resolution), and whether CODEGRAPH_PARSE_WORKERS=1 changes the behavior. The upcoming release also fixes a related class of recovery-sync failures (#1541, #1558) that could have been compounding the churn on that machine.

  2. hcg1023 commented on Aug 21, 2026

    @hcg1023
    Author

    Thanks for the #1562 fix — that matches what we captured exactly (the recycled PID had been handed to cloudd, codegraph daemons kept reporting the phantom as healthy, and every new serve --mcp died on the lock). For what it's worth, both of our daemons are dead again right now with stale registry entries — still on 1.5.0 here, so expected until the release lands.

    Phase where it dies: resolution

    The daemon log itself never prints phase labels before the crash — crash-loop cycles go straight from Listening on to the GC dump with nothing in between (the one long-lived daemon that survived 21 minutes only ever printed per-file auto-sync lines). But codegraph sync runs the same pipeline in the foreground and does print phase labels, and it reproduces the crash deterministically.

    Default env (reproduces; crash signature matches the daemon's — GC offsets 19–23 s after start, heap pinned at ~4.03 GB, same Ineffective mark-compacts FATAL):

    ┌  Syncing CodeGraph
    Scanning files...
    Parsing code...
    Resolving refs...
    
    <--- Last few GCs --->
    
    [74940:0x8bb40c000]    20912 ms: Scavenge (interleaved) 4033.9 (4051.1) -> 4033.9 (4098.1) MB, pooled: 0 MB ... allocation failure
    [74940:0x8bb40c000]    22753 ms: Mark-Compact (reduce) 4034.0 (4098.1) -> 4034.0 (4036.3) MB ...
    FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
    

    CODEGRAPH_PARSE_WORKERS=1: no change. Same phase (Resolving refs...), same ~4 GB, same ~21 s to FATAL.

    The working set just barely exceeds the default heap cap

    With NODE_OPTIONS=--max-old-space-size=12288, the identical sync completes:

    Scanning files...
    Resolving refs...
    Linking dynamic dispatch...
    │
    ●  Already up to date
    └  Done        (exit 0)
    

    Peak RSS of the sync child process: 4.34 GB — resolution on this project builds a >4 GB structure, so the default ~4 GB heap cap makes it a guaranteed OOM rather than an unbounded leak.

    Two details that may help narrow it down:

    • This completing run reported "Already up to date" — zero pending changes. Touch-ing ~60k files (mtime only, content unchanged) doesn't register in pendingChanges either, yet the full scan→resolve pipeline still ran and still needed the full 4.34 GB. So the resolution working set appears to be rebuilt from scratch on every sync regardless of the change count — it never gets a chance to be incremental.
    • Per-file scale: 613 indexed files / 7,750 nodes / 16,690 edges today (524 files when the issue was filed) → roughly 7 MB of heap per indexed file just to resolve refs.

    RSS trajectory of the OOMing child (default env): 5 s → 1.8 GB, 10 s → 3.7 GB, 16 s → 4.1 GB, dead at ~26 s.

    Requested daemon.log tail (start → first OOM)

    Last complete cycle in the current log, sanitized (paths masked). Note the zero phase lines between Listening on and the GC dump:

    .codegraph/daemon.log — last start→OOM cycle (pid 35455, native stack truncated at 42 frames)
    [CodeGraph daemon] Listening on ~/<project-root>/.codegraph/daemon.sock (pid 35455, v1.5.0). Idle timeout 300000ms.
    [CodeGraph MCP] File watcher active — graph will auto-sync on changes
    [CodeGraph MCP] Query pool: up to 9 worker thread(s) for concurrent reads.
    
    <--- Last few GCs --->
    
    [35455:0xb1140c000]    21786 ms: Scavenge (interleaved) 4050.3 (4067.4) -> 4050.3 (4114.4) MB, pooled: 0 MB, 29.38 / 0.00 ms  (average mu = 0.216, current mu = 0.180) allocation failure; 
    [35455:0xb1140c000]    24099 ms: Mark-Compact (reduce) 4050.4 (4114.4) -> 4050.4 (4052.6) MB, pooled: 0 MB, 2064.25 / 0.00 ms  (+ 0.2 ms in 2 steps since start of marking, biggest step 0.1 ms, walltime since start of marking 2069 ms) (average mu = 0.179, 
    FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
    ----- Native stack trace -----
    
     1: 0x1005ce0fc node::OOMErrorHandler(char const*, v8::OOMDetails const&) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
     2: 0x10082a4b8 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
     3: 0x100a898a4 v8::internal::Heap::stack() [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
     4: 0x100a8cc78 v8::internal::Heap::HasLowYoungGenerationAllocationRate() [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
     5: 0x100a9de6c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1::operator()() const [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
     6: 0x100a9d740 void heap::base::Stack::SetMarkerAndCallbackImpl<v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1>(heap::base::Stack*, void*, void const*) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
     7: 0x101452538 PushAllRegistersAndIterateStack [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
     8: 0x100a875a8 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
     9: 0x1009fef6c v8::internal::StackGuard::HandleInterrupts(v8::internal::StackGuard::InterruptLevel) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    10: 0x100eed250 v8::internal::Runtime_HandleNoHeapWritesInterrupts(int, unsigned long*, v8::internal::Isolate*) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    11: 0x101542234 Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    12: 0x124431c9c 
    13: 0x1014a4bec Builtins_InterpreterEntryTrampoline [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    14: 0x1014a4bec Builtins_InterpreterEntryTrampoline [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    15: 0x1014a4bec Builtins_InterpreterEntryTrampoline [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    16: 0x1244202d0 
    17: 0x1244af5c0 
    18: 0x1244b505c 
    19: 0x12441c624 
    20: 0x124429888 
    21: 0x1014a4bec Builtins_InterpreterEntryTrampoline [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    22: 0x1014a4bec Builtins_InterpreterEntryTrampoline [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    23: 0x1014e37e8 Builtins_AsyncFunctionAwaitResolveClosure [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    24: 0x1015b8e58 Builtins_PromiseFulfillReactionJob [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    25: 0x1014d2bd0 Builtins_RunMicrotasks [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    26: 0x1014a27b0 Builtins_JSRunMicrotasksEntry [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    27: 0x1009cda4c v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    28: 0x1009ce2c0 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    29: 0x1009ce3fc v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    30: 0x1009fd1d0 v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    31: 0x1009fdb30 v8::internal::MicrotaskQueue::PerformCheckpoint(v8::Isolate*) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    32: 0x1004af0b8 node::InternalCallbackScope::Close() [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    33: 0x1004af3b0 node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context, v8::Local<v8::Value>) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    34: 0x1004c7dd0 node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    35: 0x10062b620 node::worker::MessagePort::OnMessage(node::worker::MessagePort::MessageProcessingMode) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    36: 0x101481874 uv__async_io [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    37: 0x10149616c uv__io_poll [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    38: 0x1014821c8 uv_run [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    39: 0x1004b06a8 node::SpinEventLoopInternal(node::Environment*) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    40: 0x10062700c node::NodeMainInstance::Run() [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    41: 0x10057ad14 node::Start(int, char**) [~/Library/pnpm/store/v11/links/@colbymchenry/codegraph-darwin-arm64/1.5.0/3fbd10f47f53a8ad4473f5c02660690c832c7128717b77a13edf37fbca883174/node_modules/@colbymchenry/codegraph-darwin-arm64/node]
    42: 0x18c6afe00 start [/usr/lib/dyld]
    

    Environment

    • codegraph 1.5.0 (bundled binary from @colbymchenry/codegraph-darwin-arm64 1.5.0, system Node v24.8.0)
    • macOS, Apple M1 Pro, 32 GB RAM
    • React Native project, 6.3 GB node_modules, 613 indexed files

    Workaround for anyone hitting this in the meantime: raise the heap for the daemon, e.g. NODE_OPTIONS=--max-old-space-size=8192 in the environment that spawns it — measured peak is 4.34 GB here, so 6–8 GB is comfortable at this project size. That's obviously just papering over the per-sync 4 GB resolution cost.

  3. hcg1023 commented on Aug 21, 2026

    @hcg1023
    Author

    Correction to our previous comment, plus new measurements — two of our earlier claims were wrong, and the experiments below replace them with a cleaner picture.

    What we got wrong

    1. "the resolution working set appears to be rebuilt from scratch on every sync regardless of the change count" — not true. An incremental sync with one real content change completes in 389 ms / 3 nodes with no memory load and no resolution rebuild. The full resolution pass only runs on a full re-index or a daemon catch-up with accumulated changes — which is exactly the crash-loop scenario, so the practical conclusion survived, but the mechanism was misstated.
    2. The "~7 MB of heap per indexed file" framing was misleading — the cost is the full resolution pass over this project's ref mix, not a per-indexed-file ratio (see the comparison project below, which would contradict any such ratio).

    Also a small correction to the workaround sizing: the catch-up path peaked at 4.34 GB, but a full re-index peaked at 6.49 GB — --max-old-space-size=8192 is fine for catch-ups, but go higher (we used 12288) if you re-index.

    New measurements (1.5.0, M1 Pro / 32 GB, heap raised so nothing dies mid-run)

    Scenario Resolution-phase peak RSS Outcome
    Full codegraph index (default) 6.49 GB exit 0
    Full codegraph index + CODEGRAPH_NO_PARALLEL_RESOLVE=1 6.41 GB exit 0 — the resolver pool is not the driver; the memory sits on the main thread
    Catch-up sync (the OOM path) 4.34 GB exit 0
    Incremental sync, 1 real file change ~0 389 ms, "Synced 1 changed files"

    Side note: pendingChanges is content-hash based — touching ~60k files by mtime alone registers as zero pending.

    So the OOM is precisely: full resolution pass working set (4–6.5 GB on this project) vs the default ~4 GB heap cap, triggered by full re-index or daemon restart with pending churn. Steady-state incremental syncs never approach it.

    Dependency directories are not involved

    This is a React Native HarmonyOS (RNOH) project, so besides node_modules (6.3 GB) it also has harmony/oh_modules (76,964 files / 1.1 GB), ios/Pods (9,862 files), and android build outputs (3.2 GB). None of them are indexed (0 rows in files/nodes; the harmony/ entries in the index are 30 hand-written .ets files), and none are read during indexing — lsof sampled across scan/parse/resolve/link of a full index shows 0 fds into node_modules / oh_modules / Pods at every resolution-phase sample. (The only 2 node_modules hits were CodeGraph's own pnpm-store runtime files during linking.)

    What the full pass is actually resolving

    The 613 indexed files total 3 MB on disk (largest 50 KB — no giant-file effect) and are multi-language: 231 .tsx / 224 .ts / 49 .py / 35 .ets / 31 .js / 14 .kt / 10 .h / 5 .cpp / 4 .mm / 1 .swift. Unresolved refs: 22,399, all status='failed', regenerated by every full extract — tsx 10,720 / ts 6,337 / js 2,263 / py 1,430 / arkts 778 / kotlin 506 / objc 237 / cpp 76 / swift 52 (~36 refs per indexed file).

    For comparison, another project on this machine (3,090 files, 35,616 nodes, 56,966 unresolved refs — plain Vue/TS, ~18 refs/file) indexes and catches up fine under the default heap and has never OOM'd once. So it's not ref count, not file count, not node_modules — it's the per-ref cost of this project's language mix (the ArkTS/Kotlin/ObjC/Swift resolution machinery plus a heavy tsx share) that turns the pass into multi-GB.

    What we couldn't pin down

    We tried NODE_OPTIONS='--heap-prof'; profiles were only written for bootstrap-sized isolates (largest 25 MB total self-size, top frames readFileSync / rowToNode @ queries.js / sqlite-adapter all), so the multi-GB allocations landed in an isolate that never wrote a profile (or the bundled binary doesn't honor NODE_OPTIONS there). Naming the exact structure will need instrumentation on your side — happy to run any flags/build you want to point us at.

  4. danusha2345 commented on Aug 21, 2026

    @danusha2345
    Contributor

    I pushed an opt-in diagnostic build that samples the main-thread resolver every 250 refs without logging paths or symbol names:

    It reports RSS/heap plus the live sizes of every resolver LRU, method-owner/kind index, deferred-ref list, receiver-inference/regex memo, and import/export memo. This should distinguish a tracked cache retaining the 4–6.5 GB from allocation outside those structures.

    I validated the probe locally on:

    • a 221-file stress corpus with 66k failed resolution attempts;
    • three public RNOH/RN projects;
    • 195 focused resolution/batched-cleanup tests.

    Could you run this against the affected project?

    git clone --depth 1 --branch diagnostic/1553-resolver-memory \
      https://github.com/danusha2345/codegraph.git codegraph-1553
    cd codegraph-1553
    npm ci
    npm run build
    
    /usr/bin/time -l env \
      CODEGRAPH_NO_PARALLEL_RESOLVE=1 \
      CODEGRAPH_PARSE_WORKERS=1 \
      CODEGRAPH_RESOLVE_MEMORY=250 \
      NODE_OPTIONS=--max-old-space-size=12288 \
      node dist/bin/codegraph.js index /path/to/affected/project \
      2>resolve-memory.log

    Please attach resolve-memory.log. The probe logs only language, reference kind, file extension, reference-name length, aggregate cache counts, and memory totals — no file paths or reference names.

    Local evidence has already ruled out raw ref count, resolver workers, parse-worker lifetime, and the global compiled-regex memo as sufficient causes. The first few samples where heap jumps should identify the retaining structure or show that it sits below/outside the tracked JS caches.

  5. hcg1023 commented on Aug 22, 2026

    @hcg1023
    Author

    Ran the diagnostic build (10f164f, current HEAD of the branch — one commit past eb11399) against the affected project with your exact command. The full resolve-memory.log is inlined below (137 probe lines, no file paths or symbol names).

    Probe verdict: the 4–6.5 GB sits entirely outside every tracked structure. All LRU / owner-index / memo counts stay tiny for the whole run; extMem never exceeds 62 MiB, yet heap jumps from 45 MiB to 5.42 GB in a single sampling interval (between refs=3250 and refs=3500, ~4.5 s in — the first ArkTS batch). CODEGRAPH_NO_PARALLEL_RESOLVE=1 unchanged, matching your earlier local exclusions.

    We then chased the jump independently with an fs spy (preloaded --require patch logging every readFileSync) plus a heap snapshot taken at the moment of the blow-up:

    • The heap snapshot contains one live 287 MiB string of gzip-compressed binary garbage (starts \x1f\x8b); everything else totals ~65 MB — i.e. ~95% of the 5.7 GB heapUsed is churn around that string, not a retained cache.
    • The spy shows exactly one culprit read on the main thread at the jump: readFileSync of node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har → 289,606,387-byte string (152 MB gzip decoded as utf-8). One earlier failed probe of <same path>/oh-package.json5 (~2 s before) shows the resolver first treating the .har as a package directory.
    • Why it resolves there: our harmony/entry/oh-package.json5 declares "@rnoh/react-native-openharmony": "file:../../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har" — standard for RNOH projects, the npm package ships the HarmonyOS archive as a file: dependency target. The ohpm workspace machinery maps the ref to the .har and the resolver ends up reading the archive itself as text.
    • Binary-search confirmation on a mirror copy (symlinking one dir at a time): node_modules present → reproduces (3.7 GB peak, same first-ArkTS-batch jump); oh_modules (1.1 GB unpacked) or ios/Pods alone → no jump (350 MiB); neither → 438 MiB. So it's precisely this one file inside node_modules, not ref count, not dependency-dir size.

    Suggested guards (any one would fix us): in the resolver's content-cache read path, skip files by magic bytes (gzip/zip) or a size cap (e.g. >10 MB), and/or treat an ohpm file: target that is a file rather than a directory as external — never read it as entry text.

    Happy to run any follow-up probe builds.

    resolve-memory.log (full, 137 lines)
    [resolve-memory-boundary] before-warm batch=0 candidateItems=0 candidateChars=0 rss=346MiB heap=26/37MiB extMem=61MiB
    [resolve-memory-boundary] after-warm batch=0 candidateItems=0 candidateChars=0 rss=346MiB heap=21/38MiB extMem=61MiB
    [resolve-memory-boundary] initial-batch-read batch=5000 candidateItems=0 candidateChars=0 rss=347MiB heap=26/38MiB extMem=61MiB
    [resolve-memory] refs=250 lang=python kind=calls ext=.py nameLen=3 rss=349MiB heap=34/57MiB extMem=61MiB lru=node:5,file:483,imports:5,reexports:0,name:79,lower:23,qname:14,lines:5,methods:1 ownerIndexes=1/1/1 kinds=1/343 deferred=0/0 patterns=9 infer=19 importMemos=15/0/0/0
    [resolve-memory] refs=500 lang=python kind=imports ext=.py nameLen=10 rss=349MiB heap=36/58MiB extMem=61MiB lru=node:9,file:488,imports:10,reexports:0,name:170,lower:41,qname:26,lines:9,methods:3 ownerIndexes=3/1/1 kinds=1/343 deferred=0/0 patterns=18 infer=34 importMemos=73/0/0/0
    [resolve-memory] refs=750 lang=python kind=calls ext=.py nameLen=5 rss=349MiB heap=37/58MiB extMem=61MiB lru=node:11,file:489,imports:11,reexports:0,name:226,lower:42,qname:38,lines:11,methods:7 ownerIndexes=7/5/5 kinds=1/343 deferred=0/0 patterns=26 infer=51 importMemos=96/0/0/0
    [resolve-memory] refs=1000 lang=javascript kind=calls ext=.js nameLen=12 rss=350MiB heap=39/58MiB extMem=61MiB lru=node:15,file:502,imports:24,reexports:0,name:281,lower:54,qname:55,lines:15,methods:12 ownerIndexes=12/11/11 kinds=1/343 deferred=0/0 patterns=36 infer=78 importMemos=115/0/0/0
    [resolve-memory] refs=1250 lang=python kind=calls ext=.py nameLen=14 rss=350MiB heap=40/58MiB extMem=61MiB lru=node:17,file:504,imports:26,reexports:0,name:364,lower:81,qname:73,lines:17,methods:12 ownerIndexes=12/11/11 kinds=1/343 deferred=0/0 patterns=46 infer=119 importMemos=128/0/0/0
    [resolve-memory] refs=1500 lang=python kind=calls ext=.py nameLen=19 rss=352MiB heap=33/97MiB extMem=61MiB lru=node:19,file:506,imports:28,reexports:0,name:404,lower:92,qname:84,lines:19,methods:13 ownerIndexes=13/11/11 kinds=1/343 deferred=0/0 patterns=52 infer=143 importMemos=136/0/0/0
    [resolve-memory] refs=1750 lang=python kind=imports ext=.py nameLen=2 rss=352MiB heap=34/97MiB extMem=61MiB lru=node:20,file:508,imports:30,reexports:0,name:436,lower:97,qname:89,lines:20,methods:13 ownerIndexes=13/11/11 kinds=1/343 deferred=0/0 patterns=52 infer=155 importMemos=148/0/0/0
    [resolve-memory] refs=2000 lang=python kind=calls ext=.py nameLen=5 rss=352MiB heap=35/97MiB extMem=61MiB lru=node:23,file:510,imports:32,reexports:0,name:452,lower:97,qname:92,lines:23,methods:15 ownerIndexes=15/13/13 kinds=1/343 deferred=0/0 patterns=53 infer=166 importMemos=166/0/0/0
    [resolve-memory] refs=2250 lang=javascript kind=calls ext=.mjs nameLen=12 rss=352MiB heap=37/97MiB extMem=61MiB lru=node:27,file:513,imports:38,reexports:0,name:483,lower:104,qname:99,lines:27,methods:15 ownerIndexes=15/13/13 kinds=1/343 deferred=0/1 patterns=54 infer=184 importMemos=196/0/0/0
    [resolve-memory] refs=2500 lang=kotlin kind=calls ext=.kt nameLen=19 rss=352MiB heap=38/98MiB extMem=61MiB lru=node:30,file:513,imports:41,reexports:0,name:605,lower:140,qname:163,lines:30,methods:19 ownerIndexes=19/13/13 kinds=1/343 deferred=0/1 patterns=73 infer=220 importMemos=197/0/0/0
    [resolve-memory] refs=2750 lang=kotlin kind=imports ext=.kt nameLen=69 rss=353MiB heap=40/98MiB extMem=61MiB lru=node:36,file:513,imports:47,reexports:0,name:731,lower:189,qname:240,lines:36,methods:27 ownerIndexes=27/14/14 kinds=1/343 deferred=4/1 patterns=91 infer=260 importMemos=197/0/0/0
    [resolve-memory] refs=3000 lang=kotlin kind=calls ext=.kt nameLen=21 rss=353MiB heap=42/98MiB extMem=61MiB lru=node:40,file:513,imports:51,reexports:0,name:854,lower:225,qname:309,lines:40,methods:30 ownerIndexes=30/15/15 kinds=1/343 deferred=6/1 patterns=115 infer=327 importMemos=197/0/0/0
    [resolve-memory] refs=3250 lang=cpp kind=calls ext=.cpp nameLen=25 rss=354MiB heap=45/99MiB extMem=61MiB lru=node:44,file:526,imports:68,reexports:0,name:957,lower:247,qname:372,lines:44,methods:30 ownerIndexes=30/15/15 kinds=1/343 deferred=6/1 patterns=122 infer=368 importMemos=246/0/0/0
    [resolve-memory] refs=3500 lang=arkts kind=references ext=.ets nameLen=3 rss=5293MiB heap=5422/5537MiB extMem=34MiB lru=node:64,file:542,imports:78,reexports:6,name:1064,lower:327,qname:380,lines:46,methods:30 ownerIndexes=30/15/15 kinds=1/343 deferred=6/1 patterns=126 infer=375 importMemos=307/21/18/13
    [resolve-memory] refs=3750 lang=arkts kind=calls ext=.ets nameLen=15 rss=5299MiB heap=5431/5537MiB extMem=34MiB lru=node:75,file:553,imports:84,reexports:11,name:1171,lower:395,qname:400,lines:50,methods:31 ownerIndexes=31/15/15 kinds=1/343 deferred=6/1 patterns=136 infer=385 importMemos=334/51/24/14
    [resolve-memory] refs=4000 lang=objc kind=calls ext=.mm nameLen=37 rss=5304MiB heap=5432/5538MiB extMem=34MiB lru=node:78,file:560,imports:94,reexports:11,name:1242,lower:415,qname:419,lines:54,methods:31 ownerIndexes=31/15/15 kinds=1/343 deferred=6/1 patterns=144 infer=398 importMemos=345/53/26/16
    [resolve-memory] refs=4250 lang=swift kind=imports ext=.swift nameLen=5 rss=5306MiB heap=5433/5538MiB extMem=34MiB lru=node:79,file:564,imports:101,reexports:11,name:1454,lower:467,qname:471,lines:54,methods:38 ownerIndexes=32/17/17 kinds=1/343 deferred=14/1 patterns=168 infer=398 importMemos=345/53/26/16
    [resolve-memory] refs=4500 lang=javascript kind=calls ext=.js nameLen=16 rss=5307MiB heap=5434/5538MiB extMem=34MiB lru=node:81,file:568,imports:106,reexports:11,name:1516,lower:491,qname:482,lines:56,methods:38 ownerIndexes=32/17/17 kinds=1/343 deferred=14/1 patterns=174 infer=419 importMemos=355/53/26/16
    [resolve-memory] refs=4750 lang=javascript kind=calls ext=.js nameLen=7 rss=5308MiB heap=5436/5538MiB extMem=34MiB lru=node:82,file:569,imports:107,reexports:12,name:1532,lower:492,qname:482,lines:57,methods:38 ownerIndexes=32/17/17 kinds=1/343 deferred=14/1 patterns=174 infer=431 importMemos=360/61/27/16
    [resolve-memory] refs=5000 lang=javascript kind=calls ext=.js nameLen=23 rss=5310MiB heap=5438/5538MiB extMem=34MiB lru=node:84,file:571,imports:109,reexports:13,name:1548,lower:493,qname:483,lines:59,methods:38 ownerIndexes=32/17/17 kinds=1/343 deferred=14/1 patterns=174 infer=445 importMemos=367/65/28/16
    [resolve-memory] refs=5250 lang=javascript kind=calls ext=.js nameLen=9 rss=5331MiB heap=5446/5539MiB extMem=34MiB lru=node:84,file:571,imports:109,reexports:13,name:1555,lower:495,qname:485,lines:59,methods:38 ownerIndexes=32/17/17 kinds=1/343 deferred=14/1 patterns=174 infer=447 importMemos=367/66/28/16
    [resolve-memory] refs=5500 lang=javascript kind=calls ext=.js nameLen=6 rss=5332MiB heap=5447/5539MiB extMem=34MiB lru=node:88,file:575,imports:113,reexports:13,name:1581,lower:501,qname:490,lines:63,methods:38 ownerIndexes=32/17/17 kinds=1/343 deferred=14/1 patterns=176 infer=462 importMemos=378/69/28/16
    [resolve-memory] refs=5750 lang=javascript kind=calls ext=.js nameLen=6 rss=5334MiB heap=5449/5539MiB extMem=34MiB lru=node:90,file:579,imports:117,reexports:14,name:1600,lower:504,qname:493,lines:65,methods:38 ownerIndexes=32/17/17 kinds=1/343 deferred=14/1 patterns=177 infer=472 importMemos=384/79/29/16
    [resolve-memory] refs=6000 lang=javascript kind=calls ext=.js nameLen=4 rss=5335MiB heap=5450/5539MiB extMem=34MiB lru=node:93,file:583,imports:121,reexports:16,name:1637,lower:511,qname:500,lines:68,methods:38 ownerIndexes=32/17/17 kinds=1/343 deferred=14/1 patterns=181 infer=491 importMemos=392/86/31/16
    [resolve-memory] refs=6250 lang=javascript kind=calls ext=.js nameLen=6 rss=5337MiB heap=5452/5539MiB extMem=34MiB lru=node:93,file:584,imports:122,reexports:17,name:1676,lower:515,qname:504,lines:68,methods:38 ownerIndexes=32/17/17 kinds=1/343 deferred=14/1 patterns=182 infer=515 importMemos=395/90/32/16
    [resolve-memory] refs=6500 lang=javascript kind=calls ext=.js nameLen=6 rss=5339MiB heap=5453/5540MiB extMem=34MiB lru=node:94,file:584,imports:122,reexports:17,name:1678,lower:516,qname:505,lines:69,methods:38 ownerIndexes=32/17/17 kinds=1/343 deferred=14/1 patterns=182 infer=518 importMemos=398/108/32/16
    [resolve-memory] refs=6750 lang=typescript kind=references ext=.ts nameLen=16 rss=5341MiB heap=5455/5540MiB extMem=34MiB lru=node:95,file:584,imports:123,reexports:17,name:1742,lower:542,qname:530,lines:70,methods:38 ownerIndexes=32/17/17 kinds=1/343 deferred=14/1 patterns=189 infer=540 importMemos=413/111/32/16
    [resolve-memory] refs=7000 lang=arkts kind=calls ext=.ets nameLen=13 rss=5344MiB heap=5457/5540MiB extMem=34MiB lru=node:96,file:585,imports:124,reexports:17,name:1808,lower:570,qname:547,lines:71,methods:38 ownerIndexes=32/17/17 kinds=1/343 deferred=14/19 patterns=195 infer=552 importMemos=438/113/32/16
    [resolve-memory] refs=7250 lang=tsx kind=imports ext=.tsx nameLen=16 rss=5353MiB heap=5463/5541MiB extMem=34MiB lru=node:117,file:585,imports:125,reexports:17,name:1886,lower:597,qname:576,lines:71,methods:38 ownerIndexes=32/17/17 kinds=1/343 deferred=14/19 patterns=198 infer=568 importMemos=468/127/37/127
    [resolve-memory] refs=7500 lang=tsx kind=references ext=.tsx nameLen=6 rss=5360MiB heap=5471/5542MiB extMem=34MiB lru=node:210,file:585,imports:125,reexports:17,name:1991,lower:597,qname:669,lines:71,methods:38 ownerIndexes=32/17/17 kinds=1/343 deferred=14/19 patterns=198 infer=568 importMemos=561/133/42/161
    [resolve-memory] refs=7750 lang=typescript kind=calls ext=.ts nameLen=15 rss=5365MiB heap=5473/5542MiB extMem=34MiB lru=node:213,file:585,imports:127,reexports:17,name:2007,lower:605,qname:675,lines:74,methods:38 ownerIndexes=32/17/17 kinds=1/343 deferred=14/19 patterns=202 infer=572 importMemos=566/235/144/299
    [resolve-memory] refs=8000 lang=typescript kind=imports ext=.ts nameLen=24 rss=5368MiB heap=5474/5542MiB extMem=34MiB lru=node:216,file:585,imports:129,reexports:17,name:2029,lower:611,qname:683,lines:75,methods:41 ownerIndexes=34/21/21 kinds=1/343 deferred=14/19 patterns=206 infer=578 importMemos=570/242/146/322
    [resolve-memory] refs=8250 lang=typescript kind=calls ext=.ts nameLen=10 rss=5369MiB heap=5475/5542MiB extMem=34MiB lru=node:220,file:585,imports:131,reexports:17,name:2051,lower:620,qname:695,lines:78,methods:42 ownerIndexes=35/22/22 kinds=1/343 deferred=14/19 patterns=209 infer=583 importMemos=575/255/147/335
    [resolve-memory] refs=8500 lang=typescript kind=references ext=.ts nameLen=16 rss=5370MiB heap=5476/5542MiB extMem=34MiB lru=node:228,file:585,imports:137,reexports:17,name:2061,lower:621,qname:706,lines:81,methods:43 ownerIndexes=36/23/23 kinds=1/343 deferred=14/19 patterns=210 infer=587 importMemos=587/270/152/466
    [resolve-memory] refs=8750 lang=typescript kind=references ext=.ts nameLen=12 rss=5378MiB heap=5421/5542MiB extMem=34MiB lru=node:234,file:585,imports:145,reexports:17,name:2113,lower:622,qname:717,lines:88,methods:45 ownerIndexes=38/24/24 kinds=1/343 deferred=14/19 patterns=213 infer=654 importMemos=606/296/154/476
    [resolve-memory] refs=9000 lang=typescript kind=calls ext=.ts nameLen=9 rss=5377MiB heap=5422/5542MiB extMem=34MiB lru=node:237,file:585,imports:151,reexports:17,name:2147,lower:626,qname:721,lines:94,methods:45 ownerIndexes=38/24/24 kinds=1/343 deferred=14/19 patterns=216 infer=691 importMemos=617/308/154/476
    [resolve-memory] refs=9250 lang=typescript kind=calls ext=.ts nameLen=9 rss=5379MiB heap=5425/5543MiB extMem=34MiB lru=node:238,file:585,imports:155,reexports:17,name:2185,lower:626,qname:722,lines:97,methods:45 ownerIndexes=38/24/24 kinds=1/343 deferred=14/19 patterns=216 infer=762 importMemos=625/343/154/476
    [resolve-memory] refs=9500 lang=typescript kind=calls ext=.ts nameLen=4 rss=5380MiB heap=5426/5543MiB extMem=34MiB lru=node:243,file:585,imports:159,reexports:17,name:2215,lower:631,qname:732,lines:99,methods:47 ownerIndexes=40/25/25 kinds=1/343 deferred=14/19 patterns=219 infer=785 importMemos=629/349/157/490
    [resolve-memory] refs=9750 lang=typescript kind=calls ext=.ts nameLen=17 rss=5376MiB heap=5427/5543MiB extMem=34MiB lru=node:248,file:585,imports:168,reexports:18,name:2257,lower:648,qname:748,lines:104,methods:50 ownerIndexes=42/25/25 kinds=1/343 deferred=14/19 patterns=224 infer=794 importMemos=643/358/160/498
    [resolve-memory] refs=10000 lang=tsx kind=calls ext=.tsx nameLen=9 rss=5350MiB heap=5433/5543MiB extMem=34MiB lru=node:263,file:585,imports:176,reexports:38,name:2318,lower:678,qname:768,lines:109,methods:51 ownerIndexes=43/25/25 kinds=1/343 deferred=14/19 patterns=229 infer=806 importMemos=697/372/178/653
    [resolve-memory] refs=10250 lang=tsx kind=references ext=.tsx nameLen=4 rss=5358MiB heap=5442/5544MiB extMem=34MiB lru=node:271,file:585,imports:183,reexports:38,name:2381,lower:703,qname:786,lines:111,methods:53 ownerIndexes=44/25/25 kinds=1/343 deferred=14/19 patterns=237 infer=813 importMemos=729/381/183/678
    [resolve-memory] refs=10500 lang=tsx kind=calls ext=.tsx nameLen=7 rss=5360MiB heap=5444/5545MiB extMem=34MiB lru=node:275,file:585,imports:188,reexports:38,name:2418,lower:724,qname:794,lines:114,methods:53 ownerIndexes=44/25/25 kinds=1/343 deferred=14/19 patterns=242 infer=821 importMemos=761/382/184/682
    [resolve-memory] refs=10750 lang=tsx kind=calls ext=.tsx nameLen=11 rss=5361MiB heap=5445/5545MiB extMem=34MiB lru=node:282,file:585,imports:197,reexports:38,name:2455,lower:736,qname:803,lines:118,methods:53 ownerIndexes=44/25/25 kinds=1/343 deferred=14/19 patterns=246 infer=826 importMemos=796/389/187/692
    [resolve-memory] refs=11000 lang=tsx kind=imports ext=.tsx nameLen=5 rss=5362MiB heap=5446/5545MiB extMem=34MiB lru=node:284,file:585,imports:204,reexports:38,name:2487,lower:750,qname:814,lines:121,methods:56 ownerIndexes=47/25/25 kinds=1/343 deferred=14/19 patterns=248 infer=837 importMemos=819/394/188/693
    [resolve-memory] refs=11250 lang=tsx kind=calls ext=.tsx nameLen=21 rss=5363MiB heap=5447/5545MiB extMem=34MiB lru=node:286,file:585,imports:208,reexports:38,name:2524,lower:762,qname:828,lines:124,methods:56 ownerIndexes=47/25/25 kinds=1/343 deferred=14/19 patterns=258 infer=849 importMemos=841/395/188/693
    [resolve-memory] refs=11500 lang=tsx kind=calls ext=.tsx nameLen=7 rss=5364MiB heap=5448/5545MiB extMem=34MiB lru=node:289,file:585,imports:211,reexports:38,name:2535,lower:765,qname:838,lines:127,methods:56 ownerIndexes=47/25/25 kinds=1/343 deferred=14/19 patterns=258 infer=852 importMemos=859/395/188/693
    [resolve-memory] refs=11750 lang=tsx kind=imports ext=.tsx nameLen=5 rss=5364MiB heap=5448/5545MiB extMem=34MiB lru=node:289,file:585,imports:212,reexports:38,name:2551,lower:769,qname:842,lines:127,methods:56 ownerIndexes=47/25/25 kinds=1/343 deferred=14/19 patterns=262 infer=857 importMemos=859/395/188/693
    [resolve-memory] refs=12000 lang=tsx kind=calls ext=.tsx nameLen=19 rss=5365MiB heap=5449/5545MiB extMem=34MiB lru=node:297,file:585,imports:217,reexports:38,name:2557,lower:772,qname:851,lines:133,methods:56 ownerIndexes=47/25/25 kinds=1/343 deferred=14/19 patterns=263 infer=864 importMemos=880/395/188/693
    [resolve-memory] refs=12250 lang=tsx kind=imports ext=.tsx nameLen=19 rss=5366MiB heap=5451/5545MiB extMem=34MiB lru=node:304,file:585,imports:222,reexports:38,name:2583,lower:788,qname:857,lines:137,methods:56 ownerIndexes=47/25/25 kinds=1/343 deferred=14/19 patterns=265 infer=871 importMemos=912/399/191/708
    [resolve-memory] refs=12500 lang=typescript kind=imports ext=.ts nameLen=20 rss=5367MiB heap=5452/5545MiB extMem=34MiB lru=node:307,file:585,imports:229,reexports:38,name:2600,lower:796,qname:861,lines:141,methods:56 ownerIndexes=47/25/25 kinds=1/343 deferred=14/19 patterns=267 infer=881 importMemos=934/399/191/708
    [resolve-memory] refs=12750 lang=typescript kind=calls ext=.ts nameLen=4 rss=5368MiB heap=5453/5545MiB extMem=34MiB lru=node:319,file:585,imports:233,reexports:38,name:2635,lower:801,qname:877,lines:144,methods:56 ownerIndexes=47/25/25 kinds=1/343 deferred=14/19 patterns=271 infer=885 importMemos=955/415/200/754
    [resolve-memory] refs=13000 lang=typescript kind=calls ext=.ts nameLen=25 rss=5369MiB heap=5453/5545MiB extMem=34MiB lru=node:319,file:585,imports:233,reexports:38,name:2635,lower:801,qname:877,lines:144,methods:56 ownerIndexes=47/25/25 kinds=1/343 deferred=14/19 patterns=271 infer=885 importMemos=955/415/200/754
    [resolve-memory] refs=13250 lang=typescript kind=calls ext=.ts nameLen=8 rss=5370MiB heap=5454/5546MiB extMem=34MiB lru=node:322,file:585,imports:236,reexports:38,name:2661,lower:808,qname:888,lines:145,methods:56 ownerIndexes=47/25/25 kinds=1/343 deferred=14/19 patterns=278 infer=894 importMemos=963/417/202/757
    [resolve-memory] refs=13500 lang=typescript kind=calls ext=.ts nameLen=8 rss=5370MiB heap=5454/5546MiB extMem=34MiB lru=node:326,file:585,imports:238,reexports:38,name:2667,lower:809,qname:892,lines:146,methods:56 ownerIndexes=47/25/25 kinds=1/343 deferred=14/19 patterns=279 infer=895 importMemos=967/427/205/767
    [resolve-memory] refs=13750 lang=typescript kind=calls ext=.ts nameLen=6 rss=5371MiB heap=5455/5546MiB extMem=34MiB lru=node:330,file:585,imports:241,reexports:38,name:2675,lower:810,qname:896,lines:147,methods:56 ownerIndexes=47/25/25 kinds=1/343 deferred=14/19 patterns=280 infer=896 importMemos=972/434/208/775
    [resolve-memory] refs=14000 lang=typescript kind=calls ext=.ts nameLen=14 rss=5371MiB heap=5455/5546MiB extMem=34MiB lru=node:332,file:585,imports:243,reexports:38,name:2678,lower:810,qname:898,lines:147,methods:56 ownerIndexes=47/25/25 kinds=1/343 deferred=14/19 patterns=280 infer=896 importMemos=975/438/210/780
    [resolve-memory] refs=14250 lang=typescript kind=calls ext=.ts nameLen=6 rss=5371MiB heap=5456/5546MiB extMem=34MiB lru=node:333,file:585,imports:245,reexports:38,name:2684,lower:811,qname:902,lines:148,methods:63 ownerIndexes=49/29/29 kinds=1/343 deferred=14/19 patterns=281 infer=897 importMemos=980/445/210/780
    [resolve-memory] refs=14500 lang=typescript kind=calls ext=.ts nameLen=1 rss=5372MiB heap=5457/5546MiB extMem=34MiB lru=node:335,file:585,imports:247,reexports:38,name:2695,lower:811,qname:904,lines:148,methods:71 ownerIndexes=57/29/29 kinds=1/343 deferred=14/19 patterns=283 infer=897 importMemos=984/451/212/795
    [resolve-memory] refs=14750 lang=tsx kind=imports ext=.tsx nameLen=4 rss=5374MiB heap=5459/5546MiB extMem=34MiB lru=node:348,file:585,imports:257,reexports:38,name:2745,lower:816,qname:934,lines:150,methods:71 ownerIndexes=57/29/29 kinds=1/343 deferred=14/19 patterns=286 infer=901 importMemos=1045/469/224/808
    [resolve-memory] refs=15000 lang=tsx kind=calls ext=.tsx nameLen=8 rss=5375MiB heap=5460/5546MiB extMem=34MiB lru=node:350,file:585,imports:262,reexports:38,name:2757,lower:821,qname:952,lines:151,methods:71 ownerIndexes=57/29/29 kinds=1/343 deferred=14/19 patterns=286 infer=903 importMemos=1099/483/226/824
    [resolve-memory] refs=15250 lang=tsx kind=imports ext=.tsx nameLen=12 rss=5380MiB heap=5469/5547MiB extMem=34MiB lru=node:352,file:585,imports:265,reexports:38,name:2786,lower:834,qname:963,lines:153,methods:71 ownerIndexes=57/29/29 kinds=1/343 deferred=14/19 patterns=290 infer=912 importMemos=1131/487/227/828
    [resolve-memory] refs=15500 lang=typescript kind=calls ext=.ts nameLen=17 rss=5363MiB heap=5470/5547MiB extMem=34MiB lru=node:353,file:585,imports:270,reexports:38,name:2838,lower:854,qname:990,lines:157,methods:72 ownerIndexes=58/29/29 kinds=1/343 deferred=14/19 patterns=302 infer=928 importMemos=1157/492/228/831
    [resolve-memory] refs=15750 lang=typescript kind=calls ext=.ts nameLen=15 rss=5364MiB heap=5471/5548MiB extMem=34MiB lru=node:353,file:585,imports:277,reexports:38,name:2875,lower:866,qname:1005,lines:161,methods:73 ownerIndexes=59/31/31 kinds=1/343 deferred=14/19 patterns=310 infer=940 importMemos=1167/496/228/831
    [resolve-memory] refs=16000 lang=typescript kind=instantiates ext=.ts nameLen=3 rss=5355MiB heap=5472/5548MiB extMem=34MiB lru=node:354,file:585,imports:282,reexports:38,name:2929,lower:875,qname:1016,lines:164,methods:77 ownerIndexes=61/31/31 kinds=1/343 deferred=14/19 patterns=319 infer=955 importMemos=1182/504/229/837
    [resolve-memory] refs=16250 lang=typescript kind=calls ext=.ts nameLen=6 rss=5355MiB heap=5472/5548MiB extMem=34MiB lru=node:358,file:585,imports:289,reexports:38,name:2940,lower:877,qname:1024,lines:165,methods:77 ownerIndexes=61/31/31 kinds=1/343 deferred=14/19 patterns=320 infer=957 importMemos=1189/520/233/869
    [resolve-memory] refs=16500 lang=typescript kind=calls ext=.ts nameLen=19 rss=5356MiB heap=5473/5548MiB extMem=34MiB lru=node:362,file:585,imports:291,reexports:38,name:2950,lower:881,qname:1030,lines:167,methods:77 ownerIndexes=61/31/31 kinds=1/343 deferred=14/19 patterns=322 infer=961 importMemos=1216/525/235/878
    [resolve-memory] refs=16750 lang=tsx kind=calls ext=.tsx nameLen=7 rss=5356MiB heap=5474/5548MiB extMem=34MiB lru=node:364,file:585,imports:293,reexports:38,name:2966,lower:886,qname:1036,lines:168,methods:77 ownerIndexes=61/31/31 kinds=1/343 deferred=14/19 patterns=325 infer=965 importMemos=1221/528/236/881
    [resolve-memory] refs=17000 lang=typescript kind=calls ext=.ts nameLen=6 rss=5357MiB heap=5474/5548MiB extMem=34MiB lru=node:367,file:585,imports:296,reexports:38,name:2980,lower:891,qname:1042,lines:169,methods:77 ownerIndexes=61/31/31 kinds=1/343 deferred=14/19 patterns=328 infer=970 importMemos=1231/536/238/899
    [resolve-memory] refs=17250 lang=typescript kind=references ext=.ts nameLen=6 rss=5358MiB heap=5476/5548MiB extMem=34MiB lru=node:369,file:585,imports:300,reexports:38,name:3029,lower:910,qname:1063,lines:172,methods:77 ownerIndexes=61/31/31 kinds=1/343 deferred=14/19 patterns=332 infer=977 importMemos=1255/548/239/902
    [resolve-memory] refs=17500 lang=typescript kind=calls ext=.ts nameLen=17 rss=5355MiB heap=5477/5549MiB extMem=34MiB lru=node:373,file:585,imports:303,reexports:38,name:3059,lower:917,qname:1075,lines:175,methods:77 ownerIndexes=61/31/31 kinds=1/343 deferred=14/19 patterns=334 infer=986 importMemos=1276/551/240/903
    [resolve-memory] refs=17750 lang=typescript kind=calls ext=.ts nameLen=8 rss=5356MiB heap=5478/5549MiB extMem=34MiB lru=node:375,file:585,imports:308,reexports:38,name:3089,lower:922,qname:1085,lines:179,methods:77 ownerIndexes=61/31/31 kinds=1/343 deferred=14/19 patterns=340 infer=997 importMemos=1305/563/242/922
    [resolve-memory] refs=18000 lang=typescript kind=calls ext=.ts nameLen=10 rss=5357MiB heap=5478/5549MiB extMem=34MiB lru=node:379,file:585,imports:311,reexports:38,name:3108,lower:927,qname:1093,lines:181,methods:77 ownerIndexes=61/31/31 kinds=1/343 deferred=14/19 patterns=343 infer=1004 importMemos=1323/571/244/934
    [resolve-memory] refs=18250 lang=tsx kind=imports ext=.tsx nameLen=15 rss=5358MiB heap=5480/5549MiB extMem=34MiB lru=node:384,file:585,imports:316,reexports:38,name:3149,lower:940,qname:1107,lines:185,methods:78 ownerIndexes=62/31/31 kinds=1/343 deferred=14/19 patterns=343 infer=1019 importMemos=1348/577/248/950
    [resolve-memory] refs=18500 lang=tsx kind=imports ext=.tsx nameLen=24 rss=5359MiB heap=5481/5549MiB extMem=34MiB lru=node:392,file:585,imports:321,reexports:38,name:3170,lower:948,qname:1121,lines:189,methods:78 ownerIndexes=62/31/31 kinds=1/343 deferred=14/19 patterns=347 infer=1032 importMemos=1384/583/249/952
    [resolve-memory] refs=18750 lang=tsx kind=imports ext=.tsx nameLen=11 rss=5361MiB heap=5483/5549MiB extMem=34MiB lru=node:396,file:585,imports:324,reexports:38,name:3192,lower:955,qname:1135,lines:192,methods:78 ownerIndexes=62/31/31 kinds=1/343 deferred=14/19 patterns=350 infer=1042 importMemos=1431/595/252/960
    [resolve-memory] refs=19000 lang=tsx kind=imports ext=.tsx nameLen=24 rss=5369MiB heap=5432/5556MiB extMem=34MiB lru=node:400,file:585,imports:328,reexports:38,name:3213,lower:963,qname:1153,lines:196,methods:79 ownerIndexes=62/31/31 kinds=1/343 deferred=14/19 patterns=356 infer=1055 importMemos=1460/604/254/968
    [resolve-memory] refs=19250 lang=tsx kind=imports ext=.tsx nameLen=12 rss=5369MiB heap=5433/5556MiB extMem=34MiB lru=node:402,file:585,imports:333,reexports:38,name:3223,lower:965,qname:1162,lines:200,methods:79 ownerIndexes=62/31/31 kinds=1/343 deferred=14/19 patterns=357 infer=1064 importMemos=1501/615/255/973
    [resolve-memory] refs=19500 lang=tsx kind=imports ext=.tsx nameLen=17 rss=5369MiB heap=5435/5556MiB extMem=34MiB lru=node:404,file:585,imports:337,reexports:38,name:3250,lower:975,qname:1174,lines:204,methods:79 ownerIndexes=62/31/31 kinds=1/343 deferred=14/19 patterns=360 infer=1074 importMemos=1535/619/256/975
    [resolve-memory] refs=19750 lang=tsx kind=imports ext=.tsx nameLen=23 rss=5369MiB heap=5436/5556MiB extMem=34MiB lru=node:407,file:585,imports:339,reexports:38,name:3265,lower:978,qname:1187,lines:205,methods:79 ownerIndexes=62/31/31 kinds=1/343 deferred=14/19 patterns=362 infer=1080 importMemos=1568/626/261/981
    [resolve-memory] refs=20000 lang=tsx kind=calls ext=.tsx nameLen=7 rss=5369MiB heap=5437/5556MiB extMem=34MiB lru=node:410,file:585,imports:339,reexports:38,name:3285,lower:985,qname:1198,lines:206,methods:80 ownerIndexes=62/31/31 kinds=1/343 deferred=14/19 patterns=365 infer=1086 importMemos=1581/643/264/988
    [resolve-memory] refs=20250 lang=tsx kind=function_ref ext=.tsx nameLen=7 rss=5373MiB heap=5447/5557MiB extMem=34MiB lru=node:419,file:594,imports:343,reexports:47,name:3301,lower:992,qname:1212,lines:208,methods:82 ownerIndexes=64/31/31 kinds=1/343 deferred=14/19 patterns=367 infer=1094 importMemos=1623/656/274/991
    [resolve-memory] refs=20500 lang=tsx kind=imports ext=.tsx nameLen=9 rss=5373MiB heap=5449/5557MiB extMem=34MiB lru=node:419,file:594,imports:348,reexports:47,name:3316,lower:997,qname:1221,lines:212,methods:84 ownerIndexes=66/31/31 kinds=1/343 deferred=14/19 patterns=368 infer=1105 importMemos=1686/666/275/994
    [resolve-memory] refs=20750 lang=tsx kind=calls ext=.tsx nameLen=11 rss=5373MiB heap=5450/5557MiB extMem=34MiB lru=node:420,file:594,imports:350,reexports:47,name:3335,lower:1002,qname:1233,lines:215,methods:84 ownerIndexes=66/31/31 kinds=1/343 deferred=14/19 patterns=369 infer=1115 importMemos=1740/676/276/998
    [resolve-memory] refs=21000 lang=tsx kind=imports ext=.tsx nameLen=13 rss=5373MiB heap=5452/5557MiB extMem=34MiB lru=node:420,file:594,imports:354,reexports:47,name:3337,lower:1002,qname:1236,lines:218,methods:84 ownerIndexes=66/31/31 kinds=1/343 deferred=14/19 patterns=369 infer=1122 importMemos=1796/682/277/1000
    [resolve-memory] refs=21250 lang=tsx kind=calls ext=.tsx nameLen=4 rss=5373MiB heap=5453/5557MiB extMem=34MiB lru=node:422,file:594,imports:359,reexports:47,name:3348,lower:1009,qname:1245,lines:222,methods:84 ownerIndexes=66/31/31 kinds=1/343 deferred=14/19 patterns=369 infer=1130 importMemos=1834/685/278/1003
    [resolve-memory] refs=21500 lang=tsx kind=imports ext=.tsx nameLen=16 rss=5374MiB heap=5454/5557MiB extMem=34MiB lru=node:424,file:594,imports:363,reexports:47,name:3362,lower:1014,qname:1255,lines:225,methods:84 ownerIndexes=66/31/31 kinds=1/343 deferred=14/19 patterns=370 infer=1138 importMemos=1874/690/278/1003
    [resolve-memory] refs=21750 lang=tsx kind=imports ext=.tsx nameLen=9 rss=5374MiB heap=5456/5557MiB extMem=34MiB lru=node:425,file:594,imports:365,reexports:47,name:3390,lower:1024,qname:1267,lines:227,methods:84 ownerIndexes=66/31/31 kinds=1/343 deferred=14/19 patterns=373 infer=1152 importMemos=1913/694/279/1007
    [resolve-memory] refs=22000 lang=tsx kind=calls ext=.tsx nameLen=3 rss=5374MiB heap=5457/5557MiB extMem=34MiB lru=node:425,file:594,imports:366,reexports:47,name:3416,lower:1032,qname:1276,lines:229,methods:84 ownerIndexes=66/31/31 kinds=1/343 deferred=14/19 patterns=376 infer=1164 importMemos=1932/705/279/1007
    [resolve-memory] refs=22250 lang=tsx kind=imports ext=.tsx nameLen=9 rss=5374MiB heap=5458/5557MiB extMem=34MiB lru=node:425,file:594,imports:370,reexports:47,name:3443,lower:1040,qname:1285,lines:232,methods:85 ownerIndexes=66/31/31 kinds=1/343 deferred=14/19 patterns=378 infer=1178 importMemos=1976/707/279/1007
    [resolve-memory] refs=22500 lang=tsx kind=calls ext=.tsx nameLen=11 rss=5374MiB heap=5459/5558MiB extMem=34MiB lru=node:425,file:594,imports:373,reexports:47,name:3464,lower:1049,qname:1293,lines:236,methods:85 ownerIndexes=66/31/31 kinds=1/343 deferred=14/19 patterns=381 infer=1191 importMemos=2015/710/279/1007
    [resolve-memory] refs=22750 lang=tsx kind=imports ext=.tsx nameLen=17 rss=5374MiB heap=5461/5558MiB extMem=34MiB lru=node:427,file:594,imports:376,reexports:47,name:3479,lower:1055,qname:1305,lines:238,methods:85 ownerIndexes=66/31/31 kinds=1/343 deferred=14/19 patterns=384 infer=1207 importMemos=2062/716/281/1010
    [resolve-memory] refs=23000 lang=tsx kind=imports ext=.tsx nameLen=17 rss=5375MiB heap=5463/5558MiB extMem=34MiB lru=node:430,file:594,imports:380,reexports:48,name:3524,lower:1071,qname:1325,lines:241,methods:89 ownerIndexes=67/31/31 kinds=1/343 deferred=14/19 patterns=389 infer=1222 importMemos=2099/733/284/1018
    [resolve-memory] refs=23250 lang=tsx kind=calls ext=.tsx nameLen=6 rss=5375MiB heap=5464/5558MiB extMem=34MiB lru=node:434,file:594,imports:383,reexports:48,name:3544,lower:1073,qname:1332,lines:245,methods:89 ownerIndexes=67/31/31 kinds=1/343 deferred=14/19 patterns=390 infer=1232 importMemos=2146/744/287/1025
    [resolve-memory] refs=23500 lang=tsx kind=calls ext=.tsx nameLen=16 rss=5375MiB heap=5465/5558MiB extMem=34MiB lru=node:437,file:594,imports:386,reexports:48,name:3550,lower:1073,qname:1338,lines:247,methods:89 ownerIndexes=67/31/31 kinds=1/343 deferred=14/19 patterns=390 infer=1238 importMemos=2157/747/288/1030
    [resolve-memory] refs=23750 lang=tsx kind=calls ext=.tsx nameLen=10 rss=5375MiB heap=5466/5559MiB extMem=34MiB lru=node:438,file:594,imports:391,reexports:48,name:3571,lower:1082,qname:1349,lines:250,methods:90 ownerIndexes=68/31/31 kinds=1/343 deferred=14/19 patterns=393 infer=1249 importMemos=2191/751/288/1030
    [resolve-memory] refs=24000 lang=tsx kind=imports ext=.tsx nameLen=24 rss=5376MiB heap=5467/5559MiB extMem=34MiB lru=node:439,file:594,imports:395,reexports:48,name:3586,lower:1088,qname:1358,lines:254,methods:90 ownerIndexes=68/31/31 kinds=1/343 deferred=14/19 patterns=395 infer=1262 importMemos=2245/756/288/1030
    [resolve-memory] refs=24250 lang=tsx kind=references ext=.tsx nameLen=25 rss=5376MiB heap=5468/5559MiB extMem=34MiB lru=node:441,file:595,imports:399,reexports:49,name:3593,lower:1090,qname:1363,lines:257,methods:90 ownerIndexes=68/31/31 kinds=1/343 deferred=14/19 patterns=395 infer=1271 importMemos=2291/762/289/1030
    [resolve-memory] refs=24500 lang=tsx kind=calls ext=.tsx nameLen=15 rss=5376MiB heap=5470/5559MiB extMem=34MiB lru=node:441,file:595,imports:403,reexports:49,name:3604,lower:1093,qname:1370,lines:261,methods:90 ownerIndexes=68/31/31 kinds=1/343 deferred=14/19 patterns=396 infer=1282 importMemos=2348/766/290/1035
    [resolve-memory] refs=24750 lang=tsx kind=calls ext=.tsx nameLen=19 rss=5376MiB heap=5472/5559MiB extMem=34MiB lru=node:441,file:595,imports:406,reexports:49,name:3625,lower:1102,qname:1379,lines:265,methods:90 ownerIndexes=68/31/31 kinds=1/343 deferred=14/19 patterns=398 infer=1295 importMemos=2396/767/290/1035
    [resolve-memory] refs=25000 lang=tsx kind=imports ext=.tsx nameLen=30 rss=5376MiB heap=5473/5559MiB extMem=34MiB lru=node:443,file:595,imports:412,reexports:49,name:3634,lower:1105,qname:1383,lines:270,methods:90 ownerIndexes=68/31/31 kinds=1/343 deferred=14/19 patterns=398 infer=1304 importMemos=2448/772/291/1039
    [resolve-memory] refs=25250 lang=tsx kind=calls ext=.tsx nameLen=6 rss=5380MiB heap=5480/5560MiB extMem=34MiB lru=node:444,file:595,imports:413,reexports:49,name:3672,lower:1120,qname:1398,lines:272,methods:90 ownerIndexes=68/31/31 kinds=1/343 deferred=14/19 patterns=400 infer=1317 importMemos=2480/781/292/1044
    [resolve-memory] refs=25500 lang=tsx kind=imports ext=.tsx nameLen=8 rss=5380MiB heap=5481/5560MiB extMem=34MiB lru=node:444,file:595,imports:418,reexports:49,name:3676,lower:1122,qname:1402,lines:276,methods:90 ownerIndexes=68/31/31 kinds=1/343 deferred=14/19 patterns=400 infer=1327 importMemos=2521/781/292/1044
    [resolve-memory] refs=25750 lang=tsx kind=imports ext=.tsx nameLen=29 rss=5380MiB heap=5483/5560MiB extMem=34MiB lru=node:446,file:595,imports:421,reexports:49,name:3700,lower:1131,qname:1414,lines:279,methods:91 ownerIndexes=69/31/31 kinds=1/343 deferred=14/19 patterns=403 infer=1342 importMemos=2563/786/295/1054
    [resolve-memory] refs=26000 lang=typescript kind=calls ext=.ts nameLen=6 rss=5380MiB heap=5484/5560MiB extMem=34MiB lru=node:450,file:595,imports:425,reexports:49,name:3725,lower:1141,qname:1430,lines:283,methods:91 ownerIndexes=69/31/31 kinds=1/343 deferred=14/19 patterns=409 infer=1353 importMemos=2575/791/295/1054
    [resolve-memory] refs=26250 lang=tsx kind=calls ext=.tsx nameLen=11 rss=5380MiB heap=5485/5560MiB extMem=34MiB lru=node:452,file:595,imports:428,reexports:49,name:3755,lower:1151,qname:1441,lines:287,methods:92 ownerIndexes=69/31/31 kinds=1/343 deferred=14/19 patterns=415 infer=1362 importMemos=2609/797/296/1058
    [resolve-memory] refs=26500 lang=tsx kind=calls ext=.tsx nameLen=17 rss=5380MiB heap=5486/5560MiB extMem=34MiB lru=node:456,file:595,imports:431,reexports:49,name:3778,lower:1160,qname:1452,lines:290,methods:92 ownerIndexes=69/31/31 kinds=1/343 deferred=14/19 patterns=417 infer=1374 importMemos=2650/801/300/1064
    [resolve-memory] refs=26750 lang=tsx kind=imports ext=.tsx nameLen=8 rss=5381MiB heap=5488/5560MiB extMem=34MiB lru=node:456,file:595,imports:435,reexports:49,name:3791,lower:1164,qname:1458,lines:293,methods:92 ownerIndexes=69/31/31 kinds=1/343 deferred=14/19 patterns=418 infer=1384 importMemos=2693/805/301/1068
    [resolve-memory] refs=27000 lang=tsx kind=calls ext=.tsx nameLen=8 rss=5381MiB heap=5489/5561MiB extMem=34MiB lru=node:456,file:595,imports:439,reexports:49,name:3799,lower:1167,qname:1461,lines:298,methods:92 ownerIndexes=69/31/31 kinds=1/343 deferred=14/19 patterns=419 infer=1394 importMemos=2750/809/302/1072
    [resolve-memory] refs=27250 lang=tsx kind=references ext=.tsx nameLen=17 rss=5381MiB heap=5490/5561MiB extMem=34MiB lru=node:456,file:595,imports:442,reexports:49,name:3811,lower:1172,qname:1466,lines:300,methods:94 ownerIndexes=70/31/31 kinds=1/343 deferred=14/19 patterns=422 infer=1404 importMemos=2804/812/302/1072
    [resolve-memory] refs=27500 lang=tsx kind=imports ext=.tsx nameLen=39 rss=5381MiB heap=5492/5561MiB extMem=34MiB lru=node:457,file:595,imports:446,reexports:49,name:3818,lower:1174,qname:1472,lines:304,methods:94 ownerIndexes=70/31/31 kinds=1/343 deferred=14/19 patterns=423 infer=1413 importMemos=2850/813/303/1077
    [resolve-memory] refs=27750 lang=tsx kind=references ext=.tsx nameLen=14 rss=5381MiB heap=5493/5561MiB extMem=34MiB lru=node:457,file:595,imports:448,reexports:49,name:3823,lower:1177,qname:1476,lines:307,methods:95 ownerIndexes=70/31/31 kinds=1/343 deferred=14/19 patterns=424 infer=1427 importMemos=2894/822/303/1077
    [resolve-memory] refs=28000 lang=tsx kind=calls ext=.tsx nameLen=8 rss=5381MiB heap=5494/5561MiB extMem=34MiB lru=node:459,file:595,imports:450,reexports:49,name:3843,lower:1183,qname:1486,lines:309,methods:95 ownerIndexes=70/31/31 kinds=1/343 deferred=14/19 patterns=427 infer=1437 importMemos=2938/830/305/1087
    [resolve-memory] refs=28250 lang=tsx kind=calls ext=.tsx nameLen=8 rss=5381MiB heap=5495/5561MiB extMem=34MiB lru=node:459,file:595,imports:451,reexports:49,name:3857,lower:1189,qname:1493,lines:310,methods:95 ownerIndexes=70/31/31 kinds=1/343 deferred=14/19 patterns=428 infer=1443 importMemos=2958/832/305/1087
    [resolve-memory] refs=28500 lang=tsx kind=imports ext=.tsx nameLen=21 rss=5387MiB heap=5442/5567MiB extMem=34MiB lru=node:460,file:595,imports:454,reexports:49,name:3872,lower:1194,qname:1496,lines:312,methods:95 ownerIndexes=70/31/31 kinds=1/343 deferred=14/19 patterns=429 infer=1451 importMemos=2985/834/306/1088
    [resolve-memory] refs=28750 lang=tsx kind=calls ext=.tsx nameLen=10 rss=5388MiB heap=5444/5567MiB extMem=34MiB lru=node:467,file:595,imports:456,reexports:49,name:3893,lower:1197,qname:1508,lines:315,methods:96 ownerIndexes=70/31/31 kinds=1/343 deferred=14/19 patterns=431 infer=1458 importMemos=3038/855/312/1111
    [resolve-memory] refs=29000 lang=tsx kind=imports ext=.tsx nameLen=4 rss=5388MiB heap=5445/5567MiB extMem=34MiB lru=node:467,file:595,imports:460,reexports:49,name:3906,lower:1201,qname:1515,lines:317,methods:96 ownerIndexes=70/31/31 kinds=1/343 deferred=14/19 patterns=431 infer=1463 importMemos=3059/863/312/1111
    [resolve-memory] refs=29250 lang=tsx kind=calls ext=.tsx nameLen=6 rss=5388MiB heap=5446/5567MiB extMem=34MiB lru=node:469,file:595,imports:462,reexports:49,name:3916,lower:1205,qname:1524,lines:319,methods:96 ownerIndexes=70/31/31 kinds=1/343 deferred=14/19 patterns=434 infer=1474 importMemos=3071/864/312/1111
    [resolve-memory] refs=29500 lang=tsx kind=calls ext=.tsx nameLen=20 rss=5388MiB heap=5446/5567MiB extMem=34MiB lru=node:471,file:595,imports:464,reexports:49,name:3919,lower:1205,qname:1528,lines:321,methods:96 ownerIndexes=70/31/31 kinds=1/343 deferred=14/19 patterns=434 infer=1477 importMemos=3086/864/312/1111
    [resolve-memory] refs=29750 lang=typescript kind=imports ext=.ts nameLen=6 rss=5388MiB heap=5447/5567MiB extMem=34MiB lru=node:477,file:595,imports:474,reexports:49,name:3938,lower:1214,qname:1535,lines:328,methods:96 ownerIndexes=70/31/31 kinds=1/343 deferred=14/19 patterns=437 infer=1486 importMemos=3104/867/312/1111
    [resolve-memory] refs=30000 lang=typescript kind=calls ext=.ts nameLen=4 rss=5388MiB heap=5447/5567MiB extMem=34MiB lru=node:479,file:595,imports:479,reexports:49,name:3942,lower:1215,qname:1541,lines:330,methods:96 ownerIndexes=70/31/31 kinds=1/343 deferred=14/19 patterns=438 infer=1489 importMemos=3120/884/312/1111
    [resolve-memory] refs=30250 lang=typescript kind=calls ext=.ts nameLen=6 rss=5390MiB heap=5451/5568MiB extMem=34MiB lru=node:482,file:595,imports:482,reexports:49,name:3965,lower:1225,qname:1550,lines:332,methods:96 ownerIndexes=70/31/31 kinds=1/343 deferred=14/19 patterns=442 infer=1493 importMemos=3129/892/313/1112
    [resolve-memory] refs=30500 lang=typescript kind=imports ext=.ts nameLen=23 rss=5390MiB heap=5451/5568MiB extMem=34MiB lru=node:482,file:595,imports:485,reexports:49,name:3974,lower:1228,qname:1555,lines:332,methods:96 ownerIndexes=70/31/31 kinds=1/343 deferred=14/19 patterns=445 infer=1496 importMemos=3135/904/313/1112
    [resolve-memory] refs=30750 lang=typescript kind=calls ext=.ts nameLen=15 rss=5391MiB heap=5452/5568MiB extMem=34MiB lru=node:483,file:595,imports:488,reexports:49,name:3977,lower:1229,qname:1559,lines:333,methods:97 ownerIndexes=71/31/31 kinds=1/343 deferred=14/19 patterns=445 infer=1497 importMemos=3140/919/313/1112
    [resolve-memory] refs=31000 lang=typescript kind=calls ext=.ts nameLen=6 rss=5389MiB heap=5452/5568MiB extMem=34MiB lru=node:484,file:595,imports:492,reexports:49,name:3991,lower:1236,qname:1566,lines:334,methods:97 ownerIndexes=71/31/31 kinds=1/343 deferred=14/19 patterns=448 infer=1501 importMemos=3147/926/313/1112
    [resolve-memory] refs=31250 lang=typescript kind=calls ext=.ts nameLen=6 rss=5384MiB heap=5452/5568MiB extMem=34MiB lru=node:484,file:595,imports:495,reexports:49,name:3992,lower:1236,qname:1570,lines:334,methods:97 ownerIndexes=71/31/31 kinds=1/343 deferred=14/19 patterns=448 infer=1501 importMemos=3155/938/314/1119
    [resolve-memory] refs=31500 lang=typescript kind=calls ext=.ts nameLen=4 rss=5378MiB heap=5453/5568MiB extMem=34MiB lru=node:486,file:595,imports:498,reexports:49,name:3998,lower:1239,qname:1574,lines:336,methods:97 ownerIndexes=71/31/31 kinds=1/343 deferred=14/19 patterns=450 infer=1503 importMemos=3161/943/314/1119
    [resolve-memory] refs=31750 lang=typescript kind=calls ext=.ts nameLen=6 rss=5375MiB heap=5453/5568MiB extMem=34MiB lru=node:486,file:595,imports:501,reexports:49,name:3998,lower:1239,qname:1577,lines:336,methods:97 ownerIndexes=71/31/31 kinds=1/343 deferred=14/19 patterns=450 infer=1503 importMemos=3164/947/314/1119
    [resolve-memory] refs=32000 lang=typescript kind=calls ext=.ts nameLen=6 rss=5375MiB heap=5453/5568MiB extMem=34MiB lru=node:487,file:595,imports:505,reexports:49,name:4003,lower:1240,qname:1581,lines:337,methods:97 ownerIndexes=71/31/31 kinds=1/343 deferred=14/19 patterns=451 infer=1504 importMemos=3168/956/314/1119
    [resolve-memory] refs=32250 lang=typescript kind=references ext=.ts nameLen=20 rss=5366MiB heap=5454/5568MiB extMem=34MiB lru=node:489,file:595,imports:513,reexports:49,name:4033,lower:1250,qname:1596,lines:342,methods:102 ownerIndexes=76/31/31 kinds=1/343 deferred=14/19 patterns=456 infer=1516 importMemos=3188/970/314/1119
    [resolve-memory] refs=32500 lang=typescript kind=imports ext=.ts nameLen=26 rss=5339MiB heap=5464/5569MiB extMem=34MiB lru=node:490,file:596,imports:523,reexports:52,name:4069,lower:1260,qname:1614,lines:349,methods:104 ownerIndexes=77/31/31 kinds=1/343 deferred=14/19 patterns=464 infer=1528 importMemos=3206/978/317/1121
    [resolve-memory] refs=32750 lang=typescript kind=references ext=.ts nameLen=7 rss=5340MiB heap=5465/5570MiB extMem=34MiB lru=node:490,file:596,imports:530,reexports:52,name:4108,lower:1276,qname:1623,lines:351,methods:104 ownerIndexes=77/31/31 kinds=1/343 deferred=14/19 patterns=470 infer=1537 importMemos=3220/981/317/1121
    [resolve-memory] refs=33000 lang=typescript kind=calls ext=.ts nameLen=22 rss=5340MiB heap=5466/5570MiB extMem=34MiB lru=node:491,file:596,imports:541,reexports:52,name:4169,lower:1293,qname:1640,lines:354,methods:105 ownerIndexes=78/31/31 kinds=1/343 deferred=14/19 patterns=476 infer=1549 importMemos=3237/984/317/1121
    [resolve-memory] refs=33250 lang=typescript kind=imports ext=.ts nameLen=11 rss=5335MiB heap=5467/5570MiB extMem=34MiB lru=node:492,file:596,imports:550,reexports:52,name:4207,lower:1305,qname:1652,lines:358,methods:105 ownerIndexes=78/31/31 kinds=1/343 deferred=14/19 patterns=482 infer=1573 importMemos=3247/986/318/1122
    [resolve-memory] refs=33500 lang=typescript kind=calls ext=.ts nameLen=18 rss=5320MiB heap=5467/5570MiB extMem=34MiB lru=node:493,file:596,imports:562,reexports:54,name:4255,lower:1317,qname:1672,lines:366,methods:106 ownerIndexes=78/31/31 kinds=1/343 deferred=14/19 patterns=491 infer=1592 importMemos=3261/991/320/1127
           24.49 real        17.11 user         3.97 sys
              5790875648  maximum resident set size
                       0  average shared memory size
                       0  average unshared data size
                       0  average unshared stack size
                  798659  page reclaims
                     291  page faults
                       0  swaps
                       0  block input operations
                       0  block output operations
                      40  messages sent
                      22  messages received
                       1  signals received
                    1688  voluntary context switches
                   67337  involuntary context switches
               447999436  instructions retired
               199814537  cycles elapsed
                18975168  peak memory footprint
    
  6. danusha2345 commented on Aug 22, 2026

    @danusha2345
    Contributor

    Thanks — the .har readback evidence pinned the remaining OOM to a precise pre-cache allocation path.

    I added a pre-read size guard in #1583 (f3fd47e): resolution now stats a package target and rejects anything above the same 1 MiB source limit used by extraction before readFileSync(..., 'utf-8') can decode it. The failed result is cached as null, so the target is not retried during the pass.

    Regression coverage uses a sparse gzip-shaped react_native_openharmony.har; the test fails on main and passes on this commit. A separate 290 MiB sparse-archive probe against the built branch returned null in 0.05 s with 58 MiB peak RSS. Full suite: 3,131 passed, 9 skipped.

    Could you run the affected project against #1583 when convenient? That is the only remaining validation needed for the exact RNOH/ohpm path on macOS.

  7. hcg1023 commented on Aug 22, 2026

    @hcg1023
    Author

    Validated #1583 (f3fd47e) against the affected project on macOS (Apple Silicon). Built the PR head, ran the same full index pipeline that used to OOM:

    Scenario Before fix With f3fd47e
    Full index, 12 GB heap cap 5.79 GB peak RSS 477 MiB
    Full index, default heap (the original 178-crash condition) FATAL OOM ~21 s in exit 0, 1.22 GB peak
    Repro mirror + node_modules symlink 3.7–4.4 GB 485 MiB

    An fs spy on the run confirms the guard fires as designed: at ~2.7 s the resolver statSyncs react_native_openharmony.har, reads nothing, and moves on (the pre-fix run read 289,606,387 bytes at that exact spot). Index completeness is identical to pre-fix: 627 files / 7,885 nodes / 18,973 edges / 22,727 failed unresolved refs — the rejected archive contributed nothing, so no resolution coverage is lost.

    One minor observation, not a blocker: .har files under the 1 MiB cap (e.g. screens.har 183 KB, worklets.har 98 KB from @react-native-ohos/* packages) still get decoded as utf-8 into the content cache. Memory-wise they're harmless (~1 MB total), but they're gzip binaries, so their "contents" are mojibake — a magic-byte check (gzip \x1f\x8b / zip PK) alongside the size guard would close that gap if you ever want it.

    From our side this fixes the RNOH/ohpm OOM path completely. Thanks for the fast turnaround on this!

  8. bompus commented on Sep 5, 2026

    @bompus
    Contributor

    For anyone still on 1.5.0: #1562 (81e1f4a) is in the v1.6.0 release, so the PID-reuse half of this report is fixed there. The OOM half stays with #1583.

  9. colbymchenry commented on Sep 27, 2026

    @colbymchenry
    Owner

    Thanks for the detailed report, @hcg1023, and thanks for using CodeGraph! This is fixed on main by #2006: files over the 1 MB source limit (such as a file:*.har package archive an import points at) are now rejected before they are read and decoded during resolution, which removes the multi-gigabyte heap spike behind the startup out-of-memory. The fix will be in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions