diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-11 21:53:46 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-11 21:53:46 -0400 |
| commit | 7de0cfd365e9c8b9fa8385c5cde60bbbbb7a3ddb (patch) | |
| tree | 3b4d04c37bad4bafd8271f38ecdf4339b15b2ead /tools/guest-diag | |
| parent | 9996ac4a93458d6d22085721e2cef18ed41c9215 (diff) | |
| download | open-iov-7de0cfd365e9c8b9fa8385c5cde60bbbbb7a3ddb.tar.gz open-iov-7de0cfd365e9c8b9fa8385c5cde60bbbbb7a3ddb.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.
Diffstat (limited to 'tools/guest-diag')
| -rw-r--r-- | tools/guest-diag/semfix_watch.py | 9 |
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] |
