Skip to content

G83 第三轮审查:BCS 等待见证、DEBUG 栈预算、孤儿完成归因与回退采样、§13 - #3

Merged
Minorli merged 5 commits into
mainfrom
review/g83-round3-20261203
Dec 3, 2026
Merged

Minorli merged 5 commits into
mainfrom
review/g83-round3-20261203

Conversation

@Minorli

@Minorli Minorli commented Dec 3, 2026

Copy link
Copy Markdown
Owner

第三轮审查,任务清单见 docs/G83-Review-Round3-20261203.md。完整结论在 docs/G83-Storm-Investigation-20261203.md §13。

提交 内容 验证级别
0466e43 原样移植研究树里已测试的只读 BCS 信号量等待见证(TGLHangPendingBCS*、TGLHangBCSWait*,采集工具早已读取这些键) CPU;从未部署
18ad5d0 把恢复与孤儿规则两个安装块原样移出 processTGLAccelerator;DEBUG 构建首次通过(5784 B < 6144 B) 构建级
d369666 孤儿完成分 B/C 计数,记录豁免使用的端口,并在写入后 60 s 内对戳槽做回退采样(B 类实机裁决的数据来源) CPU:7 个变异体全部被测出
c0a8ba4 §13 文档:WiFi 时间分解与补采命令、B/C 类裁决表、BCS 最小方案、恢复戳超时、试验补丁评估 文档

验证:只在 arm64 上跑了 CPU 测试,做了 RELEASE/DEBUG 交叉构建,没有 x86 和硬件运行。G83 套件 199 通过;29 个失败与 main 相同,都是 x86 夹具在 arm64 上无法运行。警告数不变(460)。

要点:

  • WiFi:65 s 关联时间里有 53.9 s 在证据包中没有日志,无法拆分。§13.1 给出了假设和只读补采命令。未改任何代码。
  • #109 gpurec 的兄弟引擎是 RCS↔CCS,作用不到 BCS,不建议为 BCS 问题移植。
  • 恢复戳超时:锁内重试和锁外补发都不安全,不做行为改动。

🤖 Generated with Claude Code

Aric and others added 5 commits December 3, 2026 07:17
Problem: storms show BCS hang reports with IPEHR 0x0e009002 (PPGTT polling
MI_SEMAPHORE_WAIT, unsigned GTE), suspected to wait on RCS work that the
native reset destroyed. G83 cannot answer that: its hang dump keeps pending
evidence for RCS slot 0 only, although tools/tgl-capture.mm already saves
TGLHangPendingBCS0..3 and TGLHangBCSWait0..3. Round 3 item 4 (whether to
port #109 gpurec sibling recovery) needs the wait target first.

Mechanism: port, unchanged, the read-only diagnostic from the research tree
(driver/WhateverXe 80bde77 BCS pending admission, 7ad417a BCS wait witness):
on a native BCS ring dump, qualify engine/owner/backlink before and after the
copy, read a 16-dword window around the saved head, decode up to four exact
0x0e009002 packets, walk the software PPGTT to the target and record the CPU
value against the compare value, re-checking identity, window and mapping.
nofault reads through the existing direct map only; no MMIO, forcewake,
lock, submit hook, completion or wait. Same four-slot failure budget, each
property < 4 KiB. The RCS path is unchanged. The inner key buffer reuses the
dump's own (no -Wshadow warning).

Verification: CPU only (arm64): tgl_hang_pending (with the BCS cases) and
tgl_hang_bcs_wait pass under ASan/UBSan; suite 199 passed, same 29 x86
fixture failures as main; RELEASE build passes, warnings unchanged (460).
Never deployed in either tree: no hardware evidence yet. A witness cannot
show the GPU's current packet or its cached translation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rator

Problem: the DEBUG build has failed the boot stack budget since before the
orphan review (processTGLAccelerator 6360 B static frame > 6144 B), so no
DEBUG build of G83 could be produced.

Mechanism: the two self-contained installer blocks that only run under
-disablegfxfirmware move, unchanged, into XE::installTGLRecovery (hostOK
passed by value) and XE::installTGLOrphan. Call order, conditions,
clearError() placement and every anchor/byte check are the same; the
caller keeps the registry flags. A normalised diff contains only the moved
lines, the two calls and the helpers' declarations. The helpers sit after
processTGLAccelerator because tests/xelp_video_irq.py slices the source up
to that function.

Verification: CPU/build only (arm64 cross-build). DEBUG build now passes:
processTGLAccelerator 5784 B, installTGLRecovery 472 B, installTGLOrphan
360 B. RELEASE passes: 2136 B (was 2280 B), helpers 376/232 B, so the
deepest install-time chain grows by at most 232 B, at kext start only.
Warnings unchanged (460). Suite 199 passed, same 29 x86 fixture failures.
x86 native replays (--accelerator) and a hardware boot that shows
TGLRecoverySinglePassReady and TGLOrphanObserveReady still Yes are needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ssions

Problem: the B-class hardware verdict (round 3 §2) rests on two signals the
driver could not produce. TGLOrphanLive had one `completions` counter, so a
storm completion (B) could not be told from a teardown exemption (C), and
nothing recorded whether a settled stamp's work was later executed anyway,
which is the decisive "destroyed vs retained" question (review O5).

Mechanism: appended to TGLOrphan::Table (earlier fields keep their offsets):
stormCompletions / teardownCompletions, and an 8-entry ring of settled
records {time, idx, written, done before, slot, stamp table, kind = storm or
the dying owner's port (active/pending)}. For 60 s after a write the slot is
re-read under the existing gate from the timeout wrapper and, once a record
is recent, from the finishEvent wrapper (busy gate: skip, never wait). A
value below the written stamp (signed 32-bit difference) is counted as a
regression with its first time and lowest value: the GPU wrote an older
stamp, i.e. retained work executed. A changed slot pointer or a submitted
count below the written stamp (index reuse/reset) ends the record. No new
writes outside the table; before the first completion the finishEvent path
returns before any clock read or gate traffic.

Verification: CPU only (arm64). tgl_orphan passes under C++14/17 with
ASan/UBSan, including attribution, regression, window, reuse, replaced
slot, foreign machine, busy gate, wrap-around and ring tests; seven mutants
of the new logic all fail it. Suite 199 passed, same 29 x86 fixture
failures; RELEASE and DEBUG builds pass, warnings unchanged (460);
wrapTGLOrphanFinish 56 B, sampleSettled 32/104 B (RELEASE/DEBUG). Sampling
only happens while events finish, so zero regressions is weaker evidence
than a positive count. Not run on hardware.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem: round 3 asked for the WiFi join-latency breakdown, the B/C
hardware verdict criteria, a cross-engine (BCS) plan, the recovery stamp
timeout, the DEBUG stack budget and the disabled trials.

Mechanism: §13 records, per item, what the evidence supports, what it
cannot (the WiFi pack has no log for 53.9 s of the 65 s join), testable
hypotheses with read-only collection commands, a verdict table keyed to
the new TGLOrphanLive fields, why #109 gpurec's sibling path does not reach
BCS, why neither in-lock nor out-of-lock stamp resubmission is safe, and a
per-trial benefit/risk table (upstream #239 already tested INDIRECT_CTX
alone without effect, same IPEHR family as G83).

Verification: documentation only; facts checked against the repo, the
evidence pack and public upstream issues. No hardware.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Minorli
Minorli merged commit e540ba1 into main Dec 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant