Files
xenia-rs/audit-runs/phase-c16-XamTaskCloseHandle-refcount/diff-cold-vs-cold.md
MechaCat02 ef93a4fa14 handoff: VSync/event-wedge fixes + iterate 2.A–2.BC research notes
Source changes (dormant parity infra, retained from iterate 2.AI/2.AO):
- xenia-kernel/exports.rs: nt_create_event manual_reset polarity +
  related event wiring
- xenia-gpu/mmio_region.rs: D1MODE_VBLANK_VLINE_STATUS hardcode parity

Also lands the audit-runs/ analysis notes (.md/.txt/.json digests) for the
iterate 2.x VSync/0x10e8/0x1004 wedge investigation. Raw trace dumps
(.jsonl/.gz/.csv/.stdout) and agent worktrees (.claude/) are gitignored as
regenerable local artifacts — see memory + HANDOFF for the running findings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 07:19:08 +02:00

8.2 KiB

Phase A diff report

This report is the output of Phase A's diff harness. Divergences shown here are INPUT for Phase B (first-divergence localization), not findings of Phase A. Phase A's job is to make the harness itself correct, not to analyze what it surfaces.

Summary

canary_tid ours_tid matched canary_total ours_total first_divergence_at
4 11 8 23935 9 8
6 1 102171 347863 108489 102171
7 2 30 32 32 30
12 7 2 28174 4 2
14 9 2 553617 76 2
15 10 16 334560 16

canary_tid=4 → ours_tid=11

First divergence at tid_event_idx=8: kind: canary='handle.create' ours='kernel.return'

Pre-context (last 5 matching events):

  canary: [3] import.call KeSetEvent
  ours:   [3] import.call KeSetEvent
  canary: [4] kernel.call KeSetEvent
  ours:   [4] kernel.call KeSetEvent
  canary: [5] kernel.return KeSetEvent
  ours:   [5] kernel.return KeSetEvent
  canary: [6] import.call KeWaitForMultipleObjects
  ours:   [6] import.call KeWaitForMultipleObjects
  canary: [7] kernel.call KeWaitForMultipleObjects
  ours:   [7] kernel.call KeWaitForMultipleObjects

Divergent event:

  canary: [8] handle.create sid=bcaf14d76932b128
  ours:   [8] kernel.return KeWaitForMultipleObjects

Next event after the divergence (if any):

  canary: [9] handle.create sid=0760e947bacff199
  ours:   <end of stream>

Raw events (JSON):

{"deterministic": true, "engine": "canary", "guest_cycle": 0, "host_ns": 1925822900, "kind": "handle.create", "payload": {"handle_semantic_id": "bcaf14d76932b128", "object_name": null, "object_type": 1, "raw_handle_id": "0xf8000098"}, "schema_version": 1, "tid": 4, "tid_event_idx": 8}
{"deterministic": true, "engine": "ours", "guest_cycle": 91, "host_ns": 1676162438, "kind": "kernel.return", "payload": {"name": "KeWaitForMultipleObjects", "return_value": 0, "side_effects": [], "status": "0x00000000"}, "schema_version": 1, "tid": 11, "tid_event_idx": 8}

canary_tid=6 → ours_tid=1

First divergence at tid_event_idx=102171: kind: canary='handle.create' ours='wait.begin'

Pre-context (last 5 matching events):

  canary: [102166] import.call XamTaskCloseHandle
  ours:   [102166] import.call XamTaskCloseHandle
  canary: [102167] kernel.call XamTaskCloseHandle
  ours:   [102167] kernel.call XamTaskCloseHandle
  canary: [102168] kernel.return XamTaskCloseHandle
  ours:   [102168] kernel.return XamTaskCloseHandle
  canary: [102169] import.call KeWaitForSingleObject
  ours:   [102169] import.call KeWaitForSingleObject
  canary: [102170] kernel.call KeWaitForSingleObject
  ours:   [102170] kernel.call KeWaitForSingleObject

Divergent event:

  canary: [102171] handle.create sid=68fec8909ea5d1f5
  ours:   [102171] wait.begin {'handles_semantic_ids': ['0000000000000000'], 'timeout_ns': -1, 'alertable': False, 'wait_type': 'any'}

Next event after the divergence (if any):

  canary: [102172] wait.begin {'handles_semantic_ids': ['68fec8909ea5d1f5'], 'timeout_ns': -1, 'alertable': False, 'wait_type': 'any'}
  ours:   [102172] kernel.return KeWaitForSingleObject

Raw events (JSON):

{"deterministic": true, "engine": "canary", "guest_cycle": 0, "host_ns": 1446013900, "kind": "handle.create", "payload": {"handle_semantic_id": "68fec8909ea5d1f5", "object_name": null, "object_type": 1, "raw_handle_id": "0xf8000014"}, "schema_version": 1, "tid": 6, "tid_event_idx": 102171}
{"deterministic": true, "engine": "ours", "guest_cycle": 0, "host_ns": 465155319, "kind": "wait.begin", "payload": {"alertable": false, "handles_semantic_ids": ["0000000000000000"], "timeout_ns": -1, "wait_type": "any"}, "schema_version": 1, "tid": 1, "tid_event_idx": 102171}

canary_tid=7 → ours_tid=2

First divergence at tid_event_idx=30: kind: canary='handle.create' ours='wait.begin'

