mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
[docs] (P7): ID-P7-47/48 - V1 fix round 2 lands on the integrator's own review; the window-1b mid-run reading and the screen-off hypothesis are recorded for the next integrator
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
**阶段:P7 DirectVulkan(Magma)全量迁移**,并行流 **P3b/P4b 深化(Espryt,wave 2-D)** 与 **Ph 小件(簇 F)**。计划 [`notes/p7/PLAN-PH-P34B-P7.md`](notes/p7/PLAN-PH-P34B-P7.md)(五波)。
|
||||
|
||||
**更新:2026-09-22 夜(M2 r2 落地,ID-P7-46)** · 交接清单 [`notes/p7/HANDOFF-2026-09-22.md`](notes/p7/HANDOFF-2026-09-22.md);在跑 agent 的报告落到 WSL `~/w7/notes/handoff/`。`origin/feat/disaggregated` = 集成树头(B3 修复 r2/r3、V1 修复轮、B2 r3/r4、M2 + **M2 r2**、F 修复轮、X2;门全绿);M2 审查的 must-fix(memo 句柄复用 ABA)**已由 M2 r2 关闭**(ID-P7-46);V1 修复 r2 落地中(ID-P7-47)。
|
||||
**更新:2026-09-22 夜(M2 r2 + V1 修复 r2 落地,ID-P7-46/47)** · 交接清单 [`notes/p7/HANDOFF-2026-09-22.md`](notes/p7/HANDOFF-2026-09-22.md);在跑 agent 的报告落到 WSL `~/w7/notes/handoff/`。`origin/feat/disaggregated` = 集成树头(B3 修复 r2/r3、V1 修复轮、B2 r3/r4、M2 + **M2 r2**、F 修复轮、X2、**V1 修复 r2**;门全绿);M2 审查的 must-fix(memo 句柄复用 ABA)**已由 M2 r2 关闭**(ID-P7-46);V1 修复 r2 已落地(ID-P7-47);窗口 1b 矩阵的中期读数与息屏假设见 ID-P7-48。
|
||||
|
||||
## 1. 出口门总览(CONTRACT-P7 §8 的 9 项分母)
|
||||
|
||||
@@ -61,15 +61,15 @@
|
||||
|---|---|---|
|
||||
| B2 r3 审查(fable) | transport 门控的真值域、默认 framebuffer pre-pass 的解析、新腿的读面 | 完成:land with fixes → B2 r4 已落地(ID-P7-44) |
|
||||
| B3 修复 r2 审查(fable) | 剥注释 / 字面量的边界、块回溯规则、自测覆盖、fail-closed 顺序、pull-library 控制 | 完成:land with fixes → B3 r3 已落地(ID-P7-44) |
|
||||
| V1 修复轮审查(fable) | read 侧 corrupt 的两次施加、server 半边断言、逐条武装普查的双向性、例外表 5 类 | 完成:land with fixes → V1 修复 r2(落地中,ID-P7-47) |
|
||||
| V1 修复轮审查(fable) | read 侧 corrupt 的两次施加、server 半边断言、逐条武装普查的双向性、例外表 5 类 | 完成:land with fixes → V1 修复 r2 已落地(ID-P7-47) |
|
||||
| M2 r2(fable) | **must-fix**:`m_wireStoreDestroyEpoch` 进 `UniformManager` 两个 memo(§9 例外已批)+ red-once;note SHA、`ASSERT_GE`、注释、`lastUseSubmitIndex` 清零、清洗名单 | **已落地**,集成者审查 land(ID-P7-46) |
|
||||
| V1 修复 r2(fable) | read 侧控制断言 ≥ 2 行、verify 摘要在 `Close()` 前 flush(client 日志不再被截断)、措辞 | 完成 → `~/w7/notes/handoff/v1-fix-r2.md`;落地中(ID-P7-47) |
|
||||
| V1 修复 r2(fable) | read 侧控制断言 ≥ 2 行、verify 摘要在 `Close()` 前 flush(client 日志不再被截断)、措辞 | **已落地**,集成者审查 land(ID-P7-47) |
|
||||
| X2(fable) | `InitialCapsStartup.ANullInitialSnapshot…` 在负载下的 flake:复现、测试 vs 产品判定、修复 + 500 次循环 | **已落地**(test-only;真因 = 夹具按 accept 顺序配对,ID-P7-45) |
|
||||
| 窗口 1b 矩阵 | 38 例 DirectGLES × TCP(WSL ↔ 手机 p7w5,逐例 3 s 间隔、两遍、逐例 logcat) | 进行中;已见 ReadPixels 被设备 server 拒、main-menu server 死亡(ID-P7-41) |
|
||||
| 窗口 1b 矩阵 | 38 例 DirectGLES × TCP(WSL ↔ 手机 p7w5,逐例 3 s 间隔、两遍、逐例 logcat) | 进行中(44 / 78);pass 1 27/39 红,11 例聚在 57–61 s 处对端挂断——手机息屏 60 s 的假设,见 ID-P7-48 |
|
||||
|
||||
## 5. 下一步(按序;机械步骤与命令见 [`notes/p7/HANDOFF-2026-09-22.md`](notes/p7/HANDOFF-2026-09-22.md))
|
||||
|
||||
1. ~~推送~~ 已推;~~四个修复轮(B2 r3、B3 修复 r2、V1 修复、F 修复)回来 → 各自门 + 复审 → 下一次推送~~ 已落地并推送(ID-P7-44/45/46);V1 修复 r2 门在跑 → 落地(ID-P7-47)。
|
||||
1. ~~推送~~ 已推;~~四个修复轮(B2 r3、B3 修复 r2、V1 修复、F 修复)回来 → 各自门 + 复审 → 下一次推送~~ 已落地并推送(ID-P7-44/45/46);V1 修复 r2 已落地并推送(ID-P7-47)。
|
||||
2. **F2**:D11 五处 + PH-2、PH-6 drop-with-latch、PH-1 (3)(4)、PH-7 (5) fork 前认证——先要一个能向 spawn / TCP server 发畸形记录的对端字节驱动(fuzz 臂 2 的第一块)。
|
||||
3. ~~M2 门 + 审查绿 → 推送~~ 已推(M2 + r2,ID-P7-46)→ p7w6 APK(**含 F 的 wireFingerprint 变更:手机 server 必须重部署**)→ bsl-esc-menu spawn 臂通过(并重跑窗口 1b 作 `DataBind` 对照)→ **M3**(descriptor set 在长帧内无界,M2 的新发现) → 门 3 分母 36 全部与 monolith 同(三遍逐位相同 + spawn 臂,§7.2)。
|
||||
4. **B4**:裁判的 `WaitForSubmitsUpTo` 聚合等待(`Present:14094` / `WaitForSubmitIndex` / `WaitForFrameSerial`)+ 裁判点名的 Magma 债(§12)。
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,11 @@
|
||||
# Review: V1 fix round 2 (pipe 403b5669 ffc4fb7d 07f4e3ac 9814bc74 336174e3) — integrator (Fable 5.1, main session)
|
||||
|
||||
**Verdict: land** (no change required before push).
|
||||
|
||||
Fix 1 — the read-side control counts to two. The server reads the pack field twice inside the ReadPixels window (the applier's saved-pack read before it installs the neutral pack, the backend's read after), and the hook perturbs its oracle once per read because the ID-49 overwrite inside the window wipes the first perturbation. A control satisfied by one report was satisfied by either block alone and falsified neither. Verified: `CountReadReports` is line-based (ReportDivergence is one MGLOG_F per report, so no report spans lines and none share one); the scenario's `EXPECT_GE(reads, 2)` and the CI step's `-lt 2` red are the same threshold; the CI count is `grep -c … || true` with `${reads:-0}`, so a missing file reads 0 and reds instead of erroring. The falsifier asymmetry is measured and stated (block 2 reverted: both backends drop to 1; block 1 reverted: DirectVulkan drops to 1, DirectGLES stays at 2 because its backend reads twice after the install), which is what justifies the CI step needing both backends.
|
||||
|
||||
Fix 2 — the FATAL=0 summary is written before `Debug::Close`. Cause was pre-existing: the namespace-scope `VerifyState` destructor ran from `__run_exit_handlers` after `DestroyImpl` had closed the sink, and Log.cpp's next write reopened the role's file with "w", so every FATAL=0 client half was the summary alone (121 B / 1 line). Verified: `FlushSummary` is idempotent through `Summarised` (the destructor after Close has nothing new and writes nothing; a process that never called Destroy keeps the old arm, where no Close ran); the two writers are sequential (DestroyImpl, then exit handlers), so the non-atomic `Summarised` is fine; the call sits before the `logLifecycle` check and before Close; the include, the declaration and the call are all under `MOBILEGL_PIPE_VERIFY`, so the pull build gains no byte (G1 checked on the gate). Client halves now carry the arming line, the entry report and the summary as the last line (121 B → 7461 / 7386 B).
|
||||
|
||||
Nits 3 and 4 are citation fixes. The CONTRACT-P7 §6 hunk conflicted with the integration tree's own version of that sentence; resolved by keeping the tree's sentence and applying the package's edit (the CMake line-number citation goes, the guard `if (MOBILEGL_PIPE_VERIFY)` stands alone). The note's lane-count tables were left for the integrator to re-measure: the gate on 336174e3 is the measurement (below).
|
||||
|
||||
Gate on 336174e3: unit 2436、split 304、spawn 220、tcp 223、magma 101 / 80 / 71、full 539、G1 恒等、普查 79、棘轮 173、parity 0、审计 53/53/0、OpenRA inproc + spawn ssim 1.0 / 0 unsound、verify 1150 / 1084.
|
||||
@@ -13,6 +13,8 @@
|
||||
- `wsl.exe -d Arch -- bash -lc '…$x…'` 会吞 `$var`:**一律写脚本文件**再 `MSYS_NO_PATHCONV=1 wsl.exe -d Arch -- bash /mnt/c/…/x.sh`;长输出别 `| head`(SIGPIPE 会杀脚本),重定向到日志再看。
|
||||
|
||||
## 1. 现状(本会话结束时)
|
||||
> **2026-09-22 深夜补记(ID-P7-44..48)**:M2 r2、X2、V1 修复 r2 都已落地并推送——`origin/feat/disaggregated` = V1 修复 r2 的头 `336174e3` 加其上的这笔 docs 提交;§2 表中 M2 审查 / M2 r2 / F 修复轮审查 / B3 r3 + B2 r4 审查 / V1 修复 r2 / X2 各行**已完成**(审查文本在 `notes/handoff/review-*.md`),§4 第 1 项完成;wire 臂的 memo ABA 已关。窗口 1b 矩阵仍在跑:中期读数与「手机 60 s 息屏切断 child TCP」的假设、以及重跑前该做的 `svc power stayon true`,见 ID-P7-48——写报告的人请先看它。
|
||||
|
||||
- `origin/feat/disaggregated` = **`87584d0b`**(尾注已改写;B2 r1/r2、B3 返工 + 修复轮、V1、F 片 1–3、E1)。
|
||||
- 集成树 `~/w7/pipe` 头 = 见 `git log`(B3 修复 r2/r3、V1 修复轮、B2 r3/r4、M2、F 修复轮、docs 到 ID-P7-43);每一步的门都全绿(唯一红 = `InitialCapsStartup.ANullInitialSnapshot…` flake,X2 在修)。**推送时机**:接手者先跑一次 `~/w7/logs/p7-gate-template.sh`(`sed s/TAG/<tag>/g`),绿即推。
|
||||
- 手机(Redmi 2f7cbe2e):装的是 **p7w5**(`top.mobilegl.plugin.p7w1.trace`),supervisor `0.0.0.0:40613`,token `p7w1b-lan-token-20260922`;主机侧同 stamp 制品 `~/w7/logs/p7w5host/host/`(树 `~/w7/p7-w5host`)。
|
||||
|
||||
@@ -49,4 +49,6 @@
|
||||
| ID-P7-44 | 2026-09-22 | **用户叫停 fable 审查代理,改由集成者本人审查。** F 修复轮 = **land**(两 nit 记债:`RunSession` 里 `Accept()` 返回到 `close(sourceFd)` 之间已转发的一条 DataBind 会随队列被关而无具名拒绝,微秒级窗口;`protocol.fbs` 任何字节变化都要 bump,严格但有意);B3 修复 r3 + B2 r4 = **land**(审计跨 `#endif` 只认整行 disagg 守卫、任意缩进 `#else` 停走;`EVIDENCE` 三种空模式都拒;模式位 100755;窗口腿底色品红 / 0.625 独一;门控只看 transport)。审查文本在 `notes/handoff/review-f-fix.md`、`review-b3r3-b2r4.md`(仓库与 WSL `~/w7/notes/handoff/` 各一份)。 | 集成树头已推送;余下机械项见 HANDOFF。 | `notes/handoff/` |
|
||||
| ID-P7-45 | 2026-09-22 | **X2 落地**(pipe,test-only):`InitialCapsStartup.*` 与 `SocketTransportTest` 的 TCP 用例在负载下偶红的真因是**夹具**按 accept 顺序配对两条 loopback 连接,而内核在负载下会乱序交付(裸 socket 探针:空闲 0/2000、20 个 CPU 占用者下 5/3000)——对端把数据套接字当控制用,`StreamLink` 读到 `MGLD` 魔数外的首帧 → `Fatal{ProtocolCorruption,"StreamLink"}`;夹具改用产品的 DataBind nonce 会合(PH-7 (4) 形状),三例 0/500;无产品字节变化,G1 恒等。域外债:`AcceptPair`/`ConnectTo` 对 `tcp://` 监听仍可调且按顺序配对(产品从不这样用),未具名拒绝。 | pipe unit 车道全绿后推送;`~/w7/notes/handoff/x2-caps-flake.md`。 | `InitialCapsStartupTest.cpp`、`SocketTransportTest.cpp` |
|
||||
| ID-P7-46 | 2026-09-22 | **M2 r2 落地(集成者本人审查 = land,must-fix 关闭)**:`VkBufferManager::m_wireStoreDestroyEpoch` 在四条销毁 wire store 的路径上自增(`DeferWireRelease` 即时销毁、有销毁的扫描每次一跳、`DestroyAllDeferredWireReleases`、`Shutdown` 清 record 持有的 store),永不复位;`UniformManager` 的 descriptor-reuse 签名 `mix64(epoch)`、`FastRebindMemo` 记录并比对(全在 disagg 守卫内;§9 分区例外已批);第四条 Reclaim 用例(一帧内 orphan → 不等待的 flush → 一条 staged copy 挡住清 memo 的 drain → 下一次停放的扫描销毁 S1 → 64 KiB 经同一句柄值铸造、放不进 1 MiB pin 封住的 256 B 洞 → draw)red-once 两臂读到死 store 的颜色,加守卫后绿。集成者核对:扫描在 `dead == 0` 先返回、不空跳 epoch;`DestroyWireBuffer` 先 move 进 defer 再 erase;文件里其余七处 `buffer.Destroy()` 都是非 wire record;`FastRebindMemo` 聚合初始化顺序与结构体一致。pipe 独有一行:`RespecifyWireBuffer` 顺带清 B3 的 `lastUseSubmitIndex`(`f62703e9`);`spawn_lane_parity.py` 的具名例外表补第四条 tail(`1ab62ece`;包分支按前缀例外、pipe 两次合并后按精确名——门上唯一的一条 parity 红就是它);`ServerSpawn` 放行 `SPIN_US` / `SERVER_AFFINITY` / `AUDIT`。**代价记 §12(M3 的分母)**:每次销毁事件后同 program 第一笔 draw 多一次 descriptor set 分配 + 写(bsl ~2.6 万 / 130 万)。方法学:`MobileGLIntegrationTest` 桌面上静态链接 `MobileGL_s`,Split 臂跑的是编进测试二进制的 backend——red-once 变体必须三个目标都建。 | 门(`f62703e9`):unit 2436、split 304、spawn 220、tcp 223、magma 101 / 80 / 71、full 539、G1 恒等、普查 79、棘轮 173、审计 53/53/0、OpenRA inproc + spawn ssim 1.0 / 0 unsound、verify 1150 / 1084;parity 0(`1ab62ece`);推送。审查文本 `notes/handoff/review-m2-r2.md`。 | `VkBufferManager.{h,cpp}`、`UniformManager.{h,cpp}`、`MagmaWireReclaimScenario.cpp`、`ServerSpawn.cpp`、`spawn_lane_parity.py` |
|
||||
| ID-P7-47 | 2026-09-22 | **V1 修复 r2 落地(集成者本人审查 = land)**:(1) read 侧负控数到 **2**——server 在 ReadPixels 窗口内读 pack 字段两次(applier 装中性 pack 之前的 saved-pack 读、backend 装后的读),hook 每次读各施加一次扰动(ID-49 的窗口内覆写会抹掉第一次),只认一行的控制对两块扰动都不证伪;`VerifySplitReadCorrupted.` 与 CI 步都要 `where=read` ≥ 2 行;证伪的不对称性已量出(去掉块 2 两后端都掉到 1;去掉块 1 只有 DirectVulkan 掉到 1,DirectGLES 装后读两次仍是 2)→ CI 两后端都要。(2) FATAL=0 的 verify 摘要改由 `DestroyImpl` 在 `Debug::Close()` 之前调 `MGPipeVerifyFlushSummary()` 写出(`#if MOBILEGL_PIPE_VERIFY`):此前命名空间级静态的析构在 `__run_exit_handlers` 里写、`Log.cpp` 以 "w" 重开已关的 sink,于是每个 FATAL=0 的 client 半边只剩摘要一行(121 B;预存缺陷)——现在 7461 / 7386 B,武装行、entry 报告、摘要末行齐全;`FlushSummary` 以 `Summarised` 幂等,从未 Destroy 的进程保留旧臂。(3) 两处引文修正;`CONTRACT-P7` §6 那句与集成树的版本冲突,取树上句子 + 包的改动(去掉 CMake 行号引文,只留守卫)。集成者核对:`CountReadReports` 按行、CI 计数 `grep -c … \|\| true` + `${reads:-0}` 缺文件读 0 即红;两个写者顺序执行故 `Summarised` 不必原子;pull 构建无字节变化。包 note 的车道计数表未改,以本门为准。 | 门(`336174e3`):unit 2436、split 304、spawn 220、tcp 223、magma 101 / 80 / 71、full 539、G1 恒等、普查 79、棘轮 173、parity 0、审计 53/53/0、OpenRA inproc + spawn ssim 1.0 / 0 unsound、verify 1150 / 1084;推送。审查文本 `notes/handoff/review-v1-fix-r2.md`。 | `PipeFill.cpp`、`PipeInputs.h`、`Init.cpp`、`PipeVerifyArmingScenario.cpp`、`test.yml`、`split_log_paths.py` |
|
||||
| ID-P7-48 | 2026-09-22 | **窗口 1b 配速矩阵的中期读数与假设(未结)。** 44 / 78 例跑完时 pass 1 = 27/39 红:主因是 `DEVICE LOST`(client `mobilegl.client.log`:「the barrier woke on a peer that had hung up」= 对端 TCP 挂断,随后的 `Fatal{UncarriedInitialBytes, "resource_respecify"}` 是 `PipeFill.cpp:1080` 的**下游**判定,不是原因);其中 11 例的失败时长聚在 **57–61 s**(sodium 56.3、xaero-minimap 60.5、journeymap 61.1、modernui 56.9、rei-normal 60.8、…);pass 2 同例已有 3 例转绿(1.17 main-menu、sodium、common-mods),即非确定性。手机侧:`settings get system screen_off_timeout` = **60000**,`dumpsys battery` = AC 供电(`stay_on_while_plugged_in=2` 只对 USB),`am_kill` / `logcat -b crash` 在本轮时段无任何记录,`:mglsrv` 服务进程存活(child 是每例 spawn 的 pid)。**假设**:runner 每例 `wake-adb` 点亮屏幕,~60 s 息屏后 MIUI 的后台策略切断 child 的 TCP(不是 OOM、不是崩溃、不是配对窗口)。**不在本会话改设备状态**(保持两遍数据同口径);下一位先 `adb -s 2f7cbe2e shell svc power stayon true`(或 `settings put system screen_off_timeout 1800000`)再重跑,并把 supervisor 对 child 的 reap 行(`tcp_device_server.py`)纳入每例采集——现在 `phone:` 列只抓 0.5 s 的 logcat。 | 报告待 `=== ALL DONE`:`~/w7/logs/p7w1b/paced.log`、`paced/pass/<case>/`。 | `notes/p65/`(待写) |
|
||||
| ID-P7-19 | 2026-09-22 | OpenRA 真机分歧改判为 **wire 臂的 GPU 时序竞态**(冷驱动缓存 = 慢 pipeline 创建 → 最终帧回读在最后几批 draw 完成前采样),归 wave 2-B 第 0 片;主机 red-once 用 pipeline 创建延迟旋钮复现;真机验收 = 三次 `pm clear` 冷跑 1.0。F1 保留(机制正确)但不再被当作分歧原因。 | E7:`pm clear` 三遍 0.976493989 / 14658 逐字相同、热跑 1.0、冷 monolith 1.0、`FRAMESINFLIGHT=1` 一绿一红;两臂 client/server 日志逐行相同;diff 只缺最后画的对象。 | `WireFramebuffer.inc`、`VulkanRenderer.cpp`、`F1-verify/README.md` |
|
||||
|
||||
Reference in New Issue
Block a user