Skip to content

ci/spec22-gems: bisect the sassc closure through ffi on LoadError (incident 13 round 6) - #91

Merged
ronaldtse merged 1 commit into
mainfrom
ci/spec22-sassc-bisect
Aug 19, 2026
Merged

ci/spec22-gems: bisect the sassc closure through ffi on LoadError (incident 13 round 6)#91
ronaldtse merged 1 commit into
mainfrom
ci/spec22-sassc-bisect

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Incident 13 round 6 — name the 126's failing link from inside the process

Run 32188296332 attempt 2 (round-5 fix live, traces on) proves the closure walk
complete: libsass.so's 15 imports parse (whole-image PE), both vendored
siblings (libgcc_s_seh-1.dll, libwinpthread-1.dll) materialize beside the
importer, every other import is KERNEL32 / ADVAPI32 / api-ms-win-crt-* host
surface — and the ffi load still fails the OS bind with error 126.

Verified inert links (evidence in the r10 proof logs + source re-reads):

  • the walk: [tfs] traces show parse verdicts, per-dep resolve verdicts,
    materializations — all correct;
  • placement: importer and deps share the per-process dl bucket + mirrored
    tail (context.rs: extract_for_execroot.join(host_tail(path)));
  • ffi flags: DynamicLibrary.c:222PathIsRelativeA either way lands 0x8
    (LOAD_WITH_ALTERED_SEARCH_PATH), the shim honors/forces it;
  • the shim: non-ENOENT dlmap failures set the translated last-error and never
    touch the OS (the r10 error-5 first miss is the jail's EACCES on a
    covered-but-not-held probe — correct behavior);
  • the host api-ms surface: ffi_c.so and the runtime itself boot on it.

What remains is only measurable on the windows loader. This probe addition
bisects the closure from inside the jailed process through the same ffi
path
on the require's LoadError:

  1. ADVAPI32.dll (bare name) — control: a stock OS module;
  2. api-ms-win-crt-runtime-l1-1-0.dll (bare name) — control: an api-set
    contract;
  3. libwinpthread-1.dll (vendored, no in-image deps) — the base case;
  4. libgcc_s_seh-1.dll (vendored, depends on 3);
  5. libsass.so — the retry.

Verdict matrix: control fail → host surface broken in the scrubbed env ·
sibling fail → extracted file bad on disk (truncation/lock/quarantine) ·
siblings ok + retry ok → transient race, not the closure · siblings ok +
retry 126 → an import the walk cannot see (reopens the parser).

Never gates: the original LoadError re-raises after the verdicts. POSIX legs
never fire it (green there). Both sassc legs ride it (same require).

…cident 13 round 6)

Run 32188296332 attempt 2 (round-5 fix live, traces on) proves the
closure walk COMPLETE: libsass.so's 15 imports parse (whole-image PE),
both vendored siblings (libgcc_s_seh-1.dll, libwinpthread-1.dll)
materialize beside the importer, every other import is KERNEL32 /
ADVAPI32 / api-ms-win-crt-* host surface — and the ffi load still fails
the OS bind with error 126. The walk, the placement, the ffi flags
(0x8 ALTERED on every route), and the shim's errno discipline all check
out; the failing link is only measurable on the windows loader itself.

On the sassc require's LoadError, bisect the closure from inside through
the same ffi path: two host-surface controls by bare name (ADVAPI32.dll;
an api-ms-win-crt contract — both proven by the runtime's own boot), then
each vendored sibling individually, then libsass.so again. The verdict
matrix discriminates every remaining hypothesis: control failure = the
host surface is broken in the scrubbed env; sibling failure = the
extracted file is bad on disk (truncation, lock, quarantine); siblings
ok + libsass retry ok = a transient race on the first load, not the
closure; siblings ok + libsass retry 126 = an import the walk cannot see
(delay-load excluded by design — would not 126 the base load — so this
outcome reopens the parser). Never gates: the original LoadError
re-raises after the verdicts. POSIX legs never fire it (green there).
@ronaldtse
ronaldtse marked this pull request as ready for review August 19, 2026 01:16
@ronaldtse
ronaldtse merged commit 125d36d into main Aug 19, 2026
42 checks passed
@ronaldtse
ronaldtse deleted the ci/spec22-sassc-bisect branch August 19, 2026 01:16
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.

2 participants