Repository navigation
test(probe): stop the soak from measuring itself (report 331, ADR-389) - #355
Merged
Merged
Conversation
…y honestly The first 30-minute soak of the R-1 sweep reported a p95 of 400-700 ms every 6-9 rounds, which looked like the IME stalling on commit. It was the probe: `vmmap -summary` task-suspends the target before walking its address space, so keys that arrive while the host is frozen get charged the full walk. Running vmmap next to the host reproduced it 10/10 times (277-605 ms); an ABC control group (65 rounds), the same text at the soak's 250 ms rhythm (12 rounds each), and the untouched host all stayed at 12-31 ms. Reporting that as a product regression would have been wrong in both directions, so fix the harness (ADR-389): - New tools/macos-probe/footprint reads ri_phys_footprint via proc_pid_rusage: 15 ms, no suspension, within 0.5 MiB of vmmap. The soak samples with it every 5 s. - Footprint is only comparable inside the cold-start window (ADR-385), so the soak restarts the host first and reports footprint_gate as informational outside the 900 s window instead of gating on stale readings. - The soak's own hard limit was still 40 MiB, the pre-ADR-385 value, which false-failed at 41.8 -> 43.5 on a machine that had just run other probes. It now uses the project's 44 MiB, unchanged. - Key latency becomes a gate (median per-round p95 <= 40 ms, the P2-3 trigger line). The soak never looked at latency before, which is why a whole class of stall could have shipped unnoticed. test-soak-harness.py pins all three: no vmmap in the soak, 44 MiB, latency judged. Re-measured on the same candidate, same machine, same 30 minutes: median per-round p95 9.29 ms, slow rounds 0/178 (was 24/174), worst single key 30.5 ms (was 694 ms). Signed-off-by: wangzhizhou <824219521@qq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
报告 331:1.4.0 候选验收 + R-1 可靠性体检的结论,以及体检抓到的两处探针问题(ADR-389)。
体检四项(候选
ff14a6b/ 执行1162855f…)抓到的问题:都在探针侧
第一次久用报出「每 6–9 轮一轮 p95 400–700 ms」,看着像产品卡顿。排除过程:
vmmap -summary再打字:10/10 轮 277–605 ms → 就是它。vmmap会先task_suspend目标再遍历地址空间(~1 s),被暂停期间的按键被记成"卡顿"——ADR-385 明令不许把探针伪影当门禁量,这次伪影伪装成了性能问题。修法(只改探针,产品代码零改动):
tools/macos-probe/footprint:proc_pid_rusage读ri_phys_footprint,15 ms、不挂起,与vmmap差 ≤0.5 MiB;informational;跑前先把宿主重启成冷态;latency_p95_median_ms ≤ 40 ms(P2-3 触发线),另记慢轮数。修后同机同候选同 30 min:每轮 p95 中位数 16.18 → 9.29 ms,慢轮 24/174 → 0/178,单键 >200 ms 66 → 0(最大 694 → 30.5 ms)。
测试
新增
platforms/macos/tests/test-soak-harness.py(3 条):久用不许出现vmmap、硬门必须 44、延迟必须判定。make verify1,197 产物 0 网络符号;离线回归 74 文件 / 371 例。合并方式
merge commit。