2026-11-14 host hang: a yams ASan test run (~110 MiB binaries) pushed
strawberry.service past MemoryHigh=768M; the kernel throttled the daemon
(own memory.pressure full ~72%), so the exec guard stalled launches (589
1-second prevention timeouts in 80 min, even start-swayidle.sh), scans hit
p95 67 s and the control socket stopped answering.
- Exec guard (assess_exec) no longer copies an image before deciding: a cached
scan answers with no read; an image over guard_full_scan_max_bytes, or when
the scan-buffer budget is exhausted, is hashed by streaming (1 MiB chunks,
new HashUtils::sha256_md5_fd) and decided on hash / IOC / quarantine
(degraded; the pipeline still scans it). Only small budgeted images are copied.
- Scan-buffer budget (ResourceGovernor::acquire_scan_buffer, RAII
ScanBufferLease): in-memory image copies bounded to memory budget / 4
(balanced 192 MiB); the pipeline waits up to 30 s, on-demand scans 60 s;
an oversized request is granted only alone, so no deadlock or starvation.
- Balanced pipeline_max_image_bytes 128 -> 64 MiB: larger images get hash/IOC
checks only (as on the efficient profile).
- Response hashing streams instead of copying the whole executable.
- Status: resources.cgroup memory_high_mb / memory_high_events /
memory_full_pct / throttled, and resources.scan_buffers; doctor check
resources.memory (problem when throttled at MemoryHigh, with the fix).
Tests: budget grant/refuse/exclusive/wait/timeout/move, PSI full + memory.events
parsers, streaming hash = buffer hash across chunks, guard streams a 33 MiB
image with no YARA pass and no buffer grant, streams when the budget is
exhausted, full-scans + caches when budget is free, doctor throttle check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>