summaryrefslogtreecommitdiffstats
path: root/docs/RPC.md
diff options
context:
space:
mode:
authorblasty <peter@haxx.in>2026-07-25 11:29:36 +0200
committerblasty <peter@haxx.in>2026-07-25 11:29:36 +0200
commit21c1bcec6b6cebca0c202026da381a880a161c21 (patch)
tree645bed7b1bd0abad0c71f1d20b5572459a3fe0ba /docs/RPC.md
parentprojects: project model + binary staging (phase 1a) (diff)
downloadida-tui-21c1bcec6b6cebca0c202026da381a880a161c21.tar.gz
ida-tui-21c1bcec6b6cebca0c202026da381a880a161c21.tar.xz
ida-tui-21c1bcec6b6cebca0c202026da381a880a161c21.zip
projects: worker pool with memory-budgeted residency (phase 1b)
idatui/pool.py — WorkerPool keeps one live worker per project binary: * lazy spawn on first use; staging + a scratch sweep happen first, so a database wedged by a previously hard-killed worker reopens instead of crash-looping. * residency is bounded by a MEMORY BUDGET (default project.memory_pct of RAM), not a worker count — a count is the wrong knob when one project holds a 50KB helper and a 6MB crypto lib. Cost is measured per worker from /proc/<pid>/smaps_rollup (PSS, which splits shared pages so summing means something). * over budget -> evict least-recently-used, never the active or pinned binary, and give up rather than thrash when nothing is evictable. Eviction calls idb_save first, so returning to a binary is a DB load, not a re-analysis. * status() feeds the switcher UI (resident/pinned/active/analysed/memory). worker_client: fix the wedge-file bug this depends on. close() sent __shutdown__ and then IMMEDIATELY SIGTERMed, killing the worker mid close_database() — which is what leaves the unpacked .id0/.id1/... behind and makes the .i64 refuse to reopen. Now it waits out a grace period (the worker returns from serve() on __shutdown__ and closes the DB in its finally) and only escalates if it's genuinely stuck. Also expose .pid for memory accounting. Verified: a pilot run that used to leave echo.id0/.id1/.id2/.nam/.til now leaves only echo.i64, and teardown is no slower (14 checks in 5s). tests/test_pool.py: 22 checks with an injected fake client — LRU order, budget eviction, active/pinned protection, save-before-close, thrash avoidance, status(), teardown. Pure stdlib, no idalib.
Diffstat (limited to 'docs/RPC.md')
0 files changed, 0 insertions, 0 deletions