summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-11 21:53:46 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-11 21:53:46 -0400
commita6016c2d66eeb477d37ad287074ba3f169438240 (patch)
tree7da77628bdb770cebed496efb7310bcd0ee5348d
parent52b2c7c109ee3018853f0703de80d9bf039f7e6e (diff)
downloadopen-iov-a6016c2d66eeb477d37ad287074ba3f169438240.tar.gz
open-iov-a6016c2d66eeb477d37ad287074ba3f169438240.zip
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.
-rw-r--r--tools/guest-diag/semfix_watch.py9
1 files changed, 8 insertions, 1 deletions
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]