Files
reims-vgpu/docs/lessons.md
T
Anees Iqbal 498cc5f328 📝 Record the trap of locking an object the app can reach [ci skip]
The bundle took @synchronized on objects it hands the app, and an app's own
@synchronized on its command buffer then held the buffer's completion. The
lesson says why (Metal takes no such lock, measured by oracle_locks) and how
to spot the next one: bundle_sync_check.sh, and any wait in the bundle on a
lock or queue the app controls.
2026-11-26 17:41:52 -08:00

194 KiB
Raw Blame History

Lessons

Each lesson is a trap that decides what the guest or the host sees, or what a check reports, found by a test, a review or a VM boot: what went wrong, why, and how to recognise the next one. A new trap found the same way goes here.

The platform and the runtime

  • A model of an Objective-C mechanism must still drive the real one where the platform uses it. A model of @autoreleasepool that held Rust values alone left everything Metal autoreleased on the library's threads unreleased (the +0 -commandBuffer, its encoders). Uncommitted command buffers then used up the queue's 64 slots, and the 65th -commandBuffer blocked. rt::Pool pushes and pops a real pool around each unit of work for that reason (architecture 7.4). Whether a dropped uncommitted buffer is still in the pool depends on the build: an optimized one elides Metal's autorelease of it, and a dev build does not.
  • A synchronous Metal compile can wait forever after Metal's compiler service crashes. Metal's compute state of a fragment function crashes MTLCompilerService at each of the compile's 4 tries and answers error 2; compute_state_answers_are_metals_for_every_kernel_here asks for 50, 200 crashes a run. Now and then the compile never makes its next try: the caller sits in newComputePipelineStateWithFunction:, under AGX's createComputeProgramVariant, in _dispatch_group_wait_slow, at no CPU, with no compiler service left for it, and its log ends at Compilation failed with XPC_ERROR_CONNECTION_INTERRUPTED on 2 try (measured on the M3 Max, macOS 27.0.1: 3 hangs in 24 runs made 6 at a time, none in 16 alone, and 4 in one day of cargo xtask check, one with nothing else of the check running while other builds loaded the host). It looked like a GPU recovery stalling the compile, and is not one: 8 runs beside a test that faulted the GPU throughout, 3,390 GPU events over 1,600 crashed tries, never hung, and no hang had a GPU event within a minute of it. The test (since deleted) then read Metal's answers recorded once, so it no longer asked Metal's compiler. Any synchronous Metal pipeline creation (newComputePipelineStateWithDescriptor:options:reflection:error:, newRenderPipelineStateWithDescriptor:options:reflection:error:, newRenderPipelineStateWithTileDescriptor:options:reflection:error:) on a thread that must not stop can stop that thread the same way, from a descriptor naming a fragment function in a compute state or from the service dying (a crash other than a fragment function's is not measured). How to spot the next one: a thread in _dispatch_group_wait_slow under a Metal new...PipelineState... call at no CPU; read the process's log for the compiler's XPC errors and launchd's MTLCompilerService ... exited due to SIGSEGV lines. A fragment function compiled from source at run time does the same: each call crashes the service 4 times and answers AGXMetalG15X_M1 error 2, and of 6 processes making 50 such calls at once, one stopped after the crash at its third try (measured on the M3 Max, macOS 27.0.1, 2026-10-26). The log names a client by its executable's name and pid alone (ParentProcessName=NAME_PID), and a crash report hides its path, so tie the name to a binary (ps -o command -p PID while it runs) before counting its crashes as ours: metal2vulkan's conformance sweeps, run on the same Mac, are a binary named conformance, where the video conformance suite runs as videotoolbox-conformance and tests as CRATE-HASH.
  • Leaks that only exhaust a resource show up as "the Nth of anything hangs". When a run starts to differ or hang at exactly the 65th command buffer, suspect MTLCommandQueue's default maxCommandBufferCount of 64 and count the uncommitted buffers, not the call that hangs.
  • An object autoreleased on the host's thread goes to the host's pool, which the host pops after the API call has returned, and a host in C has no pool at all. A thread-local stack that only the library's own holders and a worker's idle drain empty keeps such values alive forever on a host thread. Every public entry pushes a pool and opens a holder of its own (reims_vgpu::entry::run), so what the call held or Metal autoreleased on the host's thread goes before it returns; a thread the library started keeps a last-resort holder and pool for what is held or autoreleased there outside any unit.
  • A dispatch_sync block runs on the caller's thread, and that is ordering the guest sees, not an implementation detail. A SerialQueue::sync that ran the block on the queue's worker and woke the caller afterwards let a child FIFO of the paravirt device (since deleted) overtake the root: DeviceCore::create_fifo starts the child's thread inside its sync block, and while the root FIFO thread waited for the wake-up, the new child ran its replayed NOP and raised its interrupt before the root published the define's stamp (irq_stamps ["0x2","0x1"] instead of ["0x3","0x1"], one run in ten). SerialQueue::sync runs the block on the caller's thread. When an interrupt snapshot flakes, look for a hand-off between threads that the order does not need, not for a lock or a publish order.
  • An @autoreleasepool a raise leaves is not popped: clang registers the pop as a normal cleanup only, so the enclosing pop (or the host's own) frees what was autoreleased inside it. A pool popped at the raise frees what Metal autoreleased in it too early; rt::pool::around leaves it pushed. And a pool pushed only after the body never catches Metal's +0 returns at all.
  • A weak load under MRC with -fobjc-weak is objc_loadWeak: the object comes back retained and autoreleased into the innermost pool, so its release, and its teardown when that reference was the last, lands at the pool's pop, after what the block did. Weak::upgrade into a local drops it at the end of the Rust scope instead, which can run the teardown in the middle of the work. Where an upgraded reference's last release crosses the API, hold it to the end of its hold's holder (Hold::keep), or, where that teardown syncs onto the queue running the block, let it go with rt::held::release_off_thread (architecture 7.4).
  • A wrapper and the library's object are two lifetimes where the host sees one. A block of the library's can keep a display after the host's last release of the handle that wraps it, and the library's teardown then runs later, on that block's thread. A callback the library makes from its teardown must not take the wrapper as its context: hand it what the wrapper held. The C API's display callbacks each hold the host's callback table, not the RvgDisplay handle, and the table's destroy runs when the last of them goes (api.md section 5, "Callback tables and their destroys").
  • A +0 message send to an unretained pointer takes no reference, so it can never be the last release. Weak::upgrade into a temporary is a retain and a release: when the host's release lands meanwhile, the temporary's drop runs the teardown on the sender's thread, under the sender's locks (a detach that takes the same lock hangs), and for an object whose last release has already begun the upgrade fails where an unretained pointer still reaches the object. Reach the object without a reference wherever the code sends to a pointer it does not own: DeviceCore::display_core does, for the device's port table and the guest display's client, taking the display's core and never a reference to the host's display.
  • A queue worker's idle drain is the last-resort holder's release and pool pop, after the thread has left the queue: a teardown released there may sync onto that same queue (the device's teardown onto its reporting queue), and libdispatch runs what is pending on another worker first. A sync that waits for "the worker" to hand over the turn hangs when the caller is that worker; SerialQueue::sync runs the blocks queued ahead of it itself there (rt::queue).
  • dispatch_release of a source's last reference cancels it (_dispatch_source_xref_dispose): pending data is dropped, and the cancel callout frees the handler on the target, with no dispatch_source_cancel called. A model whose release leaves the source live delivers merges libdispatch never delivers. rt::signal::CoalescingSignal cancels at its last release.
  • An exception costs time the guest can see. In an arm64 process the first @throw/@catch costs about 25 µs (the unwinder's first use), later ones about 5 to 8 µs, and a %@ of the object a few more; a Rust Result costs about 1 µs. In interplay_limits_high_children_circular[isolate] the cheaper path let the guest see child 9's "Circular wait" fault before the asynchronous fault-mask set landed (0x102c read 0 where the slower path's read gives 1). Measured from the doorbell write's return to the fault's visibility, 16 runs each: 91-207 µs (median 106) with a real exception at each raise, 47-352 µs (median 81) with Results alone. A raise here is a value, with no exception thrown (architecture 6.2). When a suite difference depends on how soon something becomes visible after an error, measure the error path's latency, not just its effects.
  • A fixed-width model of an unbounded stack fails silently at depth. A catch-scope stack that kept "is the innermost scope a foreign boundary?" as a 64-bit register, shifted on each scope entry, lost the boundary's bit when a resolver's lookup recursed through more than 64 nested scopes, and a throw there made a round trip it should not have. Keep, per scope, the value it replaced and restore it on exit, which is exact at any depth, and test past the width (70 nested scopes).
  • Work done only for a log line belongs inside the line's gate. Reading an exception's callStackReturnAddresses eagerly at every caught Metal raise was work only a line printing callStackSymbols needs, and it cost time on the guest's error path. A log macro evaluates its arguments only when a logger takes the line; a read with an effect the guest can see (guest memory, which can die) goes before the line instead, so it happens whether logging is on or off (architecture 14).
  • A dispatch_data_create destructor is behaviour: a destructor block with a NULL queue runs on a com.apple.root.default-qos worker after the release returns, while DISPATCH_DATA_DESTRUCTOR_DEFAULT makes a copy that the releaser frees inline.
  • A retaining pointer's assignment releases before it retains. Apple's framework assigns its retaining pointers by doing nothing when the new pointer is the one held, and otherwise releasing the old one before retaining the new one. Where that release crosses the API, compare the handles' identities, drop the old handle, then store the new one's reference: *slot = Some(new.clone_ref()) takes the new reference first.
  • A check every thread makes must not touch a thread_local! whose value has a destructor. Reading the isolated task's trap (a RefCell<Option<Arc<_>>>) before every Metal send and guest write, on every thread, made the C API's display tests die with SIGSEGV within milliseconds in 7 of 10 crate runs, and never under a debugger; reading a destructor-free Cell<bool> first, and the trap only on a thread that runs a task's code, gave 0 in 12 (tasks::isolation::life, since deleted with the paravirt device). The likely route is the destructor's registration on a thread's first access, made while that thread already destroys its thread-locals. When a test segfaults at once and only now and then, look for a thread-local that a change made every thread touch.
  • A Metal call's output can change with the host's boot, which no host key captures. Apple's private -fillTexture:level:slice:region:color:pixelFormat: on a texture of pixel format 550 (a two-plane XR10 format the public headers do not name) writes texels that change at every reboot and are the same in every run within one: what the guest read of them after the library's page-out was 84307cca, 84b0e5c9 and 843027c0 across three boots (measured), sharing their low 15 bits and the top two, which the page-out kernel sets. Cases that dumped those texels failed after each reboot on every build alike. Their fills now sit outside the dumps, and a copy from another 550 texture writes the dumped texels. When cases fail at once on every build after a reboot, run them at an older commit before bisecting, and check whether what they dump is the platform's own output rather than the library's.
  • A Metal answer can be bytes Metal never wrote, and those hold what the calling code left. Apple's private -fillTexture:level:slice:region:color:pixelFormat:, given a pixel format it packs no colour in, fills the 16 bytes of the calling thread's stack where its packing writes a colour in a format it packs. A test recorded them on 2026-10-23 as the bytes of the colour fill before it, which had left them there, and the runtime's hold of that texel across encoders was built to match; on 2026-11-07 the same test, on the same macOS build, read 80 ef 0b 82 02 00 00 00 42 a2 3d fe 01 00 00 00, the encoder's class and the selector as pointers, which objc2's check of the method before each send in a dev build had left in those bytes (measured on the M3 Max, macOS 27.0.1: the bytes are those two addresses; the same fills sent by objc_msgSend itself read the earlier fill's bytes, and after a call that set the stack below to one byte, that byte). Metal had not changed (the same build): the check's frames had moved (not bisected; the toolchain moved to nightly-2026-11-03 between the two). How to spot the next one: an answer that holds a value no input gave, or one that changes with the build, the boot or the calling code while its inputs stay put. Set the stack below the call to a byte of your choosing and see whether the answer follows; a test of such a call sends it by objc_msgSend itself, with no call between it and what it depends on (gpu::fill's metals_leftover). Sent so, the process's first pair still read other bytes, the selector's address and a heap address, while every later pair read the earlier fill's (measured the same day, the first of four pairs in one process; which first-send work leaves them is not established), so the test failed in every run, each test being a process of its own under nextest: a measurement of what the stack holds sends one pair first and compares from the second, as a guest's long-lived process sees it.
  • A test that frees memory and then expects its address to be unmapped races every other test thread in the process: mach_vm_allocate anywhere hands the page straight back out. Recheck the region when the unexpected happens, and retry with a fresh page.
  • A test on a virtual clock waits for good at the first wait of anything real it reaches. The C API's video device tests ran on core's testkit platform, and making the device opened the host's backend on that platform's clock: on a host with VA-API, its JPEG decoder's trial run at the opening waited for the GPU through a poll whose pauses are timed waits on that clock, which no test advances, and the tests sat in futex waits at no CPU until nextest ended them. A Mac, whose VideoToolbox waits for nothing as it opens, passed them, so only a Linux run showed it. A device a unit test makes on the testkit platform opens no hardware there: it is made on a stand-in (VideoDevice::without_backend, ScalerDevice::with_backend), or what opens the host's hardware gets std's runtime. The next one shows as a test that ends on one host and, on another, sits under VirtualClock::wait_until at no CPU.
  • A guest framework sends members of Metal's private protocols to the bundle's objects without asking. Metal's own objects adopt an SPI protocol beside each public one (MTLLibrarySPI beside MTLLibrary, ...), and the frameworks built over them call its members unchecked: macOS 13.7.8's Maps sent newFunctionWithName:constantValues:pipelineLibrary:error: to a library of the bundle, which adopted only MTLLibrary, and died of the unrecognized selector at launch. A check that walks only the public protocols misses the whole class, and an app pass shows only its first member, as a crash. The register's check now walks each class's SPI counterparts and the members older releases' protocols carry (guest/bundle/tests/protocol_members_tests.mm), and every class of the bundle logs a selector it does not recognize before it raises (RGFX: unrecognized:), so one boot shows each member a framework sends.
  • A reader that falls back to a conservative answer hides what it cannot read: nothing goes wrong but the cost. The bundle's AIR argument reader took a binding of a kind it did not know as one that may be a texture, and an OpenCL C kernel's argument passed by value is such a kind (air.constant, bound among the buffers), so nearly every OpenCL kernel's arguments did not read, and functionsOf() then dropped every entry point of the module beside it. Each texture of ShaderWrite usage those kernels bound was taken as written, every result stayed right, and only the guest's RGFX: ...: no arguments read line showed it (the perf audit's clprobe, a kernel of one argument kind each, named the kinds). When a new producer feeds a reader (another language, a new compiler), list the node kinds it writes against the ones the reader knows, and let one unreadable entry cost only its own answer.
  • Metal does not read a library's URL as Foundation does. newLibraryWithURL:error: opens the file at the URL's path whatever its scheme, so a URL of no scheme is a path, where NSData dataWithContentsOfURL: sends it to URL loading, which refuses it (NSURLErrorDomain -1002). Espresso names its kernels' libraries by such URLs, so on the device it had no kernel library and every GPU Vision and Core ML request threw, while every file URL loaded. Before reading what a Metal call is given through a general Foundation API, measure what Metal does with each form of it, the odd ones first (the 5300M, the 630 and the M3 answered every form alike).
  • A kernel interface that calls back into the kext holding its own locks decides the kext's lock order. IOSurface calls the device caches' control function holding locks of its own: op 5, at a client's release (IOSurfaceRootUserClient::release_surface), runs under the lock IOSurfaceRoot::lookupSurface takes. The kext's ask for a surface block called lookupSurface holding the contexts' lock, and op 5 took that lock in wakeReleases. A 12.7.6 boot froze its desktop for good in Mission Control: two of WindowServer's threads each waited for the other, and every process that then needed an icon (iconservicesagent, then secinitd, then a launching TextEdit) queued behind them, with no fatal line and no panic. No test and no earlier round had shown it: it needs a release and an ask to meet. The kext now calls into IOSurface under none of its own locks, and releases surfaces and device caches on its release worker (the lock order at ContextState in guest/kext/src/RgfxAcceleratorContexts.cpp). How to spot the next one: a guest whose desktop stops with no fatal line; a spindump of the stuck processes (sudo spindump PID, which dumps every process) shows threads in lck_mtx_lock_wait "blocked by turnstile ... waiting for" each other, one under an is_io_connect_method into the kext and the other under an IOSurface call that reached the kext's control function.
  • An address and a length name a range, not the memory in it. The bundle let a no-copy buffer join a live pages block when its address, length and writability matched, on the reasoning that an app keeps its memory until the buffer over it goes. An object can outlive the app's hold of the memory under it, though: a texture over the buffer or a command buffer holds it. WindowServer unmaps one CoreAnimation shmem image and maps another at the same address while a buffer over the first still lives. The new buffer then joined the old block, and the GPU read the old image's pages, which the kext still had wired. In a macOS 26.7.2 guest, System Settings' "About" row drew the Energy pane's clipped title in 3 of 8 pane switches on a Radeon 780M and on an RTX 3090. Unit tests passed, because they never map other memory at an address. With the join checked against the memory's VM object and offset (rgfxPagesIdentity), WindowServer refused 15 joins in 16 switches on the RTX 3090, all of them over one-page images, and no label drew stale. How to spot the next one: anything kept by a process's virtual address must check what is mapped there (mach_vm_region_recurse's object_id_full and offset) or hold the mapping itself. A test of it remaps the address with other contents while the first object lives (test_no_copy_buffer_over_remapped_memory_takes_its_own_block). Look for a symptom of one object showing another's old contents, cut to its own size. The identity is unique only while its object lives (object_id_full hashes the object's kernel address). The join is sound because the kext's wiring of a live block keeps the object: its UPL's activity holds off the object's termination. A test's fake pages source must hold the memory too, or in some runs the kernel hands the freed object's id to the new memory. That made both remap tests, test_region_pages_join_over_remapped_memory and the one above, fail now and then on the M3 Max on 2026-11-12.
  • A registry path one object publishes for another goes stale when a name in it changes. The kext's framebuffer named its accelerator in IOAccelTypes by the PCI device's path as it started, and the accelerator renamed the device GFX0 after that, so the path led nowhere: IOAccelFindAccelerator failed for our framebuffer in every process, and on macOS 11 a process with no WindowServer connection, which takes its OpenGL renderers from each framebuffer's accelerator, was offered the software renderer alone, while WindowServer's own processes saw nothing wrong. Spot it by following each published path with IORegistryEntryFromPath after boot, not as it is set; the accelerator now names itself again as it finds the framebuffer (guest/kext/src/RgfxAccelTypes.hpp).
  • A limit no driver of ours sets is still an answer, and a guest framework can do arithmetic on it that only a real driver's value survives. IOSurfaceRoot starts the largest surface it answers to IOSurfaceGetPropertyMaximum (width, height and bytes per row) at INT_MAX, and a Mac's GPU accelerators lower it at their start (16384 wide and tall on the Intel and AMD Mac and on the M3); the kext lowered none, so our guests answered INT_MAX. Safari 16.6 under macOS 13 divides the maximum width by the screen's scale in float before it sizes the tiles of a page that scrolls only vertically: at 1x INT_MAX is 2^31 there, the int it is cast to overflows, and every such page drew only its scroll bar, on every host GPU, while 12.x, 14.x and later, pages that also scroll sideways and a HiDPI mode all drew. The kext now lowers the three to what the device's textures take (guest/kext/src/RgfxSurfaceLimits.hpp). How to spot the next one: a guest that differs from a Mac in one screen scale or one page shape alone; compare what the guest answers for each limit with an oracle Mac's (IOSurfaceGetPropertyMaximum, IOSurfaceGetPropertyAlignment, Metal's limits) before suspecting the GPU path.
  • An alignment the device answers is also a test other code's surfaces must pass. iosurfaceTextureAlignmentBytes looked like a request (CoreAnimation rounds its own backing stores' rows up to it), so the guest's device answered the host GPU's linear row alignment there, 128 on NVIDIA and 256 on RADV, to have those rows taken in place. But CoreAnimation also checks every surface it textures against it, and the surfaces other code makes (with IOSurface's own rows at 64 bytes, and video frames) keep their rows: in macOS 26.7.2 guests on an RTX 3090 and an RTX 2080 WindowServer logged "Failed to allocate MTLTexture from IOSurface ... Row bytes (5312) not 128 aligned" thousands of times, and Safari drew pages blank and WebGL black every time, while unit tests and boots to the desktop passed; on a Radeon 780M, answering 256, WindowServer found Safari's video frames misaligned too. The device answers Metal's 16 again (guest/bundle/src/RgfxCaps.hpp, kRgfxIOSurfaceTextureAlignmentBytes). How to spot the next one: before raising an answer the guest's frameworks read, find who checks against it, not only who rounds up to it; walk apps on a GPU of each kind, and grep the guest's log for "aligned" and "alignment".
  • A Metal answer measured at one point of an object's life is not its answer at another, and a framework asks at its own. The bundle's resources answered the resource SPI's isComplete YES and waitUntilComplete at once, as an M3 probe measured right after a commit, where all three Macs answer so. Apple's GL renderer on macOS 11.7.11 asks after commitAndWaitUntilSubmitted, where the Intel 630 and the M3 answer NO and wait (dgpu-oracle.md, Q26): it reads a drawable back with the texture's waitUntilComplete, then a synchronizeTexture: on a queue of its own and getBytes:. On a unified-memory host the synchronize has nothing to copy and finished before the draw, so about 2.5% of Safari's WebGL readPixels on a 780M returned the canvas as it was before the draw; the 3090's run showed none. How to spot the next one: a read-back that is wrong only on its first read and right at once after, or a measured answer whose probe asked before the object was in use; probe the answer at each stage a framework reaches (committed, submitted, scheduled, completed) and trace the calls the framework makes around the read before trusting one sample.
  • A message posted out of a lock reaches the device in post order, not in lock order. The kext's let-go of a shared IOSurface block that other clients still held ended the hold under the contexts' lock, then posted its BLOCK_UNSHARE after dropping it. The same process's next ask of the surface ran beside it, made a new hold and posted its BLOCK_SHARE first. The device took that share as a no-op, since the context still held the block, and the late unshare ended the new hold. The kext counted the context as a holder and the device did not. In a macOS 26.7.2 guest on an RX 7900 XTX, one BUFFER_OVER_SURFACE_PAGES of WebKit's GPU process during Safari's autoscroll was refused as a bad reference, and the TEXTURE_FROM_IOSURFACE over it with it (once in a walk). The asks already waited for a share not yet posted, but nothing waited for an unshare. A late unshare could also come after the block's release, once the span was given to a new block that the same context shared. Each unshare now holds back the block's asks and its release until it is posted (RgfxBlockTable.hpp's unshares, tests/surface_blocks_test.cpp's unshareOrder). How to spot the next one: find a pair of messages that set and clear the same state on the device, one of them posted after its lock is dropped. Ask what a later setter posted in that window does, and what a reuse of the key (an offset, a name) after a release does.
  • A hold counter says where a wait sits, not what it waits for, and a burst of commits goes at the end of its slowest walk. With Heaven drawing in a macOS 26.7.2 guest on an RTX 3090, WindowServer's command buffers waited 29.9 ms p50 from their commit to their submission, and the runtime's scheduler counted them held for event values (heads_held_for_event_values 7.3k/s, batch_hold 2.58 s/s, job m3-max-30013), which read as the runtime holding the composite back. Split by the command buffer that signals each wait's value (the trace's evwait and evsig, and that buffer's cbcommit and cbdone), the wait on an RX 7900 XTX was 8.5 ms p50 before the app's queue copy that writes its window's surface reached the runtime at all, then 7.8 ms of that copy's GPU work, and 0.02 ms from its GPU end to WindowServer's submission (measured, m3-max-32395): the hold kept a read-after-write order a Mac keeps too (surface order), and its length was the host's walk of the app's frame, a stage a Mac does not have. The frame's six command buffers on its GL queue commit in one burst, each after the one before it, so the burst goes when the slowest walk ends. Dealing the render buffer's longest chunk first, as a model of that buffer's walk alone proposed, ended its walk 3.5 ms sooner (13.97 to 10.44 ms after its hand, p50) but committed it only 1.2 ms sooner, and the burst no sooner: it waited on the GL renderer's preprocessing buffer before it, one compute encoder of 216 KiB of ops walked whole on one thread in 12.2 ms p50 (measured, m3-max-32479 to 32481 and the scout trace of m3-max-32624). How to spot the next one: before blaming a hold or a queue's priority for a wait, split it at the signaller's host commit and at its GPU end; then, for a wait spent before that commit, line up the arrival and commit of every buffer the signaller commits behind, and take the one whose own walk ends last.
  • An op after an encoder's end is not work after it. The walk cut a part at any encoder's end with an op left after it, and the bundle puts a buffer's ask for its submission (SUBMITTED) last, after its last encoder, on every buffer of a queue that presents. So a buffer of WindowServer's cut at its last encoder's end committed a last part holding that op alone: no GPU work, a vkQueueSubmit of its own, and a paced walk waited to commit it. On an Iris Xe desk walk that was 3,736 of 31,222 parts, and 1,558 of the 4,680 of its Safari video step, every one a split buffer's last (perfdiff's walk i-C1, m3-max-38812, read from its trace); the deal's chunks, cut at an encoder's end before the stream's last op, had the same flaw. A cut now needs an encoder after it (decode/cmdbuf.rs's encoder_follows). How to spot the next one: parts whose cbdone GPU start is 0 or whose end is not after their start, counted by where they sit in their buffer.
  • A command buffer the walk cut into parts answers one set of GPU times that no part ran, and a reading that takes them for one run counts the GPU's work and its gaps as the host's time. The merge (decode/split.rs's Parts::merged) gives the guest's CB_COMPLETE the first part's GPU start and that start plus the parts' GPU time summed (no later than the last part's end), and its handler runs as the last part's completes, after the last part's commit. A present's late-show line gave those times as its writer's GPU run, and the first reading of a walk on an RTX 5080 Laptop GPU (m3-max-72991) read them so: the take to the commit's return took in every earlier part's GPU run, since the last part commits after the first has started on the GPU (the wait from commit to GPU start read 0 for 17 of 42 writers), and the GPU end to the handler's entry took in the GPU's gaps between parts (up to 5.3 ms, where those writers' own wake, placed on the card's records, was 59 µs p50). The host's share of the step's 42 late presents read 1,582 µs p50, a row by the reading's 1 ms rule; with each part placed on the card's records of every commit to rt (core::trip's Card), matched by GPU start and end, it was 382 µs p50, and the step closed. The line now gives the last part's own GPU end and the gaps between parts, and times the handler's entry from that end (graphics/present.rs's Cut). How to spot the next one: a commit that returns after its own GPU start, a wake far above the runtime's own from a GPU end to its handler, or a GPU end that matches no card record's end. Before reading the host's time off any merged answer, find which parts it merges and which part each of its stamps comes from.
  • A kernel write made below the VFS layer skips the VFS's read-only check. RgfxGate writes the bundle with VNOP_* calls, which go below the MAC layer so that SIP's checks do not refuse them. A probe that ran that install in macOS 15.4's Recovery, whose root is a read-only HFS mount, tagged /Library/GPUBundles on that root (VNOP_SETXATTR succeeded) and created the staging directory (VNOP_MKDIR did not fail), while its file writes through vnode_open failed with EROFS (30) (measured, m3-max-33952, on a snapshot overlay, so nothing stayed). HFS takes such writes on a read-only mount, outside its journal. The shipped install skips Recovery and the installer (/System/Installation), so it never meets a read-only volume. Any path that lifts that skip checks vfs_isrdonly(vnode_mount(vp)) before its first write below the VFS. How to spot the next one: a kext's write that succeeds where the same write from a shell fails with "Read-only file system".
  • A rename made below the VFS layer leaves the vnode's old name in place. vn_rename follows the file system's rename with vnode_update_identity, the VFS's record of the vnode's name and parent, which every path the kernel builds comes from; RgfxGate called VNOP_RENAME and VNOP_RENAMEX itself, so the swapped-in bundle's vnodes kept the staging name. Lookups by the right name still found them, so every check that opened the bundle by its path passed, while vn_getpath, kauth's paths and fcntl(F_GETPATH) in the guest all named reims-graphics.bundle.new, a path that no longer existed (measured on arm64 14.6.1 and 15.6.1 FileVault boots, m3-max-36256 and 36257). macOS 15's WindowServer loaded the bundle anyway; macOS 14's, in arm64's BaseSystem, opened and read its executable eleven times and never submitted its signature, so FileVault's unlock was never drawn. With the identity updated after each rename, 14.6.1's unlock was drawn and the desktop came up (m3-max-36302). How to spot the next one: a kernel path for a file that names somewhere the file is not, or a guest process that reads a file and stops short of using it; log vn_getpath for the vnodes it touches.
  • A kext that runs before the platform expert starts cannot allocate IOKit memory through the system mapper. An IOBufferMemoryDescriptor made without kIOMemoryMapperNone waits in IOMapper::checkForSystemMapper until the platform expert's start settles whether there is a mapper (xnu's IOBufferMemoryDescriptor.cpp and IOPlatformExpert.cpp). A probe kext that allocated at its kmod start, at 619 ms of a macOS 26.7.2 boot, before the root nub had a single service, hung the boot with every vCPU idle and no panic (m3-max-40291 and 40309). The verbose serial log of 40309 ended in waitForSystemMapper. With kIOMemoryMapperNone the same kext booted (m3-max-40310). How to spot the next one: a boot that stops with idle vCPUs right after a kext's start moved earlier. Read the verbose serial log's last thread before suspecting the device, and give every allocation that can run before IOPlatformExpert's start kIOMemoryMapperNone.
  • An arm64 boot starts in recoveryOS's BaseSystem, so a decision keyed on /System/Installation sees Recovery at every FileVault cold start. The arm64 kernel pivots onto the paired Recovery volume's arm64eBaseSystem.dmg on every boot, and launchd leaves for the full system by a userspace reboot only once the Data volume can be unlocked: a FileVault guest's cold start, and every restart but fdesetup authrestart's, stays for fvunlock and draws the unlock screen with that BaseSystem's WindowServer, which composites with Metal only. RgfxGate skipped the BaseSystem as it skips x86-64's Recovery, so the accelerator stayed unregistered and that WindowServer aborted every 30 s with the screen black (measured on 15.6.1, 26.6.2 and 27.0.1). The userspace reboot keeps the kernel too: what a kext did in the BaseSystem (an accelerator it registered, a resource it published) is still there when the full system's processes start, before the full system's own boot has redone it. How to spot the next one: an arm64 kext's decision made once per kernel boot from the root or the Data volume; check it against a FileVault cold start, where both change under the running kernel.
  • A kernel function declared by hand must keep the linkage of the SDK header that declares it. guest/kext/src/RgfxPat.cpp declares IOKit's registerPrioritySleepWakeInterest itself, since the macOS 27.2 SDK's IOKit/pwr_mgt/RootDomain.h does not compile (its IOPMAssertionTypes.h no longer defines the IOPMDriverAssertion types the header uses). Declared outside extern "C", the kext imported __Z33registerPrioritySleepWakeInterestPFiPvS_jP9IOServiceS_mES_S_, where IOKit exports _registerPrioritySleepWakeInterest, and ReimsGraphics did not start on macOS 11.7.11 or 26.7.2: kmutil showloaded listed Graft and RgfxGate and not ReimsGraphics, the guest had no Metal, and there was no panic and no fatal line (m3-max-41333 and 41334). The kext's tests and make -C guest prebuilt passed. How to spot the next one: compare nm -u of a rebuilt kext with the last good build's, and find each new import, by that exact name, in a symbol set the kext links (the executables in a guest's /System/Library/Extensions/System.kext/PlugIns).
  • A MAC hook that admits what another policy refused must clear the refusal's fatal description. AMFI's vnode_check_signature refuses non-platform code in arm64's BaseSystem and sets a fatal description; RgfxGate's hook answered 0 for the bundle and left the description set, and XNU's mac_vnode_check_signature panicked ("MAC hook returned no error, but status is claimed to be fatal") at every boot (measured on 26.6.2, m3-max-35412). How to spot the next one: a hook that rewrites a policy's answer and not the out-parameters that go with it.
  • An answer the kext's event handler does not route never reaches its waiter, and a waiter with no deadline then waits for good. The kext's threads wait for the device's answers in postLifecycle, asleep THREAD_UNINT, and the handler handed an event to its waiter only if the event's type was in a list of cases written out in the handler itself, apart from the reply types the waiters name. The Shared pool's POOL_TAKE waits for a POOL_BLOCK with no deadline, and POOL_BLOCK was missing from that list: the handler's default dropped it, so WindowServer's first take waited for good and could not be killed. A macOS 26.7.2 guest booted to a black screen with no Dock, ps showed WindowServer in state Us, system_profiler listed no display, and the host logged no fatal line and kept presenting (on a Radeon 780M and an RTX 3090, m3-max-50180 and 50203). The kext's tests passed, since none of them runs the kernel's event handler. The waiters' answer types are now one list, RgfxLifecycleAnswers.hpp, which the handler routes from; postLifecycle refuses a reply type the list does not hold, and tests/lifecycle_answers_test.cpp checks every type a waiter names. How to spot the next one: a guest process in state U with no fatal line on the host, after a change that adds a message a kext thread waits on; check the new answer's type against the handler's routing before reading the host.
  • A reply type missing from the kext's list fails every post that waits for it, quietly, and a platform that keeps any pin hides the loss. postLifecycle refuses at once, before it posts anything, a reply type rgfxLifecycleAnswer does not hold (the lesson above), and Private blocks added PRIVATE_TAKE, whose waiter names PRIVATE_BLOCK, without adding that type to the list. Every take returned kIOReturnUnsupported in the kext, with only its IOLog line (lifecycle 765: no event of type 1041 answers a waiter); the Metal bundle logged RGFX: no Private block of once per context and placed its Private objects in its own range, and the host logged no take of any outcome, since none reached it. The Vulkan platform keeps any pin, so the guests booted and ran as before; only metal2vulkan-runtime, whose objects lie at its own addresses, showed it, as 92 Private objects whose pins were not kept (rt-gpu-address-unpinned-private, an x86-64 macOS 26.7.2 boot on a Radeon 780M). tests/lifecycle_answers_test.cpp now reads the reply type of every postLifecycle call in the kext's sources and fails where one is not listed, so the next new type fails make -C guest test. How to spot the next one: a feature the guest takes whose host side never logs or counts a single message, after a change that adds a message a kext thread waits on; look for the kext's no event of type line before reading the host.
  • A driver's fault that follows a teardown can come from the teardown having happened at all, and not from when it happened. QEMU on the UHD Graphics 630 host ended in an access violation inside Intel's Direct3D 12 video driver at a decoder's vaEndPicture after another decoder was let go, and four fixes that changed when the teardown ran each failed: every call made alone, no teardown inside another context's picture, the other contexts' pictures waited for first, and each picture submitted alone after the others were done (measured on vaon12 of Mesa 26.2.7, 2026-11-17, the two-thread test of reims-vgpu-video/src/vaapi/va/teardown.rs). One run of a test lock around each picture and each teardown passed and pointed at timing; its next run failed too. What separated the two was a control that removed the teardown altogether, every decoder kept until both threads ended, which passed, as did holding each teardown until no context lived (docs/video/vaapi.md, "On Windows a teardown waits for the display's other contexts"). How to spot the next one: when a fix by ordering fails, run the shape with the suspect step left out before trying another order, and run a shape that passed once again before building on it.
  • A hold that fixes a crash can keep memory without bound. Holding every teardown until no VA context lived stopped the fault on the UHD Graphics 630, and each short 4K decoder let go beside a long one then kept about 211 MB of DXGI's local memory until the long one ended (measured on vaon12 of Mesa 26.2.7, 2026-11-20, the churn test of reims-vgpu-video/src/vaapi/va/teardown.rs). Splitting the hold by what it held, the two-thread test passed with only the context's destroy held (35 MB a decoder), but decoders let go while others decoded at full pace, each picture waited for and not read back, then had another decoder's vaEndPicture fail in every run of 6 as a pool's surfaces were destroyed (measured on the same GPU, 2026-11-20). What bounded the memory without destroying anything beside a live context was keeping a decoder's context with its config and its pool, for the next decoder of its shape to take back. How to spot the next one: give a hold a test that makes and lets go many sessions beside a long one and reads the process's memory after each; and before narrowing a hold that fixed a crash, run every shape the whole hold passed, at the guest's pace (pictures waited for and not read back) as well as with every picture read back.
  • A race test can pass on the code it guards when the mutex it races on lets the unlocking thread take it again first, and macOS's default mutex policy does. The bundle's commit decided whether a held create had been refused in a second hold of the held messages, after the post's own hold (until 21e637db25): a create another thread held between the two failed a command buffer with MTLCommandBufferErrorInternal in 6 of the 7 walks of a rendering sample made at those trees. Tests whose other thread waited on the mutex through the first hold passed against that code on the default policy, and failed on libpthread's fair-share policy (PTHREAD_MUTEX_DEFAULT_POLICY=1), where an unlocked mutex goes to its waiter (measured on the M3 Max, macOS 27.0.1, 2026-11-21). A lock-free check before the second hold can still answer without waiting (the held messages' any flag, false after a post that took them all), so the protocol test keeps it set with a held destroy the kext refuses. Both tests run in a child of their binary on that policy (rgfxRunFairShare, guest/bundle/tests/rgfx_test_ring.hpp). How to spot the next one: a race test that passes before its fix as well as after; run it against the old code, in a child on the fair-share policy.
  • A wait for the work in flight, listed as the wait begins, misses the work that piles up while it lasts. A slab create of the guest bundle that found no room let the process's own slabs go, waited for the slabs other threads were giving back at that moment, and asked once more. Under CPU load the slabs' background thread, at utility QoS, fell behind on its drops: the wait lasted, the slabs other threads let go meanwhile stayed doomed with their memory out of the source, and the second ask was refused while 26 to 52 of them held it (test_slab_thread's 3 MiB takes, measured on the M3 Max under Rosetta, 2026-11-21: 1 of 1,000 runs beside 16 busy loops on its 16 CPUs, 6 of 3,828 beside 48 busy loops and 8 dd copies; first seen once beside a 16-job cargo build). A create now goes round again for as long as a round gave memory back (guest/bundle/src/RgfxSlabs.hpp, THE FALLBACKS), and test_slab_take_gives_back_slabs_let_go_while_it_waited holds the background's releases to show it. How to spot the next one: a refusal or a timeout seen only under load, where a thread of lower priority does the giving back; count what is queued for that thread at the refusal, not only what is in use.
  • A Foundation file call in the guest bundle makes whatever system calls its release's Foundation picks, and an app's sandbox may kill the process at a call its list leaves out. On macOS 11.7.11 every Safari page that used WebGL lost its WebContent process, its crash report naming the sandbox's kill: the GL store wrote its entries with Foundation's atomic write (NSDataWritingAtomic), which on 11 makes its temporary file with open_dprotected_np, and WebKit's WebContent profile on 11 and 12 lists the system calls the process may make and kills it (SIGKILL) at any other. 11's list leaves out open_dprotected_np, 12's leaves out setattrlist, which a file's times can be set with, and from 13 on an unlisted call fails with EPERM instead (read from the guests' own profiles: 11.7.11, 12.7.6, 13.7.8, 14.8.9, 15.8.2 and 26.7.2 on x86-64, 27.0.1 on arm64). The bundle's earlier rule, that it import none of open(2)'s family, had sent its writes through Foundation, whose system calls nothing checked. Every Metal process loads the bundle, so its own writes now go through guest/bundle/src/RgfxFiles.cpp, plain POSIX calls whose system calls every list read takes, and guest/bundle/tests/files_tests.mm runs them, and the store over them, in a child under a sandbox that asks the kernel to kill it at every file call some list leaves out. That sandbox is not the whole check: on 27.0.1 the kernel kills under it at 67 of those 97 calls and lets the other 30, the ones that write (link, chown, utimes, pwrite, unlinkat, setxattr and others), through as if unlisted (measured: each call made under the sandbox, arm64 and x86_64). The test's first control, utimes, ran to its end and showed it. So the controls are calls the kernel does kill, and guest/bundle/tests/bundle_files_check.sh bans the bundle's imports of the library calls that make the 30. How to spot the next one: a sandboxed app's process dies at the bundle's first write with no fault in the bundle's code and a sandbox kill in its report, or the guest's log has a deny(1) syscall-unix line; guest/bundle/tests/bundle_files_check.sh fails on a Foundation file-writing selector or a file call that some list leaves out. And a sandbox a test builds proves only the calls its kernel is seen to kill: a control that runs to its end means that call gets through, so make each call of the list under the sandbox once before trusting it.
  • An object the bundle hands the app is the app's to lock. The bundle took @synchronized(self) in its command buffer, queue and function, and @synchronized(device) for the CPU copies' queue, and a command buffer's completion took the buffer's (rgfxLetResidencySetsGo, on both devices). An app that held its command buffer's @synchronized across the buffer's commit and waitUntilCompleted then waited for a completion that waited for it: the buffer never completed and the app never showed a window. Metal takes no such lock: with an app's @synchronized held on a buffer, a queue, a function or the device, Metal's work on that object on another thread finishes (measured on the M3 Max, macOS 27.0.1, guest/bundle/tools/oracle/oracle_locks.m). Each object now keeps a std::mutex of its own, the app-lock tests (guest/bundle/tests/queue_tests.mm, AN APP'S LOCKS) hold each lock and wait, each case in a child with a timeout, and guest/bundle/tests/bundle_sync_check.sh fails where the bundle imports objc_sync_enter or its sources hold a @synchronized. How to spot the next one: an app that waits at no CPU in a Metal wait while a thread of the bundle waits in objc_sync_enter or on another lock; and any wait in the bundle on a lock, a queue or a block the app controls (the completion queue it hands in, a listener's queue, a deallocator), on a path the app may itself be waiting on. Not every such hang is the bundle's: a completed handler that takes the lock its buffer's waiter holds waits for good on Metal too (oracle_locks' buffer-handler-lock).
  • A growing figure in Windows's "GPU Process Memory" counters is not a leak until available memory, the commit charge or DXGI's usage moves with it. A guest's video export on a Windows host grew the VM's GPU memory figure a few hundred MiB a session while every holder of ours read flat and dropping the VA display gave back 10 MiB. A program of the platform's calls alone, grown one piece of ours at a time (a kept display, the pool's textures, the plane draws), found the cause: an open of a texture's NT handle on the device that made it adds a charge in those counters that never comes down, even past the device's last release (docs/video/bugs.md, U34), and the VA driver's import by NT handle and the draws' open were two such opens, the same two the VM makes. Only a later run showed that available physical memory, the commit charge and DXGI's usage did not move with 1440 MiB of that charge. How to spot the next one: a Windows memory figure that grows in those counters (what Task Manager shows). Read available memory, the commit charge and DXGI's usage in the first job, before growing a program piece by piece.

The Vulkan platform

  • A rule that covers a list of shapes is only as whole as its list, and the list must come from every scenario that makes one, not from the cases the change already knows. A death at a depth or stencil texture whose size Metal's was not measured for exempted the shape of the two cases it named, a 2D Depth32Float_Stencil8 texture of two levels, and missed the Depth32Float_Stencil8 cube arrays and an X32_Stencil8 texture other scenarios make: the full suite died in all three, in every setup, where the change's own check had run a subset picked by name. Unit tests could not show it either: only the guest's serialized descriptors turn allowGPUOptimizedContents off. The scenarios build without a device, so the list can be exact: build every one with its descriptor builders wrapped, and list each descriptor of the formats in question with the scenarios whose ops carry its bytes. How to spot the next one: a new death at a creation call, checked by a suite subset rather than the full suite.
  • A copy of raw bytes carries the layout of every object over them. Core pages a legacy heap's bytes to and from the guest's pages through its buffer over all of the heap, so the guest's pages hold, and a texture of the heap reads after a page-in, whatever layout the platform keeps there. On the Vulkan platform that was the driver's: a native driver's own tiling, or on MoltenVK Metal's layout of MoltenVK's texture, whose usage can differ from the guest's and with it whether Metal compresses the texture (measured, legacy_heap_textures_are_metals_where_metal_keeps_them_plain). Nothing died or announced it, and no test or suite case read a heap's bytes over a texture. How to spot the next one: for any path that copies an object's bytes whole (paging, a buffer over a heap, an alias of the same memory), list every object that shares those bytes and ask whose layout each one's bytes are in.
  • A device test that builds its objects another way than core builds them checks another flow than the one the guest drives. Tests of objects over the guest's pages under a heap's texture (gpu::over_pages, a registry since deleted) made their heaps over the guest's pages at once, where core makes a detached heap over memory of its own, places the guest's textures in it, and gives it the guest's pages only at its first prepare, by a replace (resources/heap/detach.rs): in core's flow every check compared the guest's pages with core's temporary allocation. The same test replaced a buffer without the detach core makes first, which Metal refuses, so it died at its first line on its first GPU run and had never reached its assertions. Followed through core's flow, the registry never fired at all: core makes each detached heap's cover, its buffer over all of the heap, first and never releases it, so every texture the registry kept apart died at its placement beside the cover first, and the registry, which every command paid a check for, was deleted. Make test objects as the guest's flow makes them, ask of a check whether core's flow can reach it at all, and for a check of where an object lies, ask what changes where it lies after it is made: a replace, a detach, a discard.
  • A sweep shows a rule only where it holds an input on which two rules part. The colour fill packer (crate::gpu::fill, since deleted) was compared with Metal over thousands of colours, but its NaNs were only f64::NAN and -f64::NAN, and no double lay strictly between two integer edges, so three of Metal's rules went unmeasured and the packer missed all three: a signalling NaN into an integer channel stores the largest value, a NaN's payload survives into a half or float channel, and an R32Uint double strictly between 2^31 - 1 and 2^31 stores 2^31. How to spot the next one: a sweep of an encoding whose NaNs are all default quiet NaNs, or whose edge values are all exact integers; it must also hold signalling NaNs, payload bits at the positions each target format keeps and drops, and values strictly between representable edges.
  • An option of a release can move what the release does first. Without a keep-alive, metal2vulkan's earlier runtime freed a no-copy buffer's import and then ran the deallocator; given one (its D822), it ran the deallocator first, at Metal's moment, freed the import, and only then dropped the keep-alive. A keep-alive holding nothing would have moved every unmap a deallocator of core's makes before the free, on every release, and a driver that validates host-pointer imports at each submission fails on unmapped pages. The platform then gave the keep-alive what had to outlive the import: the record of the pages a device may pin, and a hold that made core's unmaps wait for the free (both since deleted with that platform). How to spot the next one: when a dependency adds an argument that changes when a callback runs, read the code that runs it for the order of everything else it does, not just the callback's moment.
  • A copy of a Vulkan handle keeps nothing alive. Shared shader modules each held a clone of ash::Device, a table of function pointers around a raw handle, which a review passed as harmless; a module released after the device's teardown then destroyed itself through the dead device, and runs on a software rasterizer (llvmpipe) crashed every time. A raw VkRenderPass copied into a pool's closure was the same slip. How to spot the next one: in a change that shares or caches a Vulkan object, or moves one into a closure, list every holder and check that each ends before the device and the loader do.
  • A record's flag is not the Metal storage mode of the same name. A guest buffer's or heap's private bit once read as Metal's Private storage, which the guest's CPU never reaches, and was not: the objects were Shared over the guest's pages, and the contract made them the pages themselves, which the guest reads and writes while the GPU uses them. Copies of those objects in a discrete GPU's own memory, moved only at a few points of their life, wrote whole objects back into pages the guest may have moved on from. In the first boot with them on an RTX 5080 Laptop GPU, the guest's WindowServer aborted 26 s after it started, on a corrupted malloc free list, and the session never logged in (video/bugs.md, B26). The suite could not show it: it ran on the Mac's Metal platform then, and the copies existed only on Linux discrete GPUs. Before a change keeps a guest object's bytes anywhere but the guest's memory, read what the protocol makes the object (graphics-kext/design.md), not its flags' names.
  • A process exits while its other threads run. The exit runs the exit handlers and the loaded libraries' destructors on the exiting thread, in the reverse order of their registration, and every other thread goes on meanwhile: one inside a GPU driver as the driver's destructors free its state ends the process, after its tests passed or as QEMU quits. Seen on the RTX 5080 Laptop GPU (NVIDIA 615.71.09): the awake thread's touches (the thread since deleted) segfaulted 79 times in a six-minute run of the workspace's tests, and test processes ended with SIGSEGV inside libnvidia-glvkspirv.so, the driver's SPIR-V compiler, after "ok": the scaler device's test (the scaler since deleted) in 2 of 3 full-workspace runs, its devices in statics never dropped and its make-ahead thread joined by nothing, and a device test of pin 22 under load, its device in a static. A static that holds a device, or a thread nothing joins, is the shape; the platform keeps its devices while a graphics device lives, so the library's threads take each job that may call a driver as a step of the exit gate (reims_vgpu_vulkan::exit_gate), whose exit handler, registered after the driver loaded and again after each making, waits for the steps in progress and parks every thread that takes the next. The earlier runtime's guard covered its own threads alone. How to spot the next one: a SIGSEGV or SIGABRT after a test's "ok", or at a quit, on a thread inside a driver's library, with the exiting thread in __run_exit_handlers or _dl_fini; a new thread of the library's whose jobs call a driver outside entry::run, a window's frame, the video runtime's exit_step or the gate's own steps is the next case of the class. Two more shapes of it, seen on the Iris Xe (intel-media-driver 26.3.5) as vaTerminate aborting in iHD's frees after "ok" in 2 of 90 full-workspace runs: a driver loaded after the gate's last registration, as vaInitialize loads a VA display's, registers destructors that run before the gate's handler, so the handler must be registered again after every such load (Runtime::arm_exit); and a call a crate makes at once on its caller's thread, as the VA crate's Calls makes a release where its call thread is idle, is a job too, and needs its own step. With both, 60 full-workspace runs under glibc's malloc checks ended with no failure at exit, where the code before them had 2 in 100 such runs (an abort in iHD's frees, and a SIGSEGV whose stack was not caught); a program of its own that calls vaTerminate after iHD's destructors ran, its display holding nothing, ends cleanly in 400 runs, so the abort needs a display with live decode state at the terminate.
  • A device live at the exit is enough, with no thread of ours in the driver. On an RTX 3090 (NVIDIA 620.70.06), a test of the device's check of textures over host pages (since deleted) ended with SIGSEGV after "ok": a worker thread the driver had started from the test's thread, named after it, faulted at a null dereference in libnvidia-glvkspirv.so while the main thread ran libEGL_nvidia.so's exit handler, which tore the driver's SPIR-V compiler down. The runtime's maintainers measured it with the runtime alone, 8 processes at once: 6 of 80 exits right after the device's check of textures over host pages ended faulted, 0 of 80 three seconds later, 0 of 80 with the device dropped before the exit. No gate orders that worker, as Vulkan has no call that waits for it, so the device must go before the exit: the C API's release of the process's last graphics device lets go of the device the platform keeps (RtPlatform::let_go_of_device), QEMU releases its device as it quits (its vm_shutdown, before the exit handlers), and a test that holds a device to its end lets go of it before it returns. How to spot the next one: a fault after "ok", or at a quit, on a thread named after the test's or the thread that made the device, inside a driver's library, with no thread of the library's in a driver; a new static that holds a runtime device, its objects or a thread with one, which the let-go does not take, is the next case. The process's platform (reims_vgpu::singleton::platform) was one: a unit test takes its device and never releases a graphics device, so the device stayed to the exit, and on an RTX 3090 (NVIDIA 620.70.06) two tiled-texture tests ended with SIGSEGV after "ok", rt's memory thread in vkDestroyBuffer while the main thread ran libEGL_nvidia.so's exit handler (2 of 2067 tests of one run, measured 2026-11-19). A unit test's process now lets go of its rt devices as the test's thread ends (reims_vgpu's rt_test_end), and fails the test where one is still held then. That end holds each platform strongly. Held weakly, it missed a platform whose last hold went on a thread the test had left holding it, as the test returned: an Arc's last drop takes its strong count to zero before the value's drop runs, so the end's upgrade failed while the platform's drop and its let-go of the device still ran on that thread, beside the exit. graphics::decode::cmdbuf's test of the platform's own indices printed ok, then died of SIGSEGV with the decoder's reims-vgpu.graphics-event-waits thread inside vkDestroyDevice while the main thread ran libEGL_nvidia.so.0's exit handler (RTX 3090, NVIDIA 620.70.06, 1 of 2440 tests under the suite's load, measured from its core 2026-11-20). How to spot the next one: a Weak kept to act on a value at some end, where another thread can hold the value's last strong reference; a failed upgrade does not say that the value's drop has finished.
  • An exit handler can end the process with _exit and skip every handler registered before it. metal2vulkan's earlier runtime registered its exit hook as it made a device, after QEMU's exit notifiers, so it ran before them; on Linux its wait for the runtime's work in progress was bounded (2 s), and past it the hook ended the process at once with _exit. With a device kept to the exit, a paused VM's quit (-S, then QMP quit) ended that way in 5 of 9 runs on an RTX 3090, the runtime's pipeline warm pass still in progress, and in 5 of 9 on an RTX 2080 (NVIDIA 620.70.06, measured 2026-11-19): exit status 0, no signal, but QEMU's pidfile left behind and its exit taking 2.5 s, since its notifiers (the pidfile's removal, usb-host's return of host devices to their drivers) never ran. The platform's quiesce ahead of the exit answered true there, as it did nothing. It then answered false while the platform kept a GPU device, and a quit whose release let go of the device still met the hook: 24 s into a boot on the RTX 2080, the let-go 315 ms after the quit, the hook waited for a pipeline's making still in the driver and ended the process 9.6 s after the quit, the pidfile left (measured 2026-11-19). A device's last drop did not end that runtime's work, and the hook stayed registered once a device was made. So the quiesce answered false once the platform asked that runtime for a device in the process, and QEMU runs its own exit work and then _exit, as it does on any false answer. rt registers no such hook, and its quiesce answers false while its device lives (api.md, "The process's exit"). How to spot the next one: a quit with status 0 that leaves the pidfile, or a host device not given back, and an exit about one bound after the quit; look for the runtime's notice on standard error that it ends the process at once.
  • Memory under a runtime import stays mapped until the runtime freed the import, and dropping the objects over it does not free it then. The import of a no-copy buffer a command buffer used is freed on the runtime's thread once that command buffer's completed handlers ran, after the guest, or a test, already saw its completion; a residency thread may free an idle one at any time. A decode test (shared_surface_composites) dropped its decoder and then its region, anonymous memory it had mapped itself (Region::new), whose munmap ran while a handler thread freed a buffer's import of the region: on a Radeon 780M (RADV, Linux 7.3.3, 2026-11-11) amdgpu's notifier walked the userptr's mapping that the free had just taken apart, and the kernel faulted (amdgpu_vm_bo_needs_update under amdgpu_hmm_invalidate_gfx, from the test thread's munmap), the GPU's work hanging until a reboot. The length of the munmap in the oops's registers, 0x8454000, was that region's to the byte. The platform's own memory then unmapped through its VM, which waited for every hold over the pages (since deleted with that platform): a test takes its region from the platform (reims_vgpu's platform::test_region), and memory the library did not unmap (a test's RAM, heap memory, its own views) was freed only once no import lay over it. The trap is any unmap of the OS's under an import, wherever it sits, not only Region::new's drop: a deallocator given with a keep-alive runs at the buffer's release, Metal's moment, before the runtime frees the import, so a deallocator that unmaps with munmap, mach_vm_deallocate or free takes the pages from under it. The window's mirror (graphics::mirror, since deleted) mapped its pages itself and unmapped them so in its buffer's deallocator: when a frame of another size made the mirror again, the old mirror's release unmapped its pages on the window's thread while a handler thread had yet to free their import, and the draw from the new mirror, the device's next submission, was rejected on a Radeon 780M (RADV, radv/amdgpu: The CS has been rejected ... (-14), EFAULT, pin 92 under load, job m3-max-30188), losing the device. The command buffer's stated resources were all live: RADV hands every pointer import of its device to each submission, and amdgpu faults in each userptr's pages at every one, so the import of pages that went fails a submission that never names it. The mirror's pages were then the platform's, unmapped through its VM. How to spot the next one: an oops or a lost device whose faulting thread is a test's or a host's and whose call is munmap, madvise or free, or a submission rejected with -14 whose resources are all live; compare its length with the memory the test mapped, then list every no-copy object over that memory and when the runtime frees each one's import, and every unmap of the OS's that runs in a deallocator or after a release.
  • A probe of what a driver does with an import can be the failure it looks for. The probe of whether a device keeps a pointer import's pages once its view is folded into a dma-buf (os::linux::import's probe_fold, since deleted) first folded the view and then ran a blit over the buffer: on the Iris Xe of RPL-P (ANV over i915, Linux 7.3.1, 2026-11-11), the probe's command buffer failed and the runtime lost and remade the device, at every device's making, its own and every test's (measured; the likely route, not traced: i915's userptr gets its pages again from their mapping after the fold unmaps the old one, and nothing pins a VM_PFNMAP mapping's pages). The probe now asks first with a change the driver survives either way: other pages of a file mapped over the view, which a driver that pinned the import (NVIDIA's) never reads and one that follows the mapping reads, failing the probe before any fold. How to spot the next one: a lost device (rt-device-lost) in a run that made only a device, with the driver's buffer dump naming the probe's buffer (host-ptr of the probe's size).
  • A trait method with a default answer is off wherever a wrapper forgets to forward it, and no test of the wrapped type sees that. Group dma-bufs (HostVm::view_groups and HostVm::group_views, defaulting to none; since deleted with the grouping) were implemented on LinuxVm and on the testkit's FakeVm, and every decoder test and the dma-buf tests passed; but the devices were given the platform's VM, remap::VulkanVm (since deleted), which wrapped LinuxVm and forwarded neither, so a Geekbench walk on the Radeon 780M (2026-11-14) grouped no view (its views log line: 0 imported as pieces, in 0 groups). A look at every default then found HostVm::view_mappings unforwarded since it was added: making room for a view read each cached view as holding no mapping, and let go of none. VulkanVm's impl then denied clippy::missing_trait_methods, so a method HostVm answers by default that it did not name failed clippy. How to spot the next one: a wrapper of a trait with default methods that has no such lint, or a counter a feature's log line prints that stays at 0 on the hardware the feature is for.
  • A window that batches requests with no answer is waited out by whatever must follow them, and one workload's batches say nothing of another's. The host held each pages block's view in its context's group dma-buf for up to 1 ms, sized from a Geekbench trace whose creates came 126 us apart, and Geekbench's walks did group most views (3,665 of 4,686, in 930 groups, on the Radeon 780M). On a desktop walk (macOS 26.7.2, Finder then Launchpad, 2026-11-15) the groups held one view each (559 of 559, and 549 of 550 in a second walk), and a view took 1.25 ms at the median from its begin to its make, nearly all of it the window: BUFFER_OVER_PAGES has no answer, the context's next message waited for the view on the context's lane, and the lane handed no later view over, so nothing could join. The finding first read as "the window never groups", and removing it would have cost Geekbench its groups; a group then closed instead once a ring-0 message of its context waited for it and the views handed over before had joined, and on the desktop walk 537 of 553 groups closed so, the view taking 0.20 ms. The grouping has since been deleted, as no platform turned it on once the Vulkan platform it served went. How to spot the next one: count a batch's members in every workload it serves before judging it, and ask what waits behind an open batch and whether anything can still join while it waits.
  • A size the device answers must not pass what the platform's shaders address. The device told guests a maxBufferLength of three quarters of the GPU's working set, sized for what the host's memory can hold (12821200896 bytes on an RTX 5080), but metal2vulkan's runtime keeps a shader's offset from a buffer argument's bound address in 32 bits: an access 4 GiB or more past it lands exactly 4 GiB lower, in the same buffer, with no fault and no log line (metal2vulkan's scratch_accesses_past_4_gib, job m3-max-42921, development 4e02a34a38: all 24 accesses past 4 GiB read or wrote the word 4 GiB below on the CPU interpreter, lavapipe and RDNA3, and every access within 4 GiB its own word). A test that makes a buffer of the answered size passes; only an access past 4 GiB in one shows it. The device now answers at most 2 GiB, which the new runtime's direct access form takes (device_info's BUFFER_LENGTH_CAP), and refuses a no-copy buffer longer than its answer, which the bundle then made at any length and now answers nil for, as the Intel 630 does (GraphicsDecoder::past_max_buffer_length). How to spot the next one: for each size the device answers (a buffer's length, a heap's size, a texture's bytes), find the width of the offset the platform's shaders and commands keep for it, and test an access past that width, not only an object of that size; and find every creator the guest can reach that takes a size, not only the ones the bundle bounds.
  • A place the guest checks against its heap can still miss the host's alignment, because rt checks it against the memory. Metal places a texture in a heap at an offset that is a multiple of the texture's alignment from the heap's start. rt checks the texture's absolute place, the block's memory base plus the heap's offset in its block plus the texture's offset in the heap, against the alignment the driver answers for the image. So a heap whose start misses that alignment refuses every texture in it, at whatever offset Metal accepts. The bundle pinned heaps in Private blocks on the 32 KiB address granule, while the Radeon 780M and the Iris Xe answer 64 KiB for an image, the RX 7900 XTX 256 KiB for a multisample one and the RTX 3090 1 KiB (measured). A macOS 26.7.2 walk on rt on a 780M logged 85 rt-refused-metal, every one a HeapTexturePlace such as "a heap texture of 524288 bytes aligned to 65536 does not lie at offset 0 of a heap of 2097152 bytes", and the GPU tests on the 3090 passed. The bundle now starts a heap in a Private block at a multiple of 256 KiB from the block's first byte (kHeapAddressAlign in guest/bundle/src/RgfxSerializer.hpp), and rt places a Private block at a multiple of 2 MiB in its device memory, so the absolute place is aligned too. Two walks after the change logged no such refusal. a_heap_pinned_in_a_block_places_textures_at_the_guest_s_alignment_on_vulkan sizes a sweep of heap textures (every SDK pixel format, texture type, sample count and level count) on the GPU it holds, places one of each alignment the GPU answers in a heap pinned where the guest pins one, and fails where the GPU asks more than the guest's 256 KiB, so a GPU that asks more shows in the checks before a boot (the module doc of crates/reims-vgpu-vulkan/src/rt_platform/heap.rs records each GPU's measured largest). How to spot the next one: rt counts a HeapTexturePlace that Metal's rule places as rt-refused-heap-texture-place, apart from rt-refused-metal. Any nonzero count is a heap whose start misses the device's alignment. More generally, where the guest picks an address that the host places objects at, check the host's alignment against the absolute address, not against the guest object's own start, and test it on the GPU with the strictest alignment.
  • Two platforms' imports of the same guest view can be imports of different mappings. With the guest RAM lease, a view of a guest's pages of more than one run is mapped through udmabuf, a VM_PFNMAP mapping that no kernel pin takes, and the rt platform handed rt its pointer: on an RTX 3090 (NVIDIA 620.70.06, 2026-11-19) the import failed with VK_ERROR_OUT_OF_DEVICE_MEMORY, 32 of the boot's later Vulkan calls were refused, and the desktop was black. The platform before rt's boot showed the desktop, and a comparison read that as that platform importing the same udmabuf view. It never had: it probed each device as it was made (since deleted), and on a device that refused a dma-buf-mapped view it mapped every view from its files from then on, so its import was of a file-backed view. rt never ran that probe. How to spot the next one: before calling two runs' imports the same view, print the view's VMA on both sides (/proc/self/maps, a /dmabuf: mapping against the memfd's file); the driver pins the mapping, not the guest's address.
  • A change of what metal2vulkan's runtime refuses reaches every test that makes the runtime's objects itself, and a test ignored on macOS sees it on the Linux and Windows legs alone. From development b676eda182 on, the runtime places a colour render target at a texture index and refuses one made with none (Refusal::TextureIndex). The rt platform's own makes took the new rule (a8e0361ed3), but the blit seam's two tests (seam::blit::tests) made their target with the runtime's Device::new_texture directly, on the earlier rule, and failed on every rt device. They were ignored on macOS then, where MoltenVK gave no rt device, so the Mac leg passed them by and only the batch's Linux and Windows legs could fail them (fixed by 47f29ca3d0). A pin move that changes a refusal runs the tests that call the runtime's makes themselves (grep -rln 'new_texture(' crates/reims-vgpu-vulkan/src --include='tests.rs') on a Linux GPU before its batch.

QEMU, the window and VM boots

  • A refusal that comes before the call it guards must leave the state as the call found it. The swapchain's remake retired the old swapchain whether or not the new one was made, and its make can refuse before vkCreateSwapchainKHR, where the window's surface has no pixels for now. Windows' window then still had the old swapchain, unretired as far as Vulkan knew, and each later remake, with no current swapchain left to hand over, made one with no oldSwapchain beside it, which Windows refuses while the old one lives (VK_ERROR_NATIVE_WINDOW_IN_USE_KHR). The window kept the installer's last frame through the rest of a macOS install while QMP's screendumps showed the guest going on, and minimizing and restoring it drew nothing (a Ryzen 5 5600G host with an RTX 3060, 2026-11-16); the log held one no swapchain yet (the window's surface has no pixels for now) at the guest's reboot and nothing after it, since a refusing swapchain logs only its first refusal. A make refused before the create now leaves the old swapchain the current one, stale, so the next remake hands it over. A create that is itself refused retires the old swapchain all the same, and a retired swapchain is the window's until it is destroyed, so the create after it, with none to hand over, was refused likewise for as long as the retired one lived: for good on a device without present fences once nothing new was presented. A remake with none to hand over now destroys the retired swapchains first (found in review, read from the specification of vkCreateSwapchainKHR and VkSwapchainCreateInfoKHR; swapchain::tests model both). That the later creates failed with VK_ERROR_NATIVE_WINDOW_IN_USE_KHR is read from code and the Vulkan spec, not logged. How to spot the next one: a window that stops following the guest after one logged refusal, while the host's read-back of the display does follow it.

  • An answer the newest Metal knows can be one an older Metal has no table for. The device answered the M3 Max's feature profile, 10, which 13.7.8, 14.8.9 and 26.7.2 create the device with; macOS 12's Metal keys every limit of a device on that profile, has none for 10, and left them 0, so WindowServer ended at device creation with a failed assertion that a limit be above 0 (-[_MTLDevice initLimits]), launchd gave up after 14 runs and the guest never reached its desktop. Unit tests and the boots of 14 and 26 passed throughout. The device now answers by what the guest's Metal has (guest/bundle/src/RgfxFeatureProfile.hpp). How to spot the next one: WindowServer crashing on com.Metal.DeviceDispatch under MTLAddDevice on one release and not the next; boot the oldest release of each answer's range, not only the newest.

  • A device-info answer chooses the guest's code, not only a value it reads. Answering Metal's SIMD bits of key 33 on the Vulkan platform, where they had followed the device, made hundreds more suite cases match Metal's, and a macOS 15.6.1 guest then died at boot: with the bits set, its frameworks chose a SIMD blur whose tile dispatch the runtime refuses, where before they took a fallback and booted. With that fixed, a 26.6.2 guest died at the next refusal down the same path, a sampler that path makes and the other never did. The suite's scenarios do not model the guest's choice, and guest shaders are never committed, so only a boot shows it. How to spot the next one: a change to what device info, GPU families or feature queries answer; boot the guests on it before it merges, and keep the old answer until they boot (AGENTS.md, "Checking a change").

  • A difference a boot already logs is a death on every boot once it is made one. A change that ended the process on two differences the Vulkan platform had logged passed cargo xtask check, and every macOS 26 boot then died early, at about 6 s on MoltenVK and 38 s on an NVIDIA driver, each at one of the two: the last good boot's log had counted 873 states with one and 20 with the other. No committed test runs the shaders a guest's boot draws. How to spot the next one: before a change ends the process on something the platform logged, look its code up in the last good boot's notice counts; any count there is a death every boot reaches.

  • A hop to another thread that the caller waits for is a wakeup the caller depends on. apple-gfx made each MMIO access on a thread of its ThreadPool while the vCPU waited in AIO_WAIT_WHILE, holding the BQL, for the job to set completed and call aio_wait_kick. One vmapple boot hung 3 million accesses in, at a doorbell write: the access had completed and no thread was in the library, yet the vCPU slept in aio_poll's select for good, and QEMU's main loop, its UI and the other vCPUs waited for the BQL it held. The wakeup was lost somewhere between the pool's job, aio_wait_kick's BH and the event notifier, and no stress test of the pattern reproduced it. The hop bought nothing, since an access waits only on the library's threads, which never wait on QEMU, so QEMU called the library on the vCPU's thread from then on, as the reims-graphics device's MMIO handlers do. Before a host waits for its own job on another thread, ask what the job waits on: when it is nothing of the host's, call it directly. When a sampled thread sleeps in a poll inside a wait loop and no thread runs the job it waits for, suspect a lost wakeup, not a slow job.

  • A build that reads a pkg-config package at configure keeps what it read. meson reads reims-vgpu.pc when QEMU is configured and keeps its flags, Libs.private among them, in its build files; a change to the package does not make it configure again. When the library came to need Carbon (the window's ISO keyboard check), a QEMU build configured before that linked the new libreims_vgpu.a with the old framework list and failed on two Carbon symbols. Neither cargo xtask check nor the suite links QEMU, and the smoke reads the package at each link. make qemu keeps a copy of the package it configured with (build/qemu/reims-vgpu.pc.configured) and configures again when the dist tree's differs. When a host that links the archive fails on a system framework's symbols after a library change, compare the dist tree's Libs.private with the flags the host's build recorded (for QEMU, the link line in build/qemu/build.ninja) before looking at the code.

  • A build directory carried across a QEMU move can lose a file meson has just written. meson, configuring or regenerating in place, runs ninja -t cleandead, which deletes every file .ninja_log records as built that the new build.ninja does not name, and a configure_file output is in no build.ninja. QEMU before 2026-11-13 made qemu-version.h with a build step; the QEMU of 2026-11-13 writes it with configure_file wherever git describe --match 'v*' fails, as it does in every shallow vendor/qemu (the installer's fetch, and this checkout's). Configured in place over the old build, meson wrote the header and then deleted it, and the build stopped at monitor/qmp-cmds-control.c ("qemu-version.h: No such file or directory") on the owner's update, on every later run too, since the old log entry stays. The 5080 boot that checked the move built in a fresh workspace and never saw it. install-ctl.sh and make qemu now build QEMU of another commit in an empty directory (qemu-source records the commit a directory was configured from). When a QEMU build fails on a missing generated header after a move, compare .ninja_log with build.ninja for that file before looking at the source; a check of a QEMU move builds once over the previous QEMU's build directory, as users' updates do.

  • A call into KVM from the device's file breaks every QEMU target without KVM, and only a build of such a target sees it. hw/display/reims-graphics-pci.c is in system_ss, built once and linked into every target, where CONFIG_KVM, which says a target has KVM, is poisoned, so a guard can only say what the host is: the pool's turning off of KVM_X86_QUIRK_SLOT_ZAP_ALL (vendor/qemu 0b8a0702) called kvm_check_extension and kvm_vm_ioctl under #if defined(CONFIG_LINUX) && defined(KVM_X86_QUIRK_SLOT_ZAP_ALL), which holds for every target on an x86-64 Linux host. qemu-system-aarch64 has no KVM on an x86-64 host, and accel/stubs/kvm-stub.c stubs neither function, so its link failed on every x86-64 Linux host from the pool's landing on (426724ff5, 2026-11-17), seen by the arm64 pin boot's build (m3-max-41948); make qemu, which builds qemu-system-x86_64 alone, and its boots passed, and the Mac's build compiled the block out. The device's KVM calls are now in reims-graphics-pci-kvm.c, which only the targets with CONFIG_KVM link, and the others link its stub, as hw/vfio does with kvm-helpers.c. How to spot the next one: a change to vendor/qemu that calls kvm_*, or another accelerator's functions, from a file in system_ss; build qemu-system-aarch64 on a Linux host (--target-list=aarch64-softmmu, as the arm64 pin boots do) beside make qemu before it merges.

  • An activity against App Nap can keep the host awake. NSActivityUserInitiated includes NSActivityIdleSystemSleepDisabled: the window's activity, begun with it for the process's life, kept the host from idle sleep for as long as QEMU ran. NSActivityUserInitiatedAllowingIdleSystemSleep keeps App Nap away and leaves sleep to the host's own settings (reims-vgpu-window/src/native/macos/app.rs). No test can see it: when a Mac stops sleeping while the library runs, read pmset -g assertions for the process first.

  • A VM's timings depend on whether the person at the host sees QEMU's window. Under -display cocoa, macOS napped QEMU 30 to 50 s after it lost the focus: every QEMU thread (the vCPUs and the library's FIFO and display threads among them) ran at priority 4, and Metal's compiler service ran QEMU's compiles at 0 to 4. A 26.6.2 guest booted that way reached its desktop at 215 s, and at 53 s when QEMU was kept in front (measured); it looked like slow compiles and shader caches. The library's window holds an activity against App Nap for the process's life (reims-vgpu-window/src/native/macos/app.rs). Before trusting a boot's timings, read the host log's Set AppNap state lines for QEMU's pid (log show --predicate 'process == "runningboardd" AND eventMessage CONTAINS ":<pid>]"'): active:Y begins a napped stretch, and the next focus (SETFRONT: pid=<pid>) ends it. Or sample its threads' priorities with libproc's PROC_PIDTHREADINFO: a QEMU whose named threads all sit at 4 is napped.

  • A system value that names the device last used is read at each use. HIToolbox's keyboard type (LMGetKbdType) follows the keyboard last typed on: the window read it once, when it opened, so a keyboard of the other layout plugged in afterwards (ISO in place of ANSI, or the reverse) swapped the key left of 1 with the key right of left Shift in the guest. InputState asks again at each key event (the window crate's native::is_iso_keyboard). When input maps right on one keyboard and wrong on another, look for a value read once that names a device.

  • A value the host sends is not the value the guest decides by. A display matching a Retina host screen was told 144 ppi and a scale factor of 2, and the macOS 13.6 guest still booted to a 1× desktop: it ignores the scale factor for its default, reads the size in millimetres as whole centimetres rounded up (611.04 mm is 62 cm), so it saw 141.6 ppi, below its HiDPI threshold (reims-vgpu-window's policy). Unit tests of the policy passed throughout, since they checked what was sent. When a guest-visible choice misses, boot the guest and read what it made of the values (ioreg's DisplayAttributes, /Library/Preferences/com.apple.windowserver.displays.plist), from a fresh clone, since the guest keeps its display settings per display.

  • A threshold measured in the units the library tells is not the guest's rule when the guest reads them in coarser units. The window predicted a macOS guest's HiDPI default as "more than 143 ppi across the told millimetres", but the guest rounds the told width to whole millimetres and then up to whole centimetres, and switches between 146.666 and 146.667 ppi across that: 2560x1600@146 reads 45 cm, 144.5 ppi, and ran 1× while the window sized itself for 2×. Nor was it one rule: 1280 pixels wide stayed 1× at 216.7 ppi, and 5832 wide ran HiDPI at 128.8 (reims-vgpu-window's policy). Measure a guest's threshold with inputs that land near it in the guest's own units (here, pixels across whole centimetres, chosen by width and density), split the rounding models with a value between them (440.39 mm, which reads 44 cm only when rounded to whole millimetres first), and vary the width to learn whether one number decides it.

  • A value one guest decides by is not proof another does. The arm64 guest's default scale follows the size its display publishes, and the x86-64 guest's was taken to follow its EDID's the same way; it does not. The x86-64 macOS 26.7.2 guest started at 1x on every mode from 2400 to 3648 pixels wide with its EDID at 110, 220 or 330 ppi, and HiDPI only from 3840 (window probes on a KDE screen at 2.1); on a screen at 1x, with no mode valid for HiDPI, it still started HiDPI at 3888 pixels wide. Its CoreDisplay reads other inputs first (read from its code): a display starts HiDPI on a default mode of at least 3840 × 2160, from 3800 pixels wide where its EDID is 32 inches across or more, and, only where it is built in (kIOConnectionBuiltIn in IODisplayConnectFlags, which the framebuffer answers for kConnectionFlags), on a default mode of at least 2048 × 1536 at more than 160 ppi. Our framebuffer answered no flags, and its EDID was the window's size at 110 ppi, 90 × 48 cm at 3888 × 2072. A first reading of the code missed that the 3800-pixel rule applies to built-in displays too; the scale-1 probe caught it (m3-max-17050). How to spot the next one: before sending a value to move a guest's choice, send it an extreme of that value (here 330 ppi) on each architecture, and check the choice moves; where it does not, look for what the OS reads before that value, and probe every branch of the rule read from the code, at every host scale, before trusting the reading.

  • A display that stays the same display to WindowServer keeps its mode while the framebuffer lists it. The x86-64 EDID's size (bytes 21 and 22, whole centimetres) followed the native mode, so each window size was a new display to the guest (a new UUID, and a new IODisplay prefs key, which hashes the whole EDID), and a mode chosen at one size was not kept at another. An EDID made from the host screen's scale alone kept one UUID across sizes, and the guest then stopped following the window: WindowServer kept its 3648 × 2038 HiDPI mode, which the framebuffer lists until a mode is set again (RgfxDisplayModes.hpp), through five resizes (m3-max-16832, macOS 26.7.2). An override for the display in /Library/Displays (target-default-ppmm) did the same before. WindowServer also matches a stored choice by its mode's size, so a stable identity would carry no choice across sizes anyway. The EDID now names the window's size in a text descriptor, so the identity still changes with the size while its physical size does not. How to spot the next one: after any change to what names a display (its EDID, serial or vendor, an override), resize the window twice and check that the guest's mode follows it.

  • A mode the framebuffer keeps listing for a reader mid-change is a mode WindowServer can take. The framebuffer lists the mode set until another is set, since WindowServer can read the list while the device's mode changes (RgfxDisplayModes.hpp). Listed valid, it was a target for WindowServer's restore: after the person chose 1x at 3360 × 1956, a resize to 2304 × 1410 left the guest on 3360 × 1956, drawn scaled into the window, on 11.7.11 with development's kexts as with ours (m3-max-17124, 17103), on 12.7.6 to 15.8.2, and on 26.7.2 with development's (m3-max-17140). Its log set the old mode on the new display, with no "no saved conf" line: the restore matched the saved configuration past the new UUID (by serial or location, read from CoreDisplay), then found its mode in the list. The framebuffer now answers such a mode never shown and not valid. How to spot the next one: a guest whose mode is one the device no longer offers; read WindowServer's IOFBSetDisplayModeAndDepth lines for a mode set after the change.

  • A snapshot of the guest's page tables shows the processes that happen to be on the CPUs. The probe that read a macOS guest's PTEs over BAR 2 through QMP walks each vCPU's current CR3 at one instant, and it found every user page there uncached (the guest PAT's UC-) in every arm, the same 1010 pages each time, while the bench encoding into write-combined spans ran: the bench was not on a CPU at that instant, and the pages were another process's. A reading of xnu's fault path that missed its block-map path for physically contiguous objects (vm_fault's pmap_map_block_addr, which maps in the object's own cache mode) seemed to agree, and the write-combined spans were reverted and restored the same day: with them draws.10k encoded in 1.05-1.3 ms on the Radeon 780M host, without them in 7.7 ms (measured, 2026-11-07). How to spot the next one: before a page-table snapshot rules out a mapping, check that the snapshot holds the process that makes it (its CR3, or the same pages in it in the arm that should differ), and trust the A/B of the figure the mapping is for over a reading of the kernel.

  • A guest-side command under timeout never runs on macOS, and the harness reads the miss as a timeout. macOS has no timeout(1) (it is GNU coreutils'), so a copy of a boot harness that ran timeout 30 kmutil showloaded in the guest over SSH got the shell's "command not found" (status 127) and reported "kexts: FAIL: kmutil timed out" on every release from 11.7.10 to 26.7.2. It looked like the harness it was copied from, whose kext check had failed on a real wait (the guest's first sudo held kmutil's start for about 155 s, measured with a polled background job), so it was waived as that known fault for a day of boots; run as perl -e 'alarm 30; exec @ARGV' kmutil showloaded, it listed the loaded kexts at once (measured, 2026-11-08, 11.7.11 on llvmpipe). Bound a command in a macOS guest with perl -e 'alarm N; exec @ARGV', or on the host side of the SSH. How to spot the next one: a check that fails the same way on every guest release, whose command goes through timeout on the guest's side; run the command bare once and read its status.

  • A VM made from an existing disk is a new Mac to its macOS when its OpenCore image presents a new UUID, and that new Mac does not shut down. reims-ctl create --disk with no image made one presenting a Mac of its own, and every reims-ctl stop of a macOS 26.7.2 disk waited out its 180 s and powered the VM off, since Setup Assistant (-MiniBuddyYes) was up from about 10 s after boot and it ignores Control-Option-Command-Power and the power button. Our kexts kept answering throughout, so it looked like a guest hang. The disk's user preferences held com.apple.loginwindow MiniBuddyLaunch = 1 for any host and 0 in the ByHost file of the Mac it ran on. ByHost files are keyed by IOPlatformUUID, which is OpenCore's SystemUUID, and the new UUID had none, so loginwindow took the any-host 1. Presenting the disk's own Mac, read from the image beside it, the stop shut the guest down in 9 s (measured, 2026-11-08, Radeon 780M host; create.rs, disks_mac). A copy of the disk of a VM reims-ctl has still gets a Mac of its own, since it can run beside that VM and two VMs presenting one serial number, MLB and ROM would be one Mac to Apple's services. What remains: a stop still powers off at its timeout whenever Setup Assistant is up, as on a new install's first boot until it is finished, on a disk with no image beside it, on such a copy, and with MiniBuddy's panes after some updates (scripts/internal/guest-minibuddy-off.sh). Nothing the host can send without the guest's password ends it. The keys and the ACPI power button (QMP's system_powerdown) both went unanswered for the whole 180 s. QMP's other power requests (system_reset, quit) are a power-off, and a macOS guest runs no guest agent. Only sudo shutdown -h now inside the guest shut it down, in 6 s (measured 2026-11-07). How to spot the next one: a guest that ignores a shutdown request; read ioreg -rd1 -c IOPlatformExpertDevice's UUID against the UUIDs in ~/Library/Preferences/ByHost, and look for Setup Assistant -MiniBuddyYes in ps.

  • Host GPU work on a present's path that fits a refresh under load can miss it at a low frame rate. The present's answer waited for the window's draw of it, and on an RTX 5080 Laptop GPU the guest's 30-frames-a-second probe saw every frame a refresh late (2.7 refreshes from commit to presentedTime at 120 Hz, against 1.6 at 60 Hz on a 780M), while in its uncapped run each present was answered at the first refresh after its show: between frames the GPU clocks down, and WindowServer's composite took 4.4 ms of its time and the window's draw 4.9 ms, against 0.5 ms each at 120 frames a second (measured 2026-11-08, macOS 26.6.1, 3840 x 2400). The answer now comes at the refresh after the show (graphics::present). How to spot the next one: measure a present path's latency at a capped low rate as well as uncapped, and look at the host's per-present timing lines (reims_vgpu::graphics::present_timing at debug) for the step whose time grows as the rate falls.

  • A guest framework can look for the GPU by what a Mac's GPU states and give up silently where ours states otherwise. On a macOS 11.7.11 guest, Safari 14.1.3 said only "Could not create a WebGL context.": OpenGL drew in a plain process and in one with no WindowServer connection, and no sandbox denial was logged. WebKit's ANGLE, which runs Safari's WebGL on OpenGL there, refused to start ("Unable to query ANGLE's SystemInfo.", read through EGL_KHR_debug by calling the guest's WebCore's own EGL_* exports from a probe): it found no GPU, since our PCI device's class-code read 0x038000, where both GPUs of an Intel Mac state 0x030000 (measured, macOS 26.7.1). With the kext stating 0x030000 on the PCI device's registry entry (guest/kext/src/RgfxPciClass.hpp), ANGLE started and Safari made its context (measured, 2026-11-08). How to spot the next one: when a guest feature fails with no log of ours and no denial, run the framework's own entry points in a probe with its debug output on, and compare what the guest's registry states for our GPU (ioreg -l on the PCI device and the accelerator) with an x86 Mac's.

  • The system's LLVM exports a different C API on each release. The bundle's GL lowering takes the GL code generator's module through GPUCompiler's libLLVM.dylib, and asked for LLVMGlobalGetValueType along with the rest; GPUCompiler 31001, on macOS 11.7.11, 12.7.6 and 13.7.8, does not export it, so every GL shader variant was refused there ("a GL shader variant was not made: the system's LLVM has no LLVMGlobalGetValueType"), and AppleMetalOpenGLRenderer fell back to software processing that drew nothing: a GL triangle left the clear color, and Safari's WebGL canvas on 11 stayed its clear color (measured, 2026-11-08). The build Mac's and 26's GPUCompiler 32023 export it, so the bundle's tests on the build Mac never met it. The lowering now takes a function's type from its pointer's pointee where the call is missing (RgfxGLLowering.cpp's functionType). How to spot the next one: an RGFX: ... the system's LLVM has no ... line on an older guest; before calling a symbol of the system's LLVM, list which releases' GPUCompiler export it (a probe that dlsyms each one in the guest).

  • The GL renderer draws a whole draw in software when any one object it makes for the draw fails, and says nothing: its GPU vertex processing reads 0 until every pipeline the draw needs and every reflection it asks for is answered. A GL tessellated draw makes a compute pipeline of its vertex and control shaders and a render pipeline of its evaluation and fragment shaders. Once the bundle made the kernel one Metal compiles, the draws still ran in software, for two independent causes the next boot showed side by side: the compute pipeline's reflection was answered nil, for a built-in the reflection had not measured (RGFX: compute pipeline of __main: no reflection (a built-in air.stage_in_grid_origin was not measured)), and the host refused the render pipeline at a key of the post-tessellation vertex function's control point field (UnknownKey, air.position, m3-max-30327). How to spot the next one: when a GL draw stays in software after a fix, read every was refused line in QEMU's log and every RGFX: line of the process in the guest's log, not only the one the fix was for, and check each pipeline creation's return and reflection, not the draw's alone.

  • In an A/B of two boots in one job, the boot that runs first can stall far more than the second, whatever it runs, and the order alone can pass for a gain. A scroll A/B of two metal2vulkan pins on the 780M ran the old pin first and the new one second: vkQueueSubmit calls of 8 ms or more fell from 22 to 1, which read as the new pin's gain. The same two arms in the reverse order gave 20 and 1. The first boot, the one after a build or a perf run's post-processing on the same host, had the stalls, and the second had almost none, whichever pin it ran; an earlier A/B of two other pins in one order had shown 13 against 4. Lost frames followed the order as well (41 and 59 for the first boots, 37 and 41 for the second). How to spot the next one: a difference that an A/B shows in one order only. Run the arms in alternating order (A B B A) after a warm-up boot whose numbers are discarded, and compare boots in like positions.

  • Synthetic input at the display's rate, on the clock the refresh grid runs on, keeps one offset into the refresh for the whole run, and an offset at the frame's edge halves the frame rate. The boot harness turned the wheel 60 times a second on the host's monotonic clock, as the refresh thread ticks, so each scroll run's clicks fell at the same point of every refresh for all 15 s, a point set by when the run happened to start. Of 8 runs on the 780M whose clicks fell between 1.7 ms before a refresh and 1 ms after it, 6 had 1.6 to 6 s of WindowServer compositing at every other refresh, with every present answered on time and Safari's page reporting 60 frames a second; of 23 runs at 1.3 to 15 ms after a refresh, none had more than 0.43 s. Started at chosen offsets (10403), 0.3 ms and 15.2 ms gave 3.5 to 6.1 s of it each and 112 to 192 frames lost, and 9 ms gave none and 2 to 29 frames lost. Across runs it read as a device stall that came and went. How to spot the next one: a loss that a run has either for seconds or not at all, with nothing on the host changing at its start. Measure where the input falls in the refresh (the present_timing lines give the grid), and start periodic input at a set offset mid-frame.

  • A guest's frame rate on a host running a build measures the vCPUs' share of the CPU, and reads as a slow display. One cold arm64 macOS 27.0.1 boot on the M3 Max ran check-boot's metal-app probe at 39.1 frames a second with the guest's CVDisplayLink at 45.4 Hz and few drops, a minute after a boot of the same binary ran at 60.0: a full-core cargo xtask dist had started on the same Mac between them. QEMU's HVF vCPUs started at the default QoS, a build's, so a vCPU running the guest's work got the share of one more CPU-bound thread; beside 64 spinning processes the guest's own 5 ms sleeps woke up to 1.9 s late and the probe ran at 22.5 frames a second, while a host thread sleeping to a 60 Hz grid, as the device's refresh thread does, kept every tick (measured 2026-11-11, docs/qemu.md, "Beside a build"). QEMU now starts each HVF vCPU at the user-initiated QoS (vendor/qemu's 5658f96c), and the probe ran at 59.9 beside 64. How to spot the next one: CVDisplayLink below the display's rate with few drops, the pipeline warm's "within N s" line far above its usual 1.5 to 3.5 s, and other jobs' builds on the host in the boot's minutes (potluck status, its running and recent jobs); time a sleep loop in the guest and one on the host during the probe to tell the guest's CPU from the device's refresh.

  • A VM in the cgroup of the process that started it shares the CPU with that cgroup's other processes by nice alone, and a host's policy can give QEMU a higher nice than a build's. reims-ctl left QEMU in its caller's cgroup, where ananicy-cpp's nice 9 for qemu-system-x86_64 (its Heavy_CPU type, on CachyOS) weighs each QEMU thread at 110 against a nice-0 compiler's 1024: on a host with 16 threads, 16 spinning processes in that cgroup kept an x86-64 macOS guest from finishing a 10 s present_probe in 2 minutes (measured 2026-11-11, docs/qemu.md, "Beside a build on Linux"). In a systemd user scope of its own, as reims-ctl now starts it, the guest ran the probe at 39.7 frames a second beside the same 16. How to spot the next one: /proc/QEMU_PID/cgroup names the caller's unit (a terminal's, an SSH session's, a potluck job's) rather than reims-ctl-NAME.scope, and ps -o ni= -p QEMU_PID shows a nice above the build's.

  • A build started from a bash shell can run at a nice below 0, and a measurement "beside a build" that starts its build at nice 0 measures a lighter load than a user's. ananicy-cpp's rules on CachyOS give bash its Doc-View type, nice -4, which every process the shell starts inherits: a build typed into a bash terminal, and every potluck job's commands (its shell is bash), compile at nice -4, while the same rules run qemu-system-x86_64 at nice 9 (measured 2026-11-13 on homelab-um870-1 and homelab-ms01-1: a job's bash read nice -4 within seconds of starting, and rustc, cc1 and ld under a cold cargo xtask dist from it ran at -4, SCHED_OTHER; docs/qemu.md, "Beside a terminal's build on Linux"). How to spot the next one: ps -o ni,cls,comm over the build's compilers and QEMU's threads, recorded with the run, and grep -rh '"bash"' /etc/ananicy.d; a load meant at nice 0 starts under nice -n $((0 - $(nice))).

  • A guest check that reads nothing reads as a pass. check-boot's three reads of the guest's log (the AMFI half of amfi-map, page-count's kext lines and ax-matrix) ran log show over ssh, where the guest user's shell is zsh and its log builtin takes the name: log show --last 1s prints "zsh:log:1: too many arguments", its stderr went to /dev/null, and grep -c printed 0, so amfi-map and ax-matrix passed on every boot without a line read and page-count said each boot that the kext logged no count (measured 2026-11-11, arm64 macOS 27.0.1, type log over ssh: "log is a shell builtin"). The reads now name /usr/bin/log, and page-count's reads sudo dmesg: the kexts' IOLog lines reach the kernel's message buffer but not the unified log, where process == "kernel" lists IOPCIFamily's and Graft's lines and none of ours. How to spot the next one: a count that is 0 on every boot whatever the boot does; run the read by hand once, without its 2>/dev/null, and give each read a positive control (a line every boot logs).

  • A debug line a guest process logs on OS_LOG_DEFAULT can be out of reach of every read of the unified log, so a counter read through it reads as no line at all. The guest bundle's resource-wait counter (RgfxResource.mm, an os_log_debug on OS_LOG_DEFAULT, at most once every 10 s a process) gave its lines to log stream --level debug on macOS 11.7.11, and none on 26.7.2 or 12.7.6 (measured 2026-11-11, x86-64 guests on the um790's 780M): there the stream, with a predicate naming the line, reported dropped messages under a walk's load and kept none of them. On 26.7.2 the log store kept none either: log config --mode 'level:debug,persist:debug' with no process or subsystem does not persist debug lines (persistence is set per process or subsystem), and log config --process PID with that mode refused the pid of a probe configured at its start. A counter read through the unified log needs a subsystem of its own (os_log_create, whose debug lines log config --subsystem persists) or the default level, which the store keeps. How to spot the next one: a count of no lines from a guest's log; read the same line from a process known to log it, in the same run, before reading the zero as a count. The bundle's os_log lines now go to a subsystem of their own, ai.aneesiqbal.reims-graphics (guest/bundle/src/RgfxLog.hpp): after sudo log config --subsystem ai.aneesiqbal.reims-graphics --mode 'level:debug,persist:debug', log show --debug --predicate 'subsystem == "ai.aneesiqbal.reims-graphics"' returned the counter's line from a probe that waits on resources in flight, on x86-64 26.7.2 on um870's 780M and arm64 27.0.1 on the M3 Max (measured 2026-11-12, potluck m3-max-19988 and m3-max-19999). Such a probe reads a resource's answers once its command buffer is scheduled: before that, the device answers YES and returns at once, as the M3 Max, the Intel 630 and the AMD 5300M do (RgfxResource.h), and logs no count.

  • A guest tool that finds no default Metal device on macOS 11 to 13 may only lack CoreGraphics. Apple's page for MTLCreateSystemDefaultDevice says: "In macOS, in order for the system to provide a default Metal device object, you need to link to the Core Graphics framework. You usually need to do this explicitly if you're writing apps that don't use graphics by default, such as command line tools." A probe of Foundation and Metal alone got nil from it on 11.7.11, 12.7.6 and 13.7.8 (m3-max-15427, 15428 and 15429), from ssh and from the GUI session alike, while MTLCopyAllDevices listed the device; the same binary with CoreGraphics loaded before the call got the device on all three, and on 26.6.1 and 26.7.2 it got the device either way. It read as a fault of the device or its registry entries for a round, and a tracing library that happened to link CoreGraphics made it vanish. An AppKit app loads CoreGraphics and gets the device. How to spot the next one: a guest tool on 11 to 13 that lists a device but has no default; link it to CoreGraphics, or load CoreGraphics before the call, before suspecting the device.

  • A frame count over a fixed time from a new window's start measures how soon the guest shows the window, and right after login under TCG that is the guest's launch storm, not the device. On arm64 macOS 14.6.1 under TCG on homelab-um870-1, with nothing else running on the host, the guest held 213 to 234 runnable processes on its 4 vCPUs (load average 457 to 600, no idle time) 3 to 4 minutes after QEMU started, a load average of 80 to 220 three minutes later, and 11 to 20 at 13 to 15 minutes. check-boot's metal-app probe ran in that storm. In nine boots its full-screen window was first visible 2.1 to 8.1 s after it ordered it front, and in a tenth not within its 11 s, which then dropped all 245 frames and failed (jobs m3-max-17482 and 17602 with the device on the Radeon 780M, the failure among them; 17679 and 17862 on the RTX 3090). Two spindumps over the probe's first 15 s (17862) placed the time. WindowServer's main thread was idle in its services loop in 58 to 62% of the samples, on CPU in 32 to 35%, and waiting on tccd in 5 to 6%; it never waited in our kext. The probe's own launch waited on syspolicyd, sandboxd, tccd, cfprefsd, LaunchServices and notifyd; tccd's, launchservicesd's and trustd's threads were runnable in 1,500 to 3,900 samples each and on CPU in at most 32. In a traced probe on the 3090 (17679) the library completed every command buffer within 9 ms of its commit. A host build beside the probe stretches the guest's side, not the device's: with a cargo xtask dist from scratch on 12 jobs running through the whole probe on the 780M (m3-max-17945), the probe's call over SSH took 121 s against 53 to 62 s in quiet boots on the 780M, its main thread was runnable in 163 of the 165 samples after its exec, and it presented 24.5 frames a second against 49 to 57, while its window was shown 8.3 s after it ordered it front, at the slow end of the quiet range. The host's memory pressure stayed at most 3.1% (avg10), and the library completed 704 command buffers over the probe at 1.04 ms p50 and 3.4 ms p99 from commit to completion. During the call, amdgpu's order-9 page allocations for new buffers compacted and reclaimed directly 8 times in metal2vulkan's threads, at most 0.06 ms each. Wait for the window to be shown before counting (present_probe -v), and read the wait (visible_s) apart from the frames.

  • A probe whose window is never shown drops every frame, which reads as a device that presents nothing. present_probe in a titled window (-w 1280x720), started in the user's session over SSH with launchctl asuser, on an arm64 macOS 14.6.1 guest under TCG, got no occlusion change in its 10 s and dropped all of its frames (600 and 593) in each of two boots. Each time WindowServer logged CPS: Denying present_probe the right to be in front because it is not in the list of permittedFrontASNs as it started. The same boots' three full-screen probes at the status level, started the same way, showed theirs (jobs m3-max-17482 and m3-max-17602). Before reading a probe's frames, read whether its window was visible (NSWindowDidChangeOcclusionStateNotification) and what WindowServer logged for it. check-boot runs the probe full-screen at the status level, which needs no right to be in front.

  • A pixel test with a fixed threshold can read a defect as gone when the guest's own colours change under it. On the M3 Max, arm64 macOS 27.0.1's weather widget drew its glass edges as white strips or a comb of white ticks in blocks 8 pixels wide, and a scorer took a column's pixels with every channel at 240 or more as the defect. A runtime change was judged a fix on three boots the scorer read as clean. The widget draws the sky where it is: in the 33 screens saved from 2026-11-09 23:03 to 2026-11-11 15:14 it was navy, with the strips #FFFFFF, up to 06:16, and blue, with the strips #E7E7E7, from 06:31 on, so every boot from mid-morning read as clean. Read again with a test against the region's own colours (near white and near grey, where the widget is blue or navy and the wallpaper warm), the three boots were two combs and a strip, and none of the 33 screens was clean. How to spot the next one: a clean result that comes with a change in what the guest draws (the time of day, a widget's data, a wallpaper, dark mode); score against the colours around the defect, not a fixed value, and run the scorer on a screen known to show the defect, taken under the same conditions, before trusting a clean result.

  • A region of the screen that one composite draws wrong can be the compositor's redraw of what changed, drawn from textures that were already wrong, and not a region whose own surfaces failed. On the M3 Max, arm64 macOS 26.6.2's Dock lost every icon from x 1384 to 1664 after a Terminal quit, cutting iPhone Mirroring's icon in two, or drew the icons left of x 1384 as fragments: WindowServer had redrawn its damage rectangle, and the icons outside it were the previous frame's pixels. The lead the shape suggested, a copy-path upload torn by another process's write, could not apply there: the host's log said every IOSurface was in place (IOSurface pages in place: ... 0 answered a cache), and the bundle's per-surface upload logging counted no upload in three boots. What the result followed was the size the icons were drawn at: right after a Dock restart at 32-pixel tiles every icon was an outline, at the largest tiles the screen allowed (about 60 pixels) every icon was right, and 25 s later at 32 pixels they were right again, which points at a texture's lower mip levels and not at the icons' content (the only mipmapped textures the guest made were WindowServer's per-frame pyramids, each level drawn by a pass that samples the level above in the same texture). How to spot the next one: an edge of the loss that cuts one drawn object in two; read the host's in-place line before suspecting the copy path; and draw the same content at two sizes (the Dock's tilesize, then killall Dock), since a defect that follows the size is in the mip levels.

  • A boot on a disk overlay stalls where the users' disk does not, and the stall reads as the host's or the guest's. Safari's page load on the 780M once showed an 847 ms requestAnimationFrame gap (run 12101, macOS 26.7.2): a guest page-in waited about 700 ms while the host's I/O pressure stood at 75% full for 2 s, and a guest flush, a non-NCQ command on AHCI whose host fdatasync stalls the whole port, was suspected. That boot ran on a qcow2 overlay over the shared VM's disk. Traced on homelab-um790-xtx-1 with QEMU's AHCI commands and the host's block layer side by side (2026-11-11, two boots of each layout), the overlay's guest writes waited up to 1.90 and 1.96 s, with up to 25 commands outstanding and none completing, where a reflink clone of the same disk, the copy reims-ctl makes, kept every write under 28 ms; flushes took 3 ms at the median and at most 843 ms on either. Each first write to an overlay cluster reads the rest of its 64 KiB from the base image, cold, compressed and checksummed on the btrfs /home, through the SSD, which now and then took 1.8 to 2.0 s over a single read; writes to the overlay behind such a wait queued on its inode lock (btrfs_buffered_write, behind btrfs_start_ordered_extent_nowriteback). The same slow reads came on the clone and stalled no guest command. How to spot the next one: a stall a harness's boot shows during host I/O pressure; read what layout its disk had, and boot a reflink clone of the same disk (cp --reflink=always) before putting it down to the guest, the device or the host (qemu.md, "Booting a guest to check a change").

  • A guest that lists no disk can be a boot whose drivers have not finished starting, and the device it was moved to takes the blame. On 2026-10-27 a new macOS 26 VM with its disk on NVMe booted Recovery slowly and found no disk; reims-ctl's default went back to SATA, and its help sent a disk on NVMe to SATA before an install. Two video drivers of that day's guest set waited in their start, with no timeout, for an IOSurface mapper that macOS 26's Recovery leaves unbound, and Recovery stopped at the Apple logo's progress bar on AHCI as on NVMe; the set that bounds only those waits reached the menu in 40 s and listed the NVMe disk (qemu.md, "x86-64 macOS guests: the disk on NVMe"). How to spot the next one: before blaming the device, boot the reported stack with the device moved back, then change one part of the stack at a time (the guest set, QEMU, the image); a progress bar under the Apple logo that slows and stalls on either device is a start that blocks. A kext's start that waits for a service bounds the wait (RgfxAccelerator's for IOSurfaceRoot is 10 s).

  • A device's reset runs only when the guest reboots inside one QEMU, which no cold boot does, so a reset that keeps state passes every boot check. Under HVF, vmapple's in-kernel GIC kept every SPI's enable, pending and active bit across a guest reboot (its put wrote each SPI's bits 32 IRQs low and its clears as 0), and the AES engine kept the words of an unfinished command in its FIFO: a macOS 27.2.1 restore OS that panicked and rebooted in a loop met AES errors in 234 of 391 boots from boot 31 and AppleVirtIO data aborts in 8 from boot 111, and never on a first boot. A reset is checked with a reboot loop in one QEMU, counted over hundreds of boots against the unfixed build in the same harness.

  • A walk holds its GPU and its RAM, not the host's CPUs, so another job's load reads as the change's cost. An after-walk on the 780M (pin 64, macOS 26.7.2) lost frames through six steps in a row, up to half of them (autoscroll 44.8 to 33.0 presents a second, gl3d 40.1 to 28.4, safari-video 25.4 to 18.0, heic 3.6 to 1.9), and its surface asks' p99 went from 2.3 to 9.0 ms; another lane's full build ran on the host through exactly those steps' four minutes, and the driver's submit stalls rose with it (submit_stalls_on_work 6 to 945 in gl3d, which made 12 asks). The same build walked again with the host to itself matched the before-walk in every step (6246 presents against 6211). How to spot the next one: a loss confined to a run of consecutive steps, while the steps around it match; before reading it as the change's, list the node's jobs over the walk's clock window (steps.tsv), and walk again alone once.

  • A guest failure that only the harness's device configuration reaches belongs to the harness, so walks run reims-ctl's devices. The appwalk harness kept one virtio sound device with an output and an input stream after reims-ctl moved to a playback-only device and a capture-only one (bca8c6e7f). On it, macOS 11.7.11's coreaudiod died in 1 of 4 walks at the tip, and the crash read as a new fault in our virtio-snd: AppleVirtIOSound starts and stops the input stream with every output there, and frees a stopped input ring while its four receive buffers are still posted, so each sound could crash it (12 rounds of system sounds did, m3-max-25374, as on vendor/qemu from before our capture changes, m3-max-25417), where on reims-ctl's two devices 60 rounds started no input stream and it lived (m3-max-25414; qemu.md, "x86-64 macOS guests: audio"). How to spot the next one: before reading a failure as the product's, diff the harness's QEMU command against reims-ctl's (crates/reims-ctl/src/qemu.rs) and boot once with reims-ctl's.

  • A QMP command that waits for a device holds every QMP monitor, and a release under the BQL waits for every callback that takes it. QMP's screendump is a coroutine command: it waits until the console's update is done, and QMP's dispatcher runs one command at a time for every monitor, so reims-graphics-pci's read of the display waiting for a GPU that never answered (NVIDIA's Xid 109, RTX 2080 and RTX 3090, 2026-11-12) left query-status, system_powerdown and every other screendump unanswered until the quit, while HMP, the vCPUs and the guest went on. And the device's teardown at the quit held the BQL across the library's release of its last device, which waits up to 5 s for the library's threads, while route_doorbell, which one of those threads calls as a command queue is made or ends, takes the BQL: a queue made or destroyed as the VM quit held the quit for the 5 s, read in review (commitpath2). A late read now answers the update with what the console shows (REIMS_GRAPHICS_PCI_READ_LATE_MS), and the release at the quit runs with the BQL let go. Before a device answers QEMU later than at once, bound what the answer waits for; before a host call that waits for the library's threads runs under a lock, list the callbacks that take that lock. The next one shows as QMP silent while HMP answers, or as a quit that takes 5 s and logs that "the GPU device stays for the process".

  • A window over a Metal app decides how much the compositor draws, so two timed runs whose desktops differ read as a change in the build. Apple's Modern Rendering sample, started over SSH and so never the active app, ran at 5.21 frames a second on um870's RTX 3090 (macOS 26.7.2) in one run and at 4.74 to 4.89 in each run after a guest commit, WindowServer's context at 252 to 286 render encoders a second where it had done 47, and the commit was blamed. The desktops differed: in the fast run no active window lay over the sample, and in the slow ones an active window with a glass sidebar did (System Settings, open after login, or the Finder window the harness's desk reset opened with open -a Finder), and WindowServer's context ran about 2 command buffers a frame of the sample, of 26 to 30 render encoders each, against about 1 of 10. Two builds without the commit, run with System Settings active on the 780M, read the same 2 command buffers and 49 to 51 encoders a frame; and one build read 4.74 frames a second and 285 encoders a second with the Finder window over the sample (m3-max-26185), and 5.18 and 36 with the sample brought to the front (m3-max-26247). How to spot the next one: bring the app under test to the front before timing it, take a screenshot mid-run, and where WindowServer's encoders per command buffer moved between two runs, compare their screens before their builds.

  • The loader's VK_LOADER_DEVICE_SELECT does not pick the GPU on a host with Mesa's device-select layer, which every node and msi carry (vulkan-mesa-implicit-layers). The layer sorts the GPUs after the loader has, and puts its own default first unless MESA_VK_DEVICE_SELECT (or DRI_PRIME) names a GPU, so the loader's pick ends up behind it. On um870, with an RTX 3090 and a Radeon 780M (loader 1.4.363, Mesa 26.2.6), VK_LOADER_DEVICE_SELECT=0x10de:0x2204 alone listed the 780M (the boot VGA device) first, in a job with no window system; MESA_VK_DEVICE_SELECT=10de:2204, or both variables, listed the 3090 first; the loader's variable alone did so only with the layer off (NODEVICE_SELECT=1) (measured, 2026-11-14, job m3-max-30538, through reims-ctl __vulkan-probe). The library took the first device whenever one of the selection variables was set, so it opened the layer's default and logged it as the user's pick; device_choice now opens the device a variable names, by its IDs or its PCI address. reims-ctl names a VM's GPU in both variables (crates/reims-ctl/src/gpu.rs). How to spot the next one: a run whose device line (metal2vulkan's the device NAME:) is not the GPU a variable named; list the order under the variables with reims-ctl __vulkan-probe, which prints one line a device in the order an instance sees them.

  • Another queue of the same family is not another engine, and a kernel's writes across a link take that engine for the link's time. On an RTX 3090 on PCIe 3.0 x4, the window's mirror synced on a queue of its own, new_command_queue_unshared. Its tile kernel wrote 27 MB of changed tiles into host memory at each sync. Under a GPU-bound guest each sync waited 71 ms behind the guest's command buffers, and the guest drew 11% fewer frames than with the window presenting from the 3090 (docs/graphics-kext/design.md, Decided 14). The desktop walk the route was measured on the day before had shown it winning: there the guest's command buffers were short and the GPU idled between them. What fixed it was a copy engine: a queue family of transfers alone, which runs beside the graphics family (graphics::mirror, "On a copy engine", since deleted: rt presents from its one device). How to spot the next one: host work on a present's path that crosses a GPU's link from a kernel or a graphics-family copy. Measure it under a GPU-bound guest as well as on the desktop, and read the frames the guest drew, not only the bytes the link carried.

  • A register guard that feeds a crate through a test stand-in for its caller keeps passing after the caller's wiring is gone. features.md's Cursor entry, where the window draws the guest's cursor once the guest moves it on its own (094a50318, 2026-10-26), was guarded by three tests in the window crate, and one of them handed the window the guest's position through a test FrameSink. Only apple-gfx's display answered that sink method. The reims-graphics display's window never took the position: its WindowScreen dropped MOVE_CURSOR's place, and its presenter dropped the cursor the window handed it (c13f8acb6, 2026-10-30). When 110b53637 deleted apple-gfx (2026-11-07), no display fed the window, and all three guards kept passing. The gap reached users in master f378a38f8: a mouse passed through to the guest with QEMU's usb-host, or a warp of the guest's own, moved the guest's cursor and drew nothing in the window. A reims-vgpu test that sends SET_CURSOR and MOVE_CURSOR on the device's control ring and reads what the window would draw (graphics::tests::the_window_draws_the_cursor_the_guest_moves_on_its_own) failed at once, and features.md now names such tests in other crates as guards (test: <crate>::<module>::<name>). How to spot the next one: a guard whose input comes from a test double of the code that calls the crate. Find the production caller of the method the double answers. Where none reaches it (here FrameSink::guest_cursor_position, which no production sink answered after the deletion), guard the feature from the device or the C API.

  • A pointer a harness moves over a locked session goes to its lock screen, and reads as a window that sends the guest nothing. The walks of the pointer across two displays on homelab-um790-xtx-1 (macOS 26.7.2, 2026-11-15, jobs m3-max-34772 and 34801) moved KWin's cursor over both windows with a uinput pointer of their own, and QEMU's trace (-trace input_event_abs) showed no event from either window's console. The node's KDE session had locked itself while idle (loginctl show-session gave LockedHint=yes, and the screen saver was active, job m3-max-34820), and the lock screen, over every window, took every pointer event. A windowed walk unlocks an idle-locked seat0 session first (loginctl unlock-session), locks it again at its end (loginctl lock-session), and stops where it may not unlock, as on the owner's laptop. How to spot the next one: a windowed walk whose host cursor moves while the window's console logs no input; read the session's LockedHint before suspecting the device.

  • A measurement's own output can make the stalls it records. With REIMS_VGPU_TRACE writing to a disk whose writes stalled (um870, 2026-11-15), the trace's writer flushed its buffer every quarter second while holding the lock every traced thread takes, so the rest of the device's threads waited behind the flush: the guest's WindowServer command buffers waited 31 to 219 ms at ring 0's gate, and a 4K HEVC loop on the RTX 3090 showed four gaps over 60 ms between present answers, each at one of those waits. A later run of the same loop on the same GPU and guest, with the trace on tmpfs, had no gap over 60 ms and no buffer waiting over 11 ms. The writer now writes on a thread of its own (core::trace). A harness that stamps each log line as it reaches the log file shows the same kind of artefact: the lines can reach the file in bursts, so the gaps between stamps are not gaps between the events. Time the present answers by their own refresh numbers (present_timing's take, show and answer times after a refresh) instead. How to spot the next one: gaps that line up with the measurement's own writes or with the host's I/O pressure; rerun with the output on tmpfs before chasing them.

  • A compositor's pointer confinement need not take the pointer to the region's edge. The window's captured pointer was to leave for another display when it came within a host point of an image edge that display meets. On KWin on Wayland (msi-laptop, scale 1.9, macOS 26.6.1, 2026-11-15, job m3-max-35056), a uinput mouse pushed left at about 5 points a move stopped 2.6 points short of the image's left edge and stayed there: KWin keeps a confined pointer where it was when a move would take it out of the region, and does not slide it to the edge. The same walk's push to the right edge happened to land within the point and crossed, so one direction passed and the other never did. The window now leaves within 32 points of the edge, moving toward it (reims-vgpu-window's beyond::REACH), and the guest's cursor goes on from where it is. How to spot the next one: a pointer that is to do something at the edge of a confined region and does it in one direction alone; read where the pointer stopped (the guest pixel it sent last), not where the harness pushed it.

  • A notification popup is stacked above every window, a keep-above one too, and takes the pointer where it lies. The 26.7.2 walk on homelab-um790-xtx-1 (2026-11-15, job m3-max-35123) moved the pointer into display 1's window, and the guest's cursor stopped short at 3 of 9 points, each where the path entered one of four plasmashell notifications left on the screen (stacked above the windows, at x 1461 to 1793). A windowed walk closes the desktop's notification and on-screen-display popups through KWin before it moves the pointer, and lists any window stacked above its own. How to spot the next one: points that land short along the path the pointer took into a window, at the same place across runs; read KWin's stacking order.

  • A name the guest builds from a number is spelt the guest's way, and a sample of random values can miss the case where the spellings differ. reims-restore named a VM's personalized Cryptex1 and restore tickets with its ECID padded to 16 hex digits, and the guest looks for the name with no leading zeros, so a VM whose ECID began with a zero digit, about 1 in 16, finished its EACS first boot (BaseSystem takes the unpersonalized ticket) and then restarted for good with "missing personalized manifest in full security" (measured, a 14.6.1 restore). The done checks of three other releases had passed, each on a random ECID with 16 digits. When code formats a number into a name, path or value the guest reads, take the width from the guest's own form, and test with a value whose leading digit is zero.

  • A process Windows makes inherits every inheritable handle of its maker, not only the standard handles it is given. reims-ctl made QEMU through std's Command, which creates each process with handle inheritance on, and turned inheritance off on its own standard handles alone, so reims-ctl start | tee returned; any other handle reims-ctl's starter had left it inheritable still reached QEMU and stayed open for the VM's life. nextest on homelab-mac-mini-2018 flagged the detach test LEAK for it: the detached ping held nextest's pipes, which the test process's own spawn of reims-ctl's test binary had passed on (m3-max-36289). With that spawn, a pipe whose write end the starter left inheritable stayed open until the detached process ended, 10.8 s after its starter closed it (m3-max-36661). QEMU is now made with PROC_THREAD_ATTRIBUTE_HANDLE_LIST naming its standard input and its log alone (crates/reims-ctl/src/os/windows.rs, spawn_detached). How to spot the next one: a pipe's reader, or a file that won't delete, waiting on a process its writer started detached; nextest's LEAK on Windows; a process that outlives its starter made through std's Command on Windows.

  • A setting the guest sends in pieces is the identity only once its pieces are all in, and the pieces pair by what they undo, not by their form. An arm64 WindowServer sets its ICC chain through set_block, one curve or matrix at a time, each half (a layer's Src2XYZ then XYZ2Blend; the display's Blend2XYZ then XYZ2Device) first piece first. Judging the whole chain after each block found it off the identity between a half's two pieces, which would have refused every block from a half's first changed piece to its last (2 at a change of primaries alone, 8 at the switch to Generic RGB, each a "Failed to set ICC" line). Pairing the curves by form, decode against encode across the halves, holds for sRGB, where all four are sRGB's, and fails for Generic RGB, whose layer half has a linear toe and whose display half has none (6e-4 off near black), though each half alone is the identity (measured 2026-11-16, arm64 macOS 27.0.1, jobs m3-max-35928 and m3-max-36021). RgfxMobileICC.hpp holds each half's first piece and judges the second against it. How to spot the next one: replay a capture of the pieces in their order and check the answer at each step, and switch the setting to a case whose pieces differ in form (a profile, a mode) before trusting a pairing.

  • A number a guest framework sends can be its release's own, so a capture on one release fixes it for that release alone. An arm64 WindowServer names each ICC block by a type number and each stage by a location number through set_block, and the display was built from 27.0.1's captures (matrix 0x33, curve 0x34, Blend2XYZ at 12) and tested by replaying them. 26.6.2 numbers each block one below (matrix 0x32, curve 0x33), and there the display refused every block: the matrices as a type it did not know, and the curves as a matrix of the wrong size, 10 "Failed to set ICC curve" and 10 "matrix" lines at login where 27.0.1 logs one (measured 2026-11-16, jobs m3-max-36214 and m3-max-36238). 14.6.1 and 15.6.1 number the blocks as 26.6.2 does; the curve block is 0x248 bytes on 14.6.1 (m3-max-36326) and 0x258 on 15.6.1 (m3-max-36411), where 26.6.2 and 27 send 0x290; and 14.6.1 has one tone map stage fewer, so its stages from Blend2XYZ on sit one lower. 27.2.1 numbers everything as 27.0.1 does (m3-max-36378). The unit tests and 27.0.1's boot passed throughout. RgfxMobileICC.hpp now reads each measured release's numbering by the kernel's major version, maps only the locations measured on that release, and refuses the rest. How to spot the next one: a value from a capture that names a kind (a type, a selector, an index into an enum, a structure's size) is the capture's release's; capture it on every release the code serves, and count a boot's refusals on each.

  • A Windows host's event log read by time stamp mixes sessions whose clocks differed, so another night's records pass for a crash's aftermath. The Mac mini's outage during a recovery boot on 2026-11-15 (job m3-max-32768) was read as a hard hang followed by a planned upgrade, because a Kernel-Power 41 and an update were stamped after it. Those records came from the night Windows was installed: until its first time sync, Windows on that Mac hardware stamped events from the firmware clock, 8 hours ahead. Read in record order (RecordId), the log showed the host going to sleep, a wake two hours later, and a power-button shutdown, and two recovery boots on the same host then ran 15 minutes each with no stop (m3-max-38393, 38473). Order a Windows log by its record numbers before reading a sequence in it, and check that the boot a record names is the one under study.

  • A hardware decoder's failure can be the host's own work starving it. NVDEC answered status 8 for 3 of 1,797 decodes of a guest's 2160p H.264 decode-back on an RTX 3090, each in the last frames of a pass, while the same stream decoded clean on NVDEC with no VM. A REIMS_VGPU_TRACE timeline put each failed decode, 210 to 298 ms from its submit against a median of 14 ms, inside a burst of the device's own copies of caches into the guest's RAM at BLOCK_RELEASE: the guest's decoder process let its outputs go together, and the kext let past its caps go at once those the client still held. Dropping those copies left no decode failing, and pacing them is the fix (surface_cache.rs, "Releases' pace"). When hardware failures cluster at a workload's end or in bursts, line the failed jobs' waits up against the device's own GPU work before suspecting the stream or the driver.

  • A kernel that copies CPU state at fixed offsets is right only on the CPUs whose layout it was written for. XNU copies a thread's AVX-512 state (k0-7, zmm0-15's upper halves, zmm16-31) between its save area and the x86_AVX512_STATE64 flavor at Intel's XSAVE offsets, 1088, 1152 and 1664 (fpu_get_fxstate and fpu_set_fxstate, osfmk/i386/fpu.c, read from code), while the save area holds what the CPU's XSAVE wrote, at the offsets CPUID leaf 0xD gives: on a Zen 4 core 832, 896 and 1408. A signal's frame (sendsig) and its return (sigreturn) go through those copies, so with AVX-512 state on under KVM on a Zen 4 host, a thread that ran AVX-512 without checking the feature read other bytes than its registers held in its signal frame and through thread_get_state, on every release from 11.7.11 to 26.7.2, and lost k3 across a signal handler on 12.7.6 and later; nothing logged it, and the guest booted and ran as before (measured, 2026-11-20 and 21, with the promotion and without the copy, m3-max-63651 among them). RgfxGate's xstate route copies the current thread's state with XSAVE and XRSTOR of components 5 to 7 at leaf 0xD's offsets (rgfx_xstate.h, xstate_test; tests/xstate_sigproof.c asserts it in a guest). How to spot the next one: a kernel or framework that names an architectural layout by constants, run on a CPU of another vendor; read the layout the CPU reports (CPUID) beside the constants, and round-trip known register values through the path (a signal handler, thread_get_state) before trusting it.

  • QEMU in a rootless container sees only the USB devices plugged in as it starts, so a passed-through device that re-enumerates never comes back to the guest, and nothing logs why. On the M1 Pro under Fedora Asahi Remix, where QEMU runs in a rootless distrobox, an iPhone given to an arm64 VM came back from each reset as a new device number (as QEMU took it from ipheth, and as usb_host_close reset it), and QEMU's info usbhost never listed the new number, though the device's file was there and the user could open it (measured 2026-11-24, docs/qemu.md "arm64 guests: USB passthrough"). Its auto-check kept trying the old number (usb_host_open_failure dev 1:3). How to spot the next one: a usb-host device that shows in the host's lsusb but not in QEMU's info usbhost; compare the two before suspecting the guest or the controller.

  • A margin sized as a measured spread plus one of its parts counts that part twice, and a run's own start hides its worst start. dsound's playback reserve was sized as the 61 ms that the fill at each period's arrival ranged, plus a timer run 30 ms late; the 61 ms already held the timer's wait, and every run started where it happened to on the guest's 41.67 ms post grid, so no run showed how near the reserve the posts could come. Split a reserve into its measured parts (here the guest's post spread, the wait for the write, and DirectSound's 10 ms cursor steps) and replay the trace from every start the stream could take: the smallest reserve with no gap at any start is the margin's largest fall from a post's write to any later read (qemu.md, "Windows hosts: sound"). A run at 56 ms had no gap at its own start and would have had one at 1 of its 2,235 possible starts.

  • A change to how the host backs guest RAM can overwrite the guest's memory minutes into its use, and a boot that ends at the desktop does not see it. QEMU's 53e76630 moved a memfd's preallocated guest RAM onto 2 MiB pages with an madvise once the prealloc had run, before any device was realized. It was measured with one boot to the desktop at each of shmem_enabled's advise and never, on a discrete RX 7900 XTX (2026-11-23), each with no fatal line. A user's x86-64 macOS 26.7.2 guest on the reims-graphics device, on an integrated Radeon 890M (RADV, Mesa 26.1.8, Linux 6.18.59), then panicked 80 to 154 s into each of 5 boots, its kernel's memory overwritten (issue 185). The reporter's bisect: the device with that commit panicked; the prealloc with the madvise skipped ran clean for 20 minutes; the madvise with plain VGA in place of the device ran clean. The writes were the GPU's, read from code: Linux 6.11 to 7.1 build a udmabuf's scatterlist with an entry per 4 KiB page naming a large folio's head page and the page's offset in it, and amdgpu's dma-buf import walks that table by DMA page, counting an entry at folio page k as k + 1 pages, so under dma-direct (an AMD integrated GPU's default identity domain) the buffer's pages after the first were bound to other guest pages (upstream fixed it in 7.2, 5bf888673e0d; our lab ran 7.3, where the same workout on a Radeon 780M ran clean, m3-max-74522). QEMU's de738a41 took the madvise out; 695ad62c put the collapse back, and since 458f4b7b reims-ctl and the device refuse a Linux host below 7.2 (qemu.md, "Linux hosts: guest RAM's pages and the kernel's release"). How to spot the next one: a change to what backs or maps guest RAM (its pages, their size, where they sit) is proven by the guest in use for longer than such a fault takes to show, with apps drawing, on an integrated GPU and a discrete one, not by a boot that ends at the desktop; and a lab on one kernel line proves nothing of a kernel path that changed between lines, so read that path (here drivers/dma-buf/udmabuf.c) in the oldest kernel users run.

Tools and worktrees

  • A walk measures its own tree, and a finding read against another tree's code can be about code that is gone. The rt allocation-stall walks of 2026-11-19 (pl10rt to z0rt) ran trees branched from b266 (bfa8ccd8e) and found each 144 MiB staging buffer of the IOSurface caches' copies paying a 13.4 to 14.6 ms CPU zero on a ring thread; the finding was read against development's surface_cache.rs, and a fix for the zero was asked for. Development had b267 (01799ceba) by then, whose staged form stages every cache's copies (44ca23e42) through buffers made unzeroed (47135d241): the zero the walks measured was no longer there, and the copies they timed came from another path, a deferred block's attach whose view rt gave no buffer. How to spot the next one: a walk's record names its tree's base, the development commit it branched from, and a finding about a code path is checked against that path at development's tip before a fix is built (git merge-base --is-ancestor <the commit that changed the path> <the walk's tree>).

  • A file named for a device Windows keeps keeps the whole tree off Windows, and no check outside Windows sees it. crates/reims-restore/src/aux.rs landed with the restore batch (ad3b37b8e, 2026-11-16 02:03) through every check, as none checks the tree out on Windows, and from then on no Windows checkout of development worked: AUX, like CON, PRN, NUL, COM1 to COM9 and LPT1 to LPT9, is a name no Windows file takes, with any extension, so git for Windows refuses the path (invalid path, under core.protectNTFS, on by default). A Windows user's clone failed, and potluck seeded no workspace on homelab-mac-mini-2018 (m3-max-35864), so every Windows job at the tip failed before it began. A name holding <>:"|?*, or ending in a dot or a space, fails the same way, and two paths that differ only by case check out as one file. cargo xtask paths, the first step of cargo xtask check, checks every path git ls-files lists, the reims-ctl and reims-restore workspaces' among them. The next one shows as a Windows job, or clone, that fails before it starts with invalid path from git.

  • A checkout Git for Windows makes holds every text file with CRLF line ends where the repository says nothing of line ends, and a build that hashes its sources then fails there alone. Git for Windows' installer sets core.autocrlf=true, and a user's install.ps1 clone of development held all 1730 text files CRLF: cargo xtask dist stopped in reims-vgpu-vulkan's build script, whose sha256 of the .metal sources no longer matched metallibs/metallibs.toml (2026-11-16). No check saw it, as every check's tree comes from a Mac, from Linux or from potluck's carried tree, never from a clone Git for Windows made. .gitattributes keeps the committed bytes in every checkout (text=auto eol=lf), but git does not write again a file a later checkout leaves as it was: a CRLF clone moved past .gitattributes keeps each file the move does not change CRLF, which install-ctl.sh's rewrite_crlf writes out again. How to spot the next one: a hash or byte comparison that fails in a Windows checkout alone; git ls-files --eol shows w/crlf against i/lf.

  • A build script's C compiler is the one the environment names, and a host's own setting there reaches every crate that builds C. A user's Windows install of development stopped in sdl3-sys's CMake build: CMAKE_C_FLAGS held MSVC's flags (-nologo -MD -Brepro -W0) where CMAKE_CXX_FLAGS held clang's (--target=x86_64-pc-windows-gnu), and CMake took Visual Studio's cl.exe by its full path, whose test compile failed once MSYS2 had turned /nologo into C:/msys64/nologo (2026-11-16). cc-rs 1.5.1 takes cl.exe from Visual Studio's install for an MSVC target alone, for C and C++ alike, so only CC (or HOST_CC, CC_<target>) can split them; and the cmake crate (0.1.58) gives CMake no compiler on a Windows host for a windows-gnu target, so CMake reads CC itself. Our runs never met it, as no host of ours sets CC. install-ctl.sh on Windows sets the compilers, archiver and CMake generator for every build it runs. How to spot the next one: a C build that takes another compiler on one host; compare its C and C++ flags, and read the environment of the shell the build ran in.

  • A Windows user's folder can hold a space (C:\Users\First Last), and QEMU's build and SDL3's refuse one, so a path under it fails where none of ours do. With a profile named Test User on the mini (2026-11-16), QEMU's configure stopped on its build directory in ~/.cache/reims-ctl ("main directory cannot contain spaces nor colons", which it checks of its source directory too), and with the checkout in the profile, as install.ps1 cloned by default, sdl3-sys found no SDL3 ("could not find native static library SDL3"): it reads the pkg-config file of the SDL3 it built under cargo's target directory, and a space splits that file's -L path. No alias of a path keeps the space out: Python's realpath, which meson applies to its source and build directories, turns an 8.3 short name back into the long path, and a volume can have no short names at all (the mini's P: has none). The builds run in folders without spaces instead: install.ps1 clones into C:\reims-vgpu where the user's folder has a space, and install-ctl.sh builds QEMU in the checkout's target directory where its cache directory is in one, and stops at once on a checkout with a space. How to spot the next one: a build step that fails on one Windows machine alone; look for a space in the paths it was given.

  • A dependency reims-ctl takes is built for Windows too, and only a Windows build sees it. reims-ctl's arm64 restore (b5ad91b93) made it depend on reims-restore, written for the Mac and Linux, and with it on std's Unix FileExt, libc's flock, statvfs and signals, so reims-ctl built for Windows no more (m3-max-35871), though its tests, rustfmt and clippy passed on the Mac and Linux, the hosts its checks run on. The next one shows only in a Windows build of reims-ctl, on the mini (cargo check --all-targets in crates/reims-ctl): look there when a change gives reims-ctl a dependency or an OS call. reims-ctl's os module, reims-restore's sys and reims-apfs's file_at hold each OS's form.

  • A path normalized where it is read stops matching the bytes it was recorded with elsewhere. reims-ctl knows a VM's QEMU runs by finding its pid file's path, byte for byte, on QEMU's command line (runtime::pid_at). On Windows a reims-ctl from before f5474d258 recorded a VM's directory with / inside it (C:\Users\me\.local/share\reims-ctl\vms\mac) and started its QEMU with -pidfile in that form. Once the registry's directory was read in Windows' own form, \ alone, the match missed: a VM that QEMU still ran read as stopped, and delete would have removed its files under it. Only the mini's tests caught it, because one test's directory was mixed by accident (env.root.join("vms/x"), m3-max-39353); on macOS and Linux, where nothing is normalized, they passed. On Windows the match now takes / and \ as one. How to spot the next one: before normalizing a recorded value, find every comparison of its bytes with a copy made from the old form (a process's command line, a file written with it, a key), and test one made from the old form.

  • A hard link shares a file's bytes, so code that may write the file it opens writes the original too. A live check of the IPSW download hard-linked the owner's cached 27.2.1 IPSW into a scratch cache as a finished .part, expecting the downloader only to hash it and read the CDN's 416 for a range past the file's end. Apple's CDN answers that 416 with Content-Range: */25595954706, without the bytes unit RFC 9110 puts there (measured 2026-11-11), which the downloader's parser didn't read, so it took the part for a wrong one, and its start-over truncated the part in place, and with it the owner's file. The downloader now never truncates or rewrites a file: it starts over by unlinking the part and making a new one, and learns the length first, so a whole part is only hashed. How to avoid the next: a live check never links an owner's file; it uses an APFS clone (cp -c) or a reflink, whose writes don't reach the original, or a cache of its own. Before linking anything, read the code for every write and truncate it could reach.

  • A shell script under set -u with an EXIT trap passes when it aborts, on macOS. Measured with macOS's /bin/bash, 3.2.57, 2026-11-08: a script that reads an unset variable under set -u stops there and exits 1, but with any trap ... EXIT set it exits 0, and $? is 0 inside the trap too, so even a trap that exits with the status it saw passes it on. guest/rgfxgate/tests/payload_test.sh removed its scratch from such a trap, and a case that read a shifted-away argument stopped the script at its first bundle while make -C guest test went on green. Each script that pairs them now keeps an ended flag, set at each deliberate success end, and its trap turns an exit 0 short of that end into 1 and keeps any other status: trap 'rc=$?; CLEANUP; [[ $rc != 0 || $ended == 1 ]] || rc=1; exit $rc' EXIT (an exit 1 from the trap does set the status after such an abort). How to spot the next one: a check that reports green with less output than it should, its last lines missing; look for set -u (or set -euo pipefail) beside trap ... EXIT in a script that runs on a Mac, and give it the flag.

  • git stash is one list, shared by every worktree of a repository (refs/stash is not per worktree), so a stash pushed in one worktree can be popped into another. Set work aside with a WIP commit on the worktree's own branch, or a patch file under /tmp, never a stash. When changes appear that nobody in the tree made, or a pop conflicts with files the tree never touched, suspect another worktree's stash.

  • A shared CARGO_TARGET_DIR runs another tree's xtask. Cargo keys a workspace member's build by its path inside the workspace, not by where the workspace is, and calls the binary fresh when no source file at those relative paths is newer than its last build. So a worktree whose files predate the other tree's last build of xtask runs that build, made from the other tree's sources (measured on two copies of one package sharing a target directory: the second cargo run -v printed Fresh and ran the first copy's binary). Give each worktree its own target directory under ~/.cache. When a tool behaves as if a change were missing, look for Fresh in cargo run -v.

  • An archived tree's files carry their commit's time, so cargo can take a dependency's new sources for its old build. git archive stamps each file with the commit's time and tar -x keeps it, and rsync -a keeps the source's times; cargo calls a path dependency fresh when none of its source files is newer than its last build. Exporting a newer metal2vulkan commit over a tree built after that commit's date left the runtime Fresh: one cargo command reported a new item missing while another, which rebuilt, compiled it. After every extract, stamp the files with the time of extraction (tar -xm, or find <dir> -type f -exec touch {} +), and check that the next build's log shows Compiling metal2vulkan. When one cargo command sees a dependency's new item and another does not, or cargo build -v prints Fresh for a dependency whose sources just changed, look at the sources' times.

  • rustc's incremental state can fail a build that is sound. After an edit to reims-vgpu-vulkan, an incremental cargo clippy --workspace --all-targets --all-features failed in reims-vgpu with E0275, an overflow evaluating metal2vulkan_runtime::heap::HeapShared: Send for the window's Vulkan sink, whose auto-trait walk through the runtime's types runs near the recursion limit, or with an internal compiler error, "encountered incremental compilation error with evaluate_obligation". The incremental cache keeps the result of one order of that walk, and the edited crate's build takes another; a comment appended to a file of the crate reproduces it, and a build of reims-vgpu from nothing passes, as does one with CARGO_INCREMENTAL=0. The cure is cargo clean -p reims-vgpu before the check. How to spot the next one: an E0275 or an ICE naming evaluate_obligation in a crate the change did not touch, after an edit to a crate it depends on, that a clean build of that crate does not show.

  • A submodule shared by several worktrees has one core.worktree. When a superproject worktree's vendor/qemu is a linked worktree of the main checkout's module repository (.git/modules/vendor/qemu/worktrees/<name>), git submodule update there writes that worktree's path into the module's config, which every worktree of it shares. From then on every git command in the main checkout's vendor/qemu acts on the other worktree's files: a fast-forward moves the main checkout's branch and writes the other directory, the main checkout's own files stay at the old commit, and git status and git diff report the other tree's state. git -C vendor/qemu rev-parse --show-toplevel must print the main checkout's vendor/qemu; restore it with git config --file .git/modules/vendor/qemu/config core.worktree ../../../../vendor/qemu, run from outside the submodule, since git reads the broken config before any flag. Give a worktree that builds QEMU its own clone of the submodule, or leave its submodule uninitialised, and remove a linked worktree of the module with rm -rf and git worktree prune, never git worktree remove. When a submodule's status contradicts its files (git diff shows a change git hash-object does not), suspect core.worktree.

  • A test nextest calls leaky on macOS need leak nothing. nextest marks a test LEAK when its standard output or error is still open 100 ms after its process exits, which only another process holding the pipe can do. On macOS, std makes a child's pipes with pipe() and only then sets close-on-exec on them (library/std/src/sys/pipe/unix.rs: macOS has no pipe2), and nextest starts tests from several threads at once, so a test started in that window inherits the write end of the output of the test started beside it and holds it until it exits. Measured with cargo-nextest 0.9.140 on the M3 Max (macOS 27.0.1), with a probe whose tests only read their own descriptors and sleep: 14 of 1,440 test processes started holding a pipe's write end without FD_CLOEXEC, each that of a test started within 7 ms of it; with tests of 10 ms and 800 ms alternating, 3 of 720 short tests were reported leaky, each one whose output a long test started beside it held. reims-vgpu-graphics' device tests, which spawn nothing, were leaky in car 12's and car 13's checks (they start among the first, beside the long Vulkan tests), and so was a test of a pure function there (device::backlog::tests::a_message_is_its_context_s_by_its_id_or_its_field, 1 of 2,440 runs). A leak is a pass, and the test cannot prevent it. How to spot the next one: a LEAK on a test that starts no process, at random among tests started together; a test that leaves a child holding its output leaks in every run.

  • nextest's --stress-count with --no-fail-fast exits with the last iteration's status only. Measured with cargo-nextest 0.9.140: a test that failed in iteration 1 of 3 and passed in 2 and 3 exited 0, under the summary 3/3 stress run iterations: 2 passed, 1 failed; without --no-fail-fast the first failure stops the run and it exits 100. Count failures from the summary line, never from the exit code.

  • kache shares nothing with a target directory built without it. kache keys a unit by the contents of its dependencies' outputs, and rustc under kache writes other bytes than rustc alone (kache remaps the build's paths), so in a target directory cloned from a build without kache every workspace crate's dependencies differ from those the store's entries were built on: each misses, compiles and is stored under a key no other tree uses. Measured on the M3 Max: a new worktree whose target directory was cloned from a seed built without kache missed all 72 of the workspace's units (the tests of cargo xtask check's features, 410 s), where one with an empty target directory hit 11 of the workspace's 12 libraries and 119 of its 120 dependencies (170 to 232 s). Start a target directory empty, or from one built through kache. How to spot the next one: kache explain CRATE names externs among the key groups a workspace crate's miss differs in.

  • kache serves a build script's recorded run to a build whose environment the script reads differently. kache keys a run by the script binary, the variables Cargo itself sets and the script's rerun-if-* declarations (kache 2.0.0, src/build_script.rs), and SDL's script declares none of the C flags or MACOSX_DEPLOYMENT_TARGET that cargo xtask dist gives it, so dist's SDL, built again after cargo clean -p sdl3-sys, came from a run of a plain build on the host: its globals stayed common and its objects were built for the SDK's macOS, and the archive check failed (measured on the M3 Max). dist now turns the build-script cache off for its build (KACHE_BUILD_SCRIPT_CACHE=0). How to spot the next one: a build step that changes a dependency's build through the environment alone (an [env] entry, a variable the script never declares) and then sees no change in its output.

  • kache restores a macOS dylib with the install name of the target directory that first linked it. The linker names a dylib by its output path (LC_ID_DYLIB) where the link gives no -install_name, and rustc gives none by default (it does with -C rpath). kache keys the link by inputs that name no worktree, as it remaps the build's paths, and restores the bytes first linked, so the C API's cdylib in a new worktree named the worktree it was first linked in: the C harness, linked to it, recorded that path and failed to load once that worktree was removed, where a relink in a fresh worktree passed (a potluck job on the M3 Max). crates/reims-vgpu-c/build.rs links the cdylib as @rpath/libreims_vgpu_c.dylib, which the harness finds through its rpath, and the_dylib_is_found_by_rpath holds both. How to spot the next one: a load of a library built in a target directory that fails only after another worktree is removed, and otool -D on the library prints an absolute path.

  • kache 2.0.0 stores a Windows cdylib's link without its import library. For x86_64-pc-windows-gnullvm the link of reims-vgpu-c's cdylib writes reims_vgpu_c.dll and its import library libreims_vgpu_c.dll.a; kache's entry holds the DLL, the staticlib, the rlib, the rmeta and the dep-info, and not the import library (kache list reims_vgpu_c, measured on a Linux node building for Windows). A build that hits the entry, any whose change reaches none of the link's inputs (a test-only or docs-only change), restores the DLL alone, and the C harness's link on Windows then fails: clang: error: no such file or directory: '.../libreims_vgpu_c.dll.a' (a merge's Windows leg, on the Mac mini 2018). A miss links both files, so the same harness passed one batch earlier. The merge pipeline's Windows build checks its nextest archive for the import library and, where it lacks it, cleans reims-vgpu-c and links it again with KACHE_DISABLED=1. How to spot the next one: a file a link writes beside its main output (an import library, a .pdb, a .dSYM) missing only after a fast build, where a cold build has it.

  • A link with LTO drops the standard library's __isPlatformVersionAtLeast from an executable. rustc links macOS binaries with no default libraries, so no compiler-rt; std's weak definition resolves the calls that C built for an older macOS makes for its @available checks, until LTO, which keeps only what Rust code reaches: cargo nextest run --release after cargo xtask dist --release in the same target directory failed to link SDL (built by dist for macOS 11.0) with the symbol undefined, where a dev build linked (measured with rustc 1.98.1 and 1.99.1). The window crate's build script links compiler-rt's builtins, unbundled. How to spot the next one: a native library that links in debug builds and not in release, its missing symbol one of compiler-rt's.

  • @available in the guest bundle imports fopen, which the bundle's file check forbids. Clang lowers @available(macOS N, *) to a call to __isPlatformVersionAtLeast, which, from compiler-rt's os_version_check, falls back to reading /System/Library/CoreServices/SystemVersion.plist through fopen where the kernel does not answer the version; the symbol is linked whether or not that fallback ever runs. The Metal bundle every process loads, sandboxed ones among them, must import none of open(2)'s family but open itself (guest/bundle/tests/bundle_files_check.sh, part of make -C guest test), so a guard written with @available fails that check, at -mmacosx-version-min=11.0 as at any deployment target (measured: the commit that read four newer descriptor fields under @available left _fopen undefined in the linked bundle, where the same reads under respondsToSelector left no open-family symbol). Read a field newer than the bundle's floor off an Apple descriptor or event through a runtime presence check, respondsToSelector: or the spi() helper, never @available. How to spot the next one: the bundle's own nm -u check (bundle_files_check.sh) names an open-family symbol after a guard is added; the fix is a presence check in place of the @available.

  • A test that faults the GPU fails the tests beside it, and they pass alone. Every process on a Mac shares its GPU: a fault there is a GPU recovery, and each command buffer another process has in flight fails as its victim ("Discarded (victim of GPU error/recovery)", kIOGPUCommandBufferCallbackErrorInnocentVictim), WindowServer's among them. client_direction's metal_drops_small_blits_into_the_texture, deleted since with the host's own IOSurfaces it wrote through, faulted it on purpose, 84 GPU events in its 1.8 s, and every cargo xtask check on the M3 Max failed 9 to 14 tests that ran beside it: the YCbCr sweeps, the extended-range blends (whose Metal side then read zeros), the in-flight detaches, new_images (measured, macOS 27.0.1). The behaviour-lock suite's runner, since deleted, had long run such scenarios alone (exclusive=True); nextest ran them with the rest. .config/nextest.toml then ran it first, with nothing else in flight: five runs of the check's tests after that (three of them whole checks) failed no GPU test, where two runs without it, beside them, failed 10 and 7. The check's "Insufficient Memory" failures (the unreached-tiles and dont-care-load tests) were not pinned to one test: the largest, a_reservation_of_2_31_minus_1_is_metals, held 16 GiB for about a second (its peak footprint, six times any other's) and ran alone too. Both were then made opt-in (#[ignore]), run only for a change to what they test, and later deleted with the platform they tested: a GPU recovery fails the work of every process on the Mac, WindowServer's and the terminal's included, so a stress loop of the fault test restarted the GPU under the owner's desktop (macOS 27.0.1, M3 Max, 2026-11-05: WindowServer's command buffers took GPU address faults and the display was flushed to recover). How to find the next one: macOS logs each GPU event (log show --predicate 'eventMessage CONTAINS "Handling GPU event"', from ReportCrashService) and each failed command buffer with its process (eventMessage CONTAINS "Execution of the command buffer"); run the tests one at a time (-j1) under a test runner that logs each test's pid and start (CARGO_TARGET_<TRIPLE>_RUNNER), and the test that started last before a burst of GPU events is the one that faults. /usr/bin/time -l as the runner gives each test's peak memory footprint, the GPU's memory included.

  • A long submission beside other GPU work on Windows loses a device, its own or another process's, and Windows logs nothing of it. The many-passes tests (gpu::encode_render::tests::many_passes, since deleted) each submitted one command buffer of 706 passes, each after a 1x1 encoder, as one vkQueueSubmit of 1 VkSubmitInfo and 1413 VkCommandBuffers; alone they take about 1.8 s each. Beside the rest of the Windows tests on the UHD Graphics 630 (Intel 31.0.101.2145), a run of the three took 6 to 16 s, and over five runs that submit failed with VK_ERROR_DEVICE_LOST in 7 of 90 tests (the command buffer's GpuHang), while the suite's longest test, a_cpu_reset_of_a_range_leaves_its_commands_fresh (29.5 s, one compute encoder), lost its own device in 4 of the 5 runs, once in a run where the many-passes tests lost nothing (measured 2026-11-19, m3-max-55694 to m3-max-55733). It looked like paging under the job's commit limit, and is not: with the limit at 28 GiB and a peak of 18.6 GiB, losses came no less often (5 of 54) than at the tests' 20 GiB (2 of 36). No display reset (System event 4101) and no System warning or error was logged. The new runtime's path for the same passes (on_rt) lost nothing in 117 tests beside the same tests, which all passed. On Windows the many-passes tests then ran alone (.config/nextest.toml). How to spot the next one: a vkQueueSubmit that fails with ERROR_DEVICE_LOST on one VkSubmitInfo of 1,000 or more command buffers, or a test with no such submit losing its device in a run where one ran beside it, with no event 4101; run the suspect alone, then beside the suite under a higher commit limit, before reading the losses as memory.

  • A busy kernel holds work in flight for its time on the device, and for nothing else. The Vulkan crate's tests sized spin.metal's rounds for the M3 Max, about 60 µs a round, which an RTX 5080 Laptop GPU runs in about 0.28 µs: an_unmap_in_a_deallocator_waits_for_the_import's fixed 1,000 rounds held about 0.3 ms there. The paging discard tests sized theirs to half a second from one run of 2,000 rounds, which on the 5080 is mostly the run's submission and completion (2.2 ms, about 0.6 ms of it the kernel's), so they held about 130 ms; and the steps the hold had to cover, two imports of host memory, waited in NVIDIA's driver lock while the other test processes made their devices, for up to 455 ms, past any kernel a test may run (a ring held past 2 s resets on an amdgpu host). Under the crate's whole run the paging tests failed in 7 and 3 of 9 runs, and every one passed alone (measured, 2026-10-26, NVIDIA 615.71.09). gpu::spin (since deleted) then sized the kernel from a timed run of 50 ms or more, and the paging tests ran alone on Linux (.config/nextest.toml), each checking that its hold outlasted its reads and running again where it did not. How to spot the next one: a test that holds the GPU with a fixed count of rounds, or that reads what the runtime holds while a kernel runs, after a call that enters the driver.

  • A header the library shares with the option ROM is one of the ROM's sources. crates/reims-vgpu-graphics/include/reims_graphics_wire.h is compiled into firmware/prebuilt/ReimsGraphics.rom, and the ROM's record, firmware/prebuilt/ReimsGraphics.toml, holds the header's sha256. A change that added a feature bit, a flag and a record to the wire for the GL renderer's private render state passed the library's checks, which build no firmware. It landed and left development failing reims-ctl's cargo test (the_prebuilt_rom_is_built_from_the_trees_sources) and cargo xtask check's make -C firmware prebuilt-check. The ROM built again had the same bytes: only the record was stale. How to spot the next one: a diff that touches the wire header, or any other file the record names, runs make -C firmware prebuilt on a Mac in the same branch and commits the ROM and its record with it; make -C firmware prebuilt-check names each file that changed.

  • A rebuild of guest/prebuilt from unchanged sources can still give different bytes, which looks like the change altered the kexts. Two inputs that are not sources decide them: the shell's locale, since the bundle links src/*.mm in the order the shell sorts them, and the day, since Lilu's plugin_start.cpp writes the build date into RgfxGate and the loader, changing their bytes and UUIDs. The crate rename that moved the wire header found it: its first rebuild, in an en_US locale on a later day, differed from the committed set, and so did a rebuild of the untouched tree. How to spot the next one: to show a change leaves the kexts byte-identical, rebuild with LC_ALL=C and SOURCE_DATE_EPOCH set to the committed kexts' build date, and compare that against the committed set, not a default-locale rebuild.

  • The arm64e link of the guest bundle can give two binaries for one tree. ld (ld-27106.1) made two slots for objc_msgSend in the bundle's authenticated GOT, one for the message-send stubs (__objc_stubs) and one for objc_msgSend's own call stub, and handed them out in either order from one link to the next: three clean builds of one tree on the M3 Max gave RgfxGate's arm64e binary as A, B, A, differing only in the bundle's arm64e image (its UUID, its signature, and the slot __objc_stubs loads). The arm64 image, whose GOT is not authenticated, was the same each time. It showed as a rebuild that changed RgfxGate though none of its sources had. The bundle's arm64e link now takes the small stubs (-objc_stubs_small, guest/bundle/Makefile), which branch to the call stub and take no slot. How to spot the next one: when a set's binary changes with no source of its own changed, build it again from the same tree two or three times before looking for an input; if the builds alternate, diff the two by section (otool -l, then the section's disassembly) and look for a choice the linker makes freely.

  • A weak kernel import a kext's code reaches directly keeps the whole kext out of a kernel that lacks it. OpenCore's linker binds an unresolved weak import to 0, and a call or address relative to the instruction cannot reach 0, so it reports RIP-relative overflow in <kext>: ... target=0x0 and leaves the kext out of the kernel collection ([FAIL] ... injected - Invalid Parameter): the guest boots with no display driver. Measured 2026-11-08 with OpenCore's TestKextInject: ReimsGraphics with a weak IOMemoryDescriptor::getPageCounts(resident, dirty, swapped), which the 26.x kernels export and 11.7.11, 13.7.8 and 15.8.2 do not, was injected into 26.7.2's Boot KC and refused by the other three. Neither make -C guest test nor prebuilt-check links against a kernel, so both passed. How to spot the next one: a kext OpenCore injects has no weak kernel imports at all (guest/tools/oc-link-set.sh fails on any), and any change to a kext's imports runs make -C guest set-check against the Boot KCs of the oldest and newest releases it supports.

  • A weak import that OpenCore's linker bound to 0 is not 0 when the kext runs. The kext then reached it through a word of data, read the word and called it where it was neither 0 nor gOSKextUnresolved: set-check showed the word bound to 0, yet on 11.7.11 the first fresh-surface test called 0xffffff8042e00000 and every boot panicked in WindowServer (Kernel trap at 0xffffff8042e00000, type 14=page fault from rgfxSurfaceLocksFresh, measured 2026-11-09 on serial with debug=0x100 serial=3): the kernel rebases the word by the kernel collection's slide (0x2e00000 that boot), so 0 became 0xffffff8040000000 plus the slide. The weak IOMemoryDescriptor::getPageCounts(resident, dirty, swapped) is gone; the kext counts pages through mach_vm_region, a strong import every kernel exports. How to spot the next one: under OpenCore no word tells an absent weak import from a present one, so never reach one; set-check proves a kext links and injects, not that it runs, so a kext change that branches on a kernel's version or on a symbol's presence needs a cold boot of the oldest release it reaches. A kext's Graft-bound imports (a consumer's imports, bound by Graft at run time, which binds an absent one to gOSKextUnresolved and logs it) are not OpenCore's and read right.

  • Building against the newest SDK's headers imports names that older releases lack, and boots of only the newest releases do not see it. A class that inherits a method imports it by name: its vtable names the parent's definition. RgfxPointerDevice, an IOHIDDevice built against Xcode 27.2's IOHIDDevice.h, imported IOHIDDevice::didTerminate, which IOHIDFamily defines only from 26 on. Measured 2026-11-16: Ambrosia, whose linker binds every name and patches no vtable, refused to boot arm64 15.6.1 ("it imports __ZN11IOHIDDevice12didTerminateEP9IOServicejPb, which neither the kernel collection nor the other kexts define"); OpenCore left ReimsGraphics out of x86-64 11.7.11 (no Metal), where five more names are missing and two of them name methods in IOHIDDevice's slots 16 and 17, which are still reserved placeholders there. The merge boots ran only x86-64 26.7.2 and arm64 26, which define every name. The fix overrides each such method and calls IOHIDDevice's, a qualified call that -fapple-kext makes through the parent's live vtable slot, so no release's name is imported. How to spot the next one: a kext change that adds a class or a parent runs make -C guest kc-check against the oldest release of each set (x86-64 11.7.11, arm64 14.6.1), which lists every import a release's kernel collection does not define (development.md, Testing).

  • A reference decoder can be the one that is wrong. The guest lane's HEVC check compared each frame the guest decoded with ffmpeg 9.0.2's software decode, and two streams coded with 16x16 CTBs (1366x766 and a 1280x720 bisect of it) differed on most frames. A bisect of x265's options pinned it to CTU 16 with SAO and deblocking both on, and the difference was first taken for a bug of NVIDIA's decoder, with a host self-check planned to refuse such streams. It was ffmpeg: x265's reconstruction (--recon) of the same streams equals NVIDIA's decode (through the core, ffmpeg's Vulkan hwaccel and NVDEC), VideoToolbox's on an M3 Max and the guest's on every frame, and ffmpeg's software decode differs from all four (measured, 2026-11-03; upstream report 98). hevc-check.sh had already found the same difference on AMD's decoders and checks against the reconstruction where the two differ; a check written later against ffmpeg alone met it again. How to spot the next one: when hardware decoders disagree with a software reference, compare each with the encoder's own reconstruction, and with a second vendor's hardware, before calling the hardware wrong; a check that has one software reference has none for the streams that reference gets wrong.

  • A test built from a model of a guest's struct checks the writer, never the model. The guest driver's HEVC writer read AppleGVA's short-term sets with the delta lists at +0xe8 and the flags after them; at +0xe8 a predicted set held bytes of 1, which was read as "AppleGVA keeps the prediction's syntax but not the pictures", and the writer gained a derivation of its own (7-61, 7-62). The unit tests built AppleGVA's form of the stream from the same layout, so they passed, and the guest refused the stream's SPS on every picture. A dump of AppleGVA's real struct, compared with the stream's own syntax at every field, showed the flags at +0xe8 and +0xf8 and the deltas at +0x108 and +0x148, every set's pictures derived by AppleGVA itself (measured, 2026-11-03, hevc-main-720p-sets-sps, 25 sets). How to spot the next one: before reading meaning into a field of a guest-held record, dump the record for an input whose every value is known and match each field to it; where only one stream exercises a field, the tests that model it say nothing about the guest.

  • Tests that make throwaway git repositories inherit git's environment. git rebase -x and git's hooks export GIT_DIR and its kin to what they run, and git -C DIR does not override them. reims-ctl's tests of its update and its installer, run under git rebase -x in a linked worktree, ran their git init, config and commit on the enclosing repository: its shared config became core.bare=true with the tests' user.name and user.email, which stopped the main checkout ("this operation must be run in a work tree") and gave another worktree's commit the tests' author (measured, 2026-11-07). reims-ctl now drops those variables for each git and script it runs on a checkout, its tests' included (update::GIT_REPOSITORY_ENV). Never run tests under git rebase -x in a worktree that shares the main checkout's .git: check each commit in a worktree of its own (git worktree add --detach). How to spot the next one: a config change or a commit in a repository no command named, made while a hook or a rebase's exec ran.

  • A driver's answers can disagree, and a rule derived from one of them takes its value on every driver. The H.264 caps' cut to 65,535 macroblocks (bugs.md, U28) kept the driver's largest width and lowered the height, tested on radeonsi's answer of 4096x4096. iHD answers 8192x8192 in VAConfigAttribMaxPictureWidth and Height while its surfaces' bound, and the widest picture it decodes, is 4096x4096, so the cut answered 8192x2032 there and the guest refused 3840x2160 at its create. Spot it by feeding each rule every driver's real answers, and the sizes users play (3840x2160, 4096x2160), not only the case the rule was written for.

  • A kernel address looked up at runtime and cast to a function-pointer type panics an arm64e kext at the call site, not the cast. Graft returns a symbol's raw address as a uint64_t (graft_kernel_symbol). On arm64e a C function pointer is signed (ptrauth_key_function_pointer, zero discriminator for a plain fn-ptr type our code builds without pointer-type discrimination), and reinterpret_cast<T>(addr) from an integer makes the compiler authenticate the value as though it were already signed, so autiza traps under FEAT_FPAC the moment it runs: PAC failure from kernel with IA key while authing x16, the last-started kext, its __TEXT_EXEC plus the faulting offset. Measured 2026-11-09 on Ambrosia's fixed firmware: RgfxGate panicked at installHooks() right after the second graft_kernel_symbol, reboot-looping with SIP on. Sign the raw address for the schema the call site uses instead, reinterpret_cast<T>(ptrauth_sign_unauthenticated(reinterpret_cast<void *>(addr), ptrauth_key_function_pointer, 0)), behind __arm64e__. How to spot the next one: any integer or data pointer cast to a function-pointer type, or called through, in arm64e kext code; the disassembly must sign (pacia/paciza) the address, never authenticate it.

  • A release allow-list for a private kernel-struct offset is brittle; prove the offset in-kernel instead. RgfxGate's arm64 install read struct vnode's op-vector offset (0xd0) and gated on a hardcoded list of Darwin major versions it had measured. macOS 27.0.1's VM kernel (xnu-13432.1.9~1 RELEASE_ARM64_VMAPPLE, build 26A434) reports a major outside the list, so the install refused (not among the five with a measured v_op offset) though the offset is right there and already cross-checked at runtime (a getxattr through the op vector against the exported VNOP_GETXATTR, which proves it on the live kernel whatever the release or variant). Measured 2026-11-09 on Ambrosia's golden. The allow-list added only false refusals; the self-check holds where the offset is right and refuses where it is not. Prove such an offset with data reads alone -- read the word, bound and align-check it, strip its PAC and compare, never call or authenticate through it: a wrong offset read as a function pointer and branched to (braa) panics at once on FEAT_FPAC, so a check that calls first turns a wrong offset into a dead boot instead of a refusal. Spot the next one: any gate keyed on a version number for a fact the code can verify directly -- verify it directly, by reading not calling. And a flag that only says a pass ended (RgfxGateInstallDone) is not a flag that says it succeeded: record the outcome and its reason at every exit, or a refusal reads as done.

  • A test process that destroys its last Vulkan instance and closes the loader can die at its exit, after it passed, where NVIDIA's driver is installed beside another. The loader unloads the drivers with the last instance, NVIDIA's Vulkan driver unloads the EGL library it had loaded, and the process's exit then runs code of that library, unmapped by then: the video crate's tests that hold a GPU with a spin (vaapi::va::spin), each spin with an instance of its own, ended SIGSEGV in 3 of 3 runs on a host with an RX 7900 XTX and an RTX 2080, the core's last frame at libEGL_nvidia.so.0 + 0xa28c2 in the loader's map of that run, and passed in every run with RADV's driver alone or under gdb (measured 2026-11-11, Mesa 26.2.6, NVIDIA 620.70.06). The spins now share one instance, never destroyed. QEMU keeps the runtime's instance until it exits and is not affected. An rt platform's last hold is the same trap: a test that hands its platform to the video crate's VA-API arm (a VA display's runtime) has the threads of what it made there let go of it after the test returned, and where the last of them ends as the process exits, its drop destroys rt's instance and closes the loader beside the exit's handlers. On an i9-13900H's Iris Xe with NVIDIA's driver installed, graphics::vaapi's tests of writes into dma-buf caches printed ok and died at the same address in 3 of 9 processes; in each, libEGL_nvidia.so.0's finaliser had left the libraries it loads (libnvidia-eglcore and its kin) mapped, where in the processes that passed it closed them (measured 2026-11-20, LD_DEBUG=files). The test's end now holds every platform a test makes and lets go of its device, which drops the instance, on its own thread before the process exits (rt_test_end, and the entry on a device live at the exit), so a video thread's later drop of the platform finds no device. A wait on the test's thread for the platform's other holds to end does not serve: the NVIDIA crate keeps the first runtime it is opened with, and the platform in it, for the process's life, and such a wait failed its 30 s bound in 6 of 6 NVDEC and NVENC tests on an RTX 3090 (measured 2026-11-20). How to spot the next one: a test that passes and then dies on a signal at exit only on hosts with NVIDIA's driver; coredumpctl info shows a frame in no module (n/a), and LD_DEBUG=files shows which library that address was in before its link map was destroyed.

  • A test of the hardware that opens its display on a runtime with no exit gate can abort at its exit, after it passed. The host opens its VA displays on a runtime whose exit gate is armed after vaInitialize loads the driver, so the gate's handler runs before the driver's exit-time destructors and waits out every call of the crate's in progress. The video crate's hardware tests opened theirs on StdRuntime, which has none, while a display's call thread and the thread that keeps work past its deadline still call the driver: Lingering stops counting a kept session before it drops it, and the display's releases are made behind the caller. On the Iris Xe (iHD), vaapi::va::wait::gpu::an_encode_still_running_at_its_deadline_is_kept_until_it_is_done printed ok and its process then aborted with "double free or corruption (out)" (pin 47's leg m3-max-19907, once in seven runs of the suite; six more runs on the same tree did not show it). The cause is read from the code, not reproduced. Every test that opens a display of the hardware now opens it on GatedRuntime, the host's gate in miniature (vaapi::va::gated). How to spot the next one: a test that passes and then dies on a signal in the driver at its exit, on a runtime whose exit_step guards nothing; a count a test waits on that drops before what it counts is gone.

  • A GPU test on a host with several GPUs runs on the library's own pick, not on the GPU the job holds. Each test process opens the default device, which device_choice picks among the host's GPUs, unless MESA_VK_DEVICE_SELECT, DRI_PRIME or VK_LOADER_DEVICE_SELECT names one; potluck's --gpu only sets POTLUCK_GPUS. The pick was then by a timed workload, kept in the tests' cache; it is now the first candidate by kind (discrete, then integrated, virtual and CPU, each in the loader's order), which on a host of several GPUs is still not the job's card. On gem10 the timed pick was the Radeon 780M (27.6 ms against the RX 550's 42.0 ms and the RTX 3090's 79.8 ms, kept on 2026-11-11 by the first test process of a leg that held the 3090), so a leg that held the 3090 and named no device ran its Vulkan tests on the 780M, and only its NVDEC and CUDA tests on the 3090. The device cache's planes test passed there, where the 780M's exported memory takes images in place, and failed on every leg that pinned the 3090, where NVIDIA makes each exportable buffer its own dedicated allocation, to which no image binds. Pin the held card in every GPU leg on such a host: export MESA_VK_DEVICE_SELECT="${POTLUCK_GPUS%%@*}!". How to spot the next one: the device a run names (device_choice's line, the library's GPU is Vulkan device N, NAME) does not match what the job holds; or a test's result changes between legs on one node with no change to the code.

  • A rebase can carry a stale copy of a file into a commit and undo a landed change together with its tests, so every check stays green. The profiling trace's ring 0 commit (d4ce099a2) was written on a base before the warm pass's bound landed and was rebased past it, and its crates/reims-vgpu-vulkan/src/records.rs (since deleted) came back with the bytes it had before the bound: the 60 s bound, the tombstones a stuck making leaves, the read that leaves them out and their tests all went, while its message said nothing the device does changes. The merge's checks passed, and only a walk on ms01's Iris Xe showed it: the warm pass of 3278 records never ended, glibc's in-use memory climbed from 2.9 to 8.59 GB, and QEMU was killed 31 s after the walk's end, as before the bound. How to spot the next one: whoever merges compares, for each commit, each changed file's new blob with that file's blobs in the commits before its parent, and a match is a file reset to an older version, not an edit (git rev-parse C:PATH against git rev-parse A:PATH for each ancestor A). A commit whose diff deletes exactly what a recent commit added, under a message that claims no such change, is the same trap.

  • A time the host maps from the guest's clock by an offset the guest measured once drifts with the host's NTP correction where the two clocks run at different rates, and reads as a delay. The device's clock was CLOCK_MONOTONIC, which timesyncd ran +45.1 ppm against the TSC-rate CLOCK_MONOTONIC_RAW on homelab-um790-xtx-1, and the kext writes the clocks' offset only at a VBLANK, which were off through Geekbench 7.1's compute. Every command buffer's transport (guest times) then grew 45 us a second until the next reading, 5 s on: a p50 of 128 us over 20,597 buffers, which a scout took for the queue thread's wake and sized at 1.22 s a run. A host trace of the same run (kvm_mmio of the doorbell, sched_waking/wakeup/switch of the queue's thread, m3-max-33208) put the doorbell's write 12.6 us p50 before the take, and on homelab-gem10-1, at -30.1 ppm, the same diagnostic read 0, which the scout took for a busy thread. The device's clock is the raw one since (reims-vgpu-graphics's clock). How to spot the next one: a span mapped across two clocks that climbs linearly in time and drops back at intervals, of opposite sign on another host; compare CLOCK_MONOTONIC with CLOCK_MONOTONIC_RAW over a few seconds on each host (timedatectl show-timesync gives timesyncd's frequency), and time the span against a host-side event (a perf trace of the doorbell's kvm:kvm_mmio) before sizing it.

  • A fault in a Windows job of potluck's leaves its exit status and nothing else. potluck runs each job's processes in a job object that ends a process at an unhandled exception (JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION), so Windows Error Reporting writes no report and no event: QEMU's access violations on the UHD Graphics 630 host (2026-11-16) left exit status 0xc0000005 and no line in the Application or System logs, and a test process's left nextest's "with code 0xc0000005" alone. The library's fault handler (reims-vgpu/src/faults.rs) writes the faulting module and offset and its callers' on stderr before the process ends; llvm-symbolizer --obj=<module> <address> in MSYS2's CLANG64 shell, the address being the module's image base (llvm-readobj --file-headers) plus the offset, less 1 for a caller's, names the function in our binaries and in Mesa's DLLs, whose symbols MSYS2 ships. How to spot the next one: a Windows job that ends with an NTSTATUS exit code and no panic; read its stderr for reims-vgpu: exception lines before anything else.

  • A Windows job of potluck's runs at memory priority 4, and Windows trims a priority-4 QEMU's working set with memory to spare, so a WHPX measurement taken in one pays faults a user's VM does not. potluck's Task Scheduler task starts its processes at memory priority 4, and a new process takes its creator's, so the QEMU a job's reims-ctl starts runs at 4, where a user's shell gives 5 (MEMORY_PRIORITY_NORMAL). On the UHD Graphics 630 host (Windows 11, 64 GiB, 2026-11-18), with 36 to 47 GB available throughout and QEMU's working-set quota Windows' default soft pair (200 KiB and 1.38 MiB, GetProcessWorkingSetSizeEx), Windows took 703,604 guest RAM pages and 9,637 pages of the device's region out of a priority-4 QEMU's working set during a 300 s desktop walk (m3-max-49913). A page so taken cost 19 to 32 us to fault back in under WHPX, where a resident one costs 0.02 us. A QEMU at 5 from its creation lost none in 361 s of the same walk (m3-max-49964). One switched to 5 three seconds after its start lost 2,026 region pages, about the 2,032 it had faulted before the switch (m3-max-49942). A soft working-set minimum above QEMU's whole working set (SetProcessWorkingSetSizeEx, 18 GiB) did not stop it at 4: 971,197 RAM pages and 8,515 region pages left (m3-max-50023), and the views stayed whole throughout (VirtualQueryEx), so it was no remap of ours. A Windows job that boots a guest or times anything now sets its own shell to 5 before it starts reims-ctl or a test runner (SetProcessInformation with ProcessMemoryPriority), so what it starts runs at 5 from its creation. How to spot the next one: QEMU's working set falls, or its page faults climb in a phase where the guest touches no new memory, while available memory stays high. Read the process's memory priority (GetProcessInformation with ProcessMemoryPriority) and its working-set quota, and count the pages of a range that leave the working set (QueryWorkingSetEx's valid bit, sampled over time), before reading a timing.

  • A filter that matches workspace records by a looked-up value also matches every record that lacks the field, and a release through it removes other people's work. On 2026-11-19 a lane released its two boot workspaces with a loop over potluck --json status that kept each record whose branch equalled the branch a two-entry table gave for its id (want.get(id) == branch). For an id not in the table the lookup gives None, and a workspace made with no branch has none either, so None == None kept every branchless workspace. potluck release removes a workspace, ending only its hold while a job is queued or running in it, and the loop removed 30 workspaces of other lanes' and metal2vulkan's runs before it was stopped; nothing brings them back. How to spot the next one: a release of an id that is not a literal from one's own job, or whose record's branch was not checked, one id at a time, to be a non-empty string equal to one's own branch.