From 7de0cfd365e9c8b9fa8385c5cde60bbbbb7a3ddb Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Sun, 11 Oct 2026 21:53:46 -0400 Subject: guest-diag: semfix_watch read64 uncached by default (stale-cache pool-pin failure) The watcher's resolve_sem_pool read sem->page->mem->vas through a process-lifetime cache: a transient zero captured while UVM was still initialising the structures was served forever, the pool pin never landed, and the second-session client hung in cudaMallocManaged (r88 evidence: 'pool unresolved (retry)' from the watcher while the same walk succeeded from a fresh QMP client). Cache is now opt-in. --- tools/guest-diag/semfix_watch.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/guest-diag/semfix_watch.py b/tools/guest-diag/semfix_watch.py index 049a612..5124805 100644 --- a/tools/guest-diag/semfix_watch.py +++ b/tools/guest-diag/semfix_watch.py @@ -123,7 +123,14 @@ class Qmp: cur = getattr(self, "_cpu", 0) return [cur] + [c for c in range(self.ncpu()) if c != cur] - def read64(self, addr, n=1, cache=True): + def read64(self, addr, n=1, cache=False): + # Cache is opt-in and must stay that way: every reader here watches + # structures the guest mutates (UVM init fills sem->page->mem->vas in + # place). Caching a transient zero poisoned resolve_sem_pool forever + # (the watcher logged "pool unresolved (retry)" while the same reads + # succeeded from a fresh QMP client) - the second-session pool pin + # never landed and the client hung in cudaMallocManaged. Default is + # therefore uncached; callers may opt in for within-pass scans only. key = (addr, n) if cache and key in self._cache: return self._cache[key] -- cgit v1.2.3