Repository navigation
fix(renderer): propagate termination through cross-origin window caches - #1586
lanyue-llk wants to merge 1 commit into
Conversation
Sequential Navigation Soak A/B✅ HEAD completed the 200-navigation resilience and memory observation. One browser process, one target, and one CDP session navigate CSDN → SegmentFault → Huaban → example.com repeatedly. This run issued 200 Common ancestor Session resilience
A public-page failure is reported separately from an unrecoverable session. The soak requires all navigation attempts, zero failed recovery, zero lifecycle/network ordering violations, and complete resource evidence. Process-tree memory
HEAD memory by 50-navigation quarter
Raw reports and per-navigation boundary samples: workflow run and full Public-site timing and memory are observational. Use the A/B deltas and trend shape as evidence, not as a deterministic performance threshold. |
Spider Bench A/B✅ All benchmark browser service runs completed; results are informational. Public HEAD: 184 / 240 rows; 38 / 48 sites produced rows; 10 unexpected empty sites. ✅ Deterministic fixture contract is clean. Common ancestor Public 48-site run · informational
Public-site content, timing, and memory are noisy. This single A/B run reports evidence only; site outcome counts explain missing rows without treating them as a deterministic regression. CPU and memory timelinesThese are bounded 40-point views of the same complete process-tree samples used by the HTML report. CPU uses 100% per occupied logical core; memory lines are RSS first and PSS second when complete PSS samples are available. Basexychart-beta
title "Base CPU"
x-axis "Elapsed seconds" [1.537, 3.039, 3.541, 5.044, 5.544, 7.047, 8.549, 10.55, 12.051, 14.054, 15.556, 17.058, 19.06, 20.561, 22.564, 24.067, 26.068, 27.571, 29.573, 31.076, 32.578, 34.581, 36.083, 36.584, 38.086, 39.587, 41.589, 43.093, 45.096, 46.597, 48.099, 50.103, 51.605, 53.609, 55.111, 57.113, 58.614, 60.616]
y-axis "CPU percent" 0 --> 500
line [53.98, 135.78, 131.65, 157.66, 207.9, 141.73, 167.91, 171.76, 177.81, 55.97, 45.95, 101.74, 19.99, 0, 75.95, 35.95, 7.98, 2, 2, 37.92, 91.93, 123.64, 119.86, 99.88, 129.8, 131.89, 103.85, 77.83, 83.9, 55.95, 111.87, 37.96, 133.76, 13.98, 15.98, 134.02, 39.94, 193.59]
xychart-beta
title "Base memory: RSS then PSS"
x-axis "Elapsed seconds" [0.035, 1.537, 3.039, 3.541, 5.044, 5.544, 7.047, 8.549, 10.55, 12.051, 14.054, 15.556, 17.058, 19.06, 20.561, 22.564, 24.067, 26.068, 27.571, 29.573, 31.076, 32.578, 34.581, 36.083, 36.584, 38.086, 39.587, 41.589, 43.093, 45.096, 46.597, 48.099, 50.103, 51.605, 53.609, 55.111, 57.113, 58.614, 60.616, 61.781]
y-axis "Memory MiB" 0 --> 500
line [12.34, 102.49, 134.62, 114.42, 168.8, 161.45, 236.5, 221.53, 163.08, 187.95, 160.52, 168.68, 185.46, 148.08, 147.97, 171.08, 144.24, 148, 146.84, 146.86, 154.25, 183.62, 182.47, 194.27, 253.95, 205.61, 234.98, 149.09, 189.07, 158, 159.48, 165.81, 160.93, 220.81, 177.72, 162.63, 182.15, 171.65, 209.61, 0]
line [9.06, 98.81, 131.11, 110.83, 165.17, 157.88, 233.04, 217.92, 159.38, 184.26, 156.82, 164.98, 181.79, 144.37, 144.26, 167.37, 140.53, 144.29, 143.13, 143.15, 150.21, 179.91, 178.25, 190.6, 250.28, 202.06, 231.16, 145.32, 185.36, 154.3, 155.77, 162.09, 157.22, 217.12, 174.01, 158.92, 178.58, 167.94, 206.16, 0]
HEADxychart-beta
title "HEAD CPU"
x-axis "Elapsed seconds" [1.036, 1.536, 3.037, 4.538, 6.039, 7.539, 9.04, 10.542, 12.044, 14.047, 15.549, 17.052, 18.555, 20.058, 21.561, 23.063, 24.566, 26.067, 27.569, 29.071, 30.573, 32.074, 32.575, 33.576, 35.078, 36.58, 38.081, 39.584, 40.085, 41.588, 43.089, 44.591, 46.094, 47.596, 49.098, 50.6, 52.101, 53.602]
y-axis "CPU percent" 0 --> 500
line [0, 2, 2, 121.95, 112.03, 155.69, 131.89, 163.83, 181.77, 85.91, 157.83, 89.8, 5.99, 89.74, 65.8, 65.92, 4, 0, 45.95, 83.86, 127.87, 115.81, 101.95, 137.81, 129.96, 143.9, 143.78, 127.73, 193.68, 111.85, 11.98, 85.88, 103.78, 4, 117.83, 129.83, 131.95, 129.88]
xychart-beta
title "HEAD memory: RSS then PSS"
x-axis "Elapsed seconds" [0.035, 1.036, 1.536, 3.037, 4.538, 6.039, 7.539, 9.04, 10.542, 12.044, 14.047, 15.549, 17.052, 18.555, 20.058, 21.561, 23.063, 24.566, 26.067, 27.569, 29.071, 30.573, 32.074, 32.575, 33.576, 35.078, 36.58, 38.081, 39.584, 40.085, 41.588, 43.089, 44.591, 46.094, 47.596, 49.098, 50.6, 52.101, 53.602, 54.848]
y-axis "Memory MiB" 0 --> 500
line [12.16, 54.75, 54.69, 62.3, 119.7, 145.27, 155.26, 170.24, 175.61, 179.39, 181.04, 153.45, 161.91, 145.58, 160.52, 151.09, 152.56, 147.9, 147.54, 152.29, 178.1, 174.96, 220.64, 284.01, 203.82, 220.91, 189.32, 162.29, 196.93, 173.71, 171.2, 157.84, 187.43, 185.38, 183.08, 181.07, 200.59, 157.71, 192.92, 0]
line [9.02, 51.21, 51.15, 58.75, 116.44, 141.7, 151.69, 166.63, 171.99, 175.46, 177.43, 150.15, 158.25, 141.92, 157.18, 146.57, 148.9, 144.24, 143.88, 148.71, 174.44, 171.38, 217.04, 280.32, 200.15, 217.29, 185.81, 158.63, 193.32, 170.19, 167.57, 154.17, 184.51, 181.8, 179.42, 177.27, 196.98, 154.05, 189.31, 0]
Deterministic fixture · required contractThe fixture exercises 15 routes: 8 are expected to emit rows and 7 intentionally exercise empty, loading, or timeout behavior.
Full HTML, JSON, CSV, logs, and page snapshots: workflow run and full The public-web A/B is informational. The exact HEAD fixture contract runs as a separate required CI check; timing and public-site content deltas remain non-blocking. |
CI Regression ReportSource CI run · source state at render:
Release regression — ✅ HEAD/base failures 0/0; raw binary 0.00%Package and image size
Startup latency and PSS
Concurrency matrix
Frontend differential — ✅ 1,020/1,020 cases matched; 0 issues; 1 Chromium reference recoveries
Recovered Chromium reference infrastructure failures
Agent episodes · Moli vs Chromium — ✅ 8/8 Moli episodes passed; 0 failures
Runtime and CDP session contracts — ✅ 26 contract cases; 0 failures
CDP smoke — ✅ 52/52 groups passed; 621 scenariosWorkers: 4 · cumulative group time: 192.77 s · failed groups: 0
WebMainBench · 545 pages — ✅ 545/545 completed; 0 unexpected failures
Frozen HTML · Linux · Diagnostics: All artifact fields are parsed by the trusted default-branch renderer; missing or invalid inputs remain visible as unavailable. |
5a09e3c to
4a317e2
Compare
lanyue-llk
left a comment
There was a problem hiding this comment.
复核提交 4a317e2e74ed,未发现本次改动新增的明确阻断问题。
WeakMap 的构造和 get/set 都可能执行 V8 操作,终止时将空结果直接 expect 确实会把正常取消变成进程故障。这里用 TryCatch 保留终止原因、沿既有 Option 返回路径退出,同时保留非终止内部错误的失败行为,修改范围合适。缓存仍按目标窗口和访问方 realm 区分;此次修改没有绕过跨域权限判断,也没有把失败构造的结果写入缓存。
已追踪缓存初始化、窗口/Location 访问方和新增测试;本机缺少原生开发工具,未运行该提交的 V8 测试。
Superseded by #1594, which removes the WeakMap cross-origin surface cache and includes the Location initialization failure follow-up. Further review continues there.
Problem
Cross-origin Window/Location cache lookup and construction used operations that could fail during V8 termination. Treating those failures as infallible could panic or retain a partially built surface.
Change
Propagate missing cache/prototype values through the existing optional access surface. Stop construction on termination, leave the cache empty, and allow a later non-terminated access to recover. Keep ordinary cache failures visible.
This changes failure propagation only. It does not relax cross-origin access checks or alter the cancellation policy.
Reproduce and verify
The unit fixtures terminate execution before cache lookup and during surface creation. The builder must not run after termination; a failed construction must not be cached; recovery must succeed once termination is canceled. A separate control ensures ordinary cache errors are not silently discarded.
cargo nextest run --locked -p moli-renderer-v8 --lib -E 'test(cross_origin_cache::tests)' --no-fail-fastBefore extraction, this source passed
cargo fmt --all, workspace/all-target/all-feature Clippy with-D warnings, and the full workspace nextest suite (20,140 passed, 17 skipped). This unit has no source changes since that validation. The PR CI checks its extraction onto mainbe610b8fe.Regression fixtures:
terminated_execution_stops_cross_origin_cache_lookup_without_buildingtermination_during_surface_creation_does_not_cache_and_can_recovernon_termination_cache_errors_are_not_silencedDependencies
Independent change targeting
main; no other open PR is required. Extracted from #1501. Review map and sibling PRs.