Pre-context (last 5 matching events):

  canary: [25] import.call KeSetEvent
  ours:   [25] import.call KeSetEvent
  canary: [26] kernel.call KeSetEvent
  ours:   [26] kernel.call KeSetEvent
  canary: [27] kernel.return KeSetEvent
  ours:   [27] kernel.return KeSetEvent
  canary: [28] import.call KeWaitForSingleObject
  ours:   [28] import.call KeWaitForSingleObject
  canary: [29] kernel.call KeWaitForSingleObject
  ours:   [29] kernel.call KeWaitForSingleObject

Divergent event:

  canary: [30] handle.create sid=e1f14feb316c28dd
  ours:   [30] wait.begin {'handles_semantic_ids': ['0000000000000000'], 'timeout_ns': -1, 'alertable': False, 'wait_type': 'any'}

Next event after the divergence (if any):

  canary: [31] wait.begin {'handles_semantic_ids': ['e1f14feb316c28dd'], 'timeout_ns': -1, 'alertable': False, 'wait_type': 'any'}
  ours:   [31] kernel.return KeWaitForSingleObject

Raw events (JSON):

{"deterministic": true, "engine": "canary", "guest_cycle": 0, "host_ns": 1448036300, "kind": "handle.create", "payload": {"handle_semantic_id": "e1f14feb316c28dd", "object_name": null, "object_type": 1, "raw_handle_id": "0xf800001c"}, "schema_version": 1, "tid": 7, "tid_event_idx": 30}
{"deterministic": true, "engine": "ours", "guest_cycle": 0, "host_ns": 465402043, "kind": "wait.begin", "payload": {"alertable": false, "handles_semantic_ids": ["0000000000000000"], "timeout_ns": -1, "wait_type": "any"}, "schema_version": 1, "tid": 2, "tid_event_idx": 30}

canary_tid=12 → ours_tid=7

First divergence at tid_event_idx=2: kind: canary='handle.create' ours='wait.begin'

Pre-context (last 5 matching events):

  canary: [0] import.call KeWaitForSingleObject
  ours:   [0] import.call KeWaitForSingleObject
  canary: [1] kernel.call KeWaitForSingleObject
  ours:   [1] kernel.call KeWaitForSingleObject

Divergent event:

  canary: [2] handle.create sid=750aad55e1061f0a
  ours:   [2] wait.begin {'handles_semantic_ids': ['0000000000000000'], 'timeout_ns': 429466729600, 'alertable': False, 'wait_type': 'any'}

Next event after the divergence (if any):

  canary: [3] wait.begin {'handles_semantic_ids': ['750aad55e1061f0a'], 'timeout_ns': -30000000, 'alertable': False, 'wait_type': 'any'}
  ours:   [3] kernel.return KeWaitForSingleObject

Raw events (JSON):

{"deterministic": true, "engine": "canary", "guest_cycle": 0, "host_ns": 1639759400, "kind": "handle.create", "payload": {"handle_semantic_id": "750aad55e1061f0a", "object_name": null, "object_type": 1, "raw_handle_id": "0xf8000064"}, "schema_version": 1, "tid": 12, "tid_event_idx": 2}
{"deterministic": true, "engine": "ours", "guest_cycle": 0, "host_ns": 491840482, "kind": "wait.begin", "payload": {"alertable": false, "handles_semantic_ids": ["0000000000000000"], "timeout_ns": 429466729600, "wait_type": "any"}, "schema_version": 1, "tid": 7, "tid_event_idx": 2}

canary_tid=14 → ours_tid=9

First divergence at tid_event_idx=2: kind: canary='handle.create' ours='wait.begin'

Pre-context (last 5 matching events):

  canary: [0] import.call KeWaitForSingleObject
  ours:   [0] import.call KeWaitForSingleObject
  canary: [1] kernel.call KeWaitForSingleObject
  ours:   [1] kernel.call KeWaitForSingleObject

Divergent event:

  canary: [2] handle.create sid=3df8ca649bf76cc8
  ours:   [2] wait.begin {'handles_semantic_ids': ['0000000000000000'], 'timeout_ns': -1, 'alertable': False, 'wait_type': 'any'}

Next event after the divergence (if any):

  canary: [3] wait.begin {'handles_semantic_ids': ['3df8ca649bf76cc8'], 'timeout_ns': -1, 'alertable': False, 'wait_type': 'any'}
  ours:   [3] kernel.return KeWaitForSingleObject

Raw events (JSON):

{"deterministic": true, "engine": "canary", "guest_cycle": 0, "host_ns": 1763660400, "kind": "handle.create", "payload": {"handle_semantic_id": "3df8ca649bf76cc8", "object_name": null, "object_type": 1, "raw_handle_id": "0xf8000094"}, "schema_version": 1, "tid": 14, "tid_event_idx": 2}
{"deterministic": true, "engine": "ours", "guest_cycle": 0, "host_ns": 1613114265, "kind": "wait.begin", "payload": {"alertable": false, "handles_semantic_ids": ["0000000000000000"], "timeout_ns": -1, "wait_type": "any"}, "schema_version": 1, "tid": 9, "tid_event_idx": 2}

canary_tid=15 → ours_tid=10

No divergence within the 16 compared events (canary has 334560, ours has 16).