S031: root due timers in vendored servo-script (R5-01 SIGSEGV), crash-adblock regression smoke
fire_timer moved due timers into an unrooted Vec; a GC inside one callback swept the functions of the timers still waiting. Heavy-web reruns and cargo test still pending. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
parent
c4022648b0
commit
911c5ab2ce
3 changed files with 306721 additions and 10 deletions
|
|
@ -166,6 +166,14 @@ picture-in-picture, extensions, password capture, printing.
|
|||
| `resource_thread.rs` `create_http_states`, Exit; `nacre.rs` `set_cookie_persistence`, `cookie_jar_snapshot`; `Cargo.toml` (+ `serde_json`) | the public cookie jar comes from and goes to the embedder instead of plain `cookie_jar.json`: Nacre's initial jar at start, a JSON copy on demand, the final jar at Exit (S025, D-019) | `cookies.txt` + `cookies-restart.txt` + `cookies-cleared.txt` |
|
||||
| `fetch/methods.rs` `main_fetch` (step 12) | privacy mode's Firefox-style Accept-Language ("en-US,en;q=0.5", `nacre::append_accept_language`) replaces Servo's single locale; a page's own value stays (S024) | `privacy-net.txt` |
|
||||
|
||||
## Vendored servo-script patches
|
||||
|
||||
`vendor/servo-script` is servo-script 0.7.0 through `[patch.crates-io]` (S031), same rules as servo-net above.
|
||||
|
||||
| File, function | What and why | Re-check |
|
||||
|---|---|---|
|
||||
| `event_loop/timers.rs` `OneshotTimers::fire_timer`, `JsTimerTask::invoke` | due timers wait in a `RootedTraceableBox<VecDeque>` instead of a plain `Vec`, and the running timer's callback is rooted: a GC inside one callback swept the functions of the timers still waiting (SIGSEGV in `GlobalScope::from_object`, R5-01) | `crash-adblock.txt` |
|
||||
|
||||
Third-party rule (S023): a request is third-party when its host's site (registrable domain, eTLD+1; an IP address
|
||||
or a single-label host stands for itself) differs from the top-level site of its webview. Scheme and port don't
|
||||
count, so `a.example.com` on `example.com` stays first-party. The top-level site comes from the last `Document`
|
||||
|
|
|
|||
|
|
@ -319,6 +319,16 @@ Later: S010 list: user checks the Discord icon with their own client (the Discor
|
|||
- Not to spec / not done: player integration (S028): `loadedmetadata`/HAVE_METADATA after the init segment only (duration-boundaryconditions 0/13, play/seek tests 0/1 each); changeType across containers (gst can't; changetype-play* ~1/19); errors before the init segment; `buffered` after `removeSourceBuffer` should throw; Opus/fLaC in MP4 (no decoder). Worker MSE and ManagedMediaSource out of scope.
|
||||
- Seen once: a full WPT run hung the script thread (driver timer stopped at file 19); not reproduced in the rerun. Watch in S028.
|
||||
|
||||
## S031 — SIGSEGV after an ad-blocked script load (R5-01, 2026-11-12)
|
||||
- Repro: `crash-adblock.txt` (685 cancelled loads/run) 0 crashes in 3 runs, heavy-web 0/2, a YouTube search loop 0/3. The crash is rare online; the two S024 cores (hidden Xvfb heavy-web runs) were symbolized with an unstripped rustc twin of the same commit (same .text).
|
||||
- Backtrace (both cores): script thread, `ScriptThread::handle_msgs` → `TimerListener` task → `OneshotTimers::fire_timer` → `Function::Call_` → `GlobalScope::from_object` → `JS::GetNonCCWObjectGlobal` reading a swept object (`0x4b4b…` poison). The ad-block log line before it was a bystander.
|
||||
- Cause: `fire_timer` (servo-script `event_loop/timers.rs`) moves every due timer out of the traced timer list into a plain local `Vec` and runs them one by one; a GC inside one callback can't see the rest, so their `TracedCallback` functions are swept and the next call reads a dead object (or a reused cell: the wrong function runs).
|
||||
- Proof offline: `pages/crash-timers.html` (40 timers due together, each allocating): 9 of 40 callbacks run, the other 31 are silently lost, 3 of 3 runs; without the allocation all run.
|
||||
- Fix: servo-script vendored (`vendor/servo-script`, `[patch.crates-io]`); `fire_timer` keeps due timers in a `RootedTraceableBox<VecDeque>`, `JsTimerTask::invoke` roots the running callback (DESIGN.md "Vendored servo-script patches"). After: 40 of 40 run.
|
||||
- Smoke `crash-adblock.txt` (~870 cancelled loads + 3200 timers under GC pressure): fixed build exits 0 3/3 (visible); the pre-fix build (68346f0) fails it (timer page never finishes). No Nacre-side change, so no unit test.
|
||||
- Not done (stopped for the weekly limit): step 7 reruns (net-adblock, launch, heavy-web ×2 with `SMOKE_TIMEOUT=900`) and `nice cargo test --release -j 2` after vendoring. INDEX not ticked until they pass.
|
||||
- S028 merge: the MSE branch also vendors `vendor/servo-script`; take the branch's files and re-apply the two `Nacre patch (S031)` hunks in `event_loop/timers.rs` (the branch's timers.rs is the pristine 0.7.0 file).
|
||||
|
||||
## Later
|
||||
- Turnstile widget paints as a black half-disc (Servo painting of its iframe/shadow DOM, S006 site doctor).
|
||||
- Google sign-in past the email step: press Next with a real account, by the user (S006).
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Input for `/plan-generate` → category `07 Polish pass` (and `03 Gaps` S011–S014, which haven't started yet).
|
||||
Same tags as phase 1/4: `[open]`, `[fixed <commit>]`, `[wontfix: reason]`.
|
||||
|
||||
R5-01 [open] CRASH: Nacre crashed (SIGSEGV) while searching. Last log line before it:
|
||||
R5-01 [fixed S031, heavy-web recheck pending] CRASH: Nacre crashed (SIGSEGV) while searching. Last log line before it:
|
||||
`ERROR script::dom::html::scripting::htmlscriptelement] Fetching classic script failed Load cancelled (UrlWithBlobClaim
|
||||
{ url: "https://static.doubleclick.net/instream/ad_status.js", token: None })`, so the ad blocker cancels a script load
|
||||
just before the crash (YouTube/Google search page, throwaway profile). Reproduce, get a backtrace (`RUST_BACKTRACE=1`,
|
||||
|
|
|
|||
Loading…
Reference in a new issue