📝 Read a Windows host's event log in record order [ci skip]

The Mac mini's 11-15 outage during a recovery boot read as a hard hang
followed by a planned upgrade, from records filtered by time stamp. Those
records were the install night's, stamped from the firmware clock 8 hours
ahead before Windows first synced its time. In record order the log shows a
sleep, a wake and a power-button shutdown, and two recovery boots on today's
tree ran clean.
This commit is contained in:
Anees Iqbal committed 2026-11-16 18:25:39 -08:00
1 parent 4b44845763
commit f37e9a586a
1 file changed
+1
+1
View File
@@ -118,6 +118,7 @@ one. A new trap found the same way goes here.
- 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.
## Tools and worktrees