Test fork instrumentation output reproducibility across processes - #888
Test fork instrumentation output reproducibility across processes#888brandonpayton wants to merge 1 commit into
Conversation
Phase B-1 matrix build status —
|
| Package | Arch | Status | Sha |
|---|---|---|---|
| bc | wasm32 | built | f45f740f |
| bzip2 | wasm32 | built | 19695174 |
| coreutils | wasm32 | built | 365366cf |
| curl | wasm32 | built | 2ae673c2 |
| dash | wasm32 | built | 25bdf2cf |
| diffutils | wasm32 | built | 85e7d2a9 |
| dinit | wasm32 | built | 177bfb90 |
| fbdoom | wasm32 | built | a61114ca |
| file | wasm32 | built | 09380c0b |
| findutils | wasm32 | built | 4a04839e |
| gawk | wasm32 | built | 05a3ab3f |
| git | wasm32 | built | 56ff3964 |
| grep | wasm32 | built | eb3c0049 |
| gzip | wasm32 | built | 9d578800 |
| kandelo-sdk | wasm32 | built | fe4bd1c9 |
| kernel | wasm32 | built | 355953e0 |
| less | wasm32 | built | 4dbb52f7 |
| lsof | wasm32 | built | c8a88920 |
| m4 | wasm32 | built | 2910bb31 |
| make | wasm32 | built | ccf6bc63 |
| mariadb | wasm32 | built | 518c5c54 |
| mariadb | wasm64 | built | 4fa41b94 |
| modeset | wasm32 | built | b8d78740 |
| msmtpd | wasm32 | built | 9ca2c667 |
| nano | wasm32 | built | ce3f0ed8 |
| ncurses | wasm32 | built | e5a0410b |
| netcat | wasm32 | built | 0994f5e6 |
| nginx | wasm32 | built | 7882e5a9 |
| php | wasm32 | built | 8d635623 |
| posix-utils-lite | wasm32 | built | 4ce25d4e |
| ruby | wasm32 | built | f70a1eea |
| sed | wasm32 | built | 80aa0020 |
| tar | wasm32 | built | dbcd5b7a |
| tcl | wasm32 | built | 55f6bfc5 |
| unzip | wasm32 | built | 7102a849 |
| userspace | wasm32 | built | 126d9bdd |
| vim | wasm32 | built | d53d836a |
| wget | wasm32 | built | b2ec19ac |
| xz | wasm32 | built | 41ce04bc |
| zip | wasm32 | built | f69e2537 |
| zstd | wasm32 | built | d8e76ecf |
| bash | wasm32 | built | 7b9da8e5 |
| mariadb-test | wasm32 | built | 8645154d |
| mariadb-vfs | wasm32 | built | c199b6fb |
| mariadb-vfs | wasm64 | built | 2954778b |
| nethack | wasm32 | built | dd04c9c8 |
| vim-browser-bundle | wasm32 | built | 2c34f0fd |
| nethack-browser-bundle | wasm32 | built | 3e635d0c |
| rootfs | wasm32 | built | 8e7ae770 |
| shell | wasm32 | built | 6b23d674 |
| lamp | wasm32 | built | 04258e42 |
| node-vfs | wasm32 | built | 07e99d2c |
| wordpress | wasm32 | built | bd6dfe9d |
Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.
62e6252 to
f3c2c58
Compare
Homebrew Sharutils exact consumer validationI reproduced this PR's failure mode and fix against the identical linked, pre-instrumentation GNU Sharutils 4.15.2 Input:
Pre-fix instrumenter:
Exact PR head
This independently confirms the randomized nested-region allocation cause and the canonical-order fix on a real Homebrew consumer. Sharutils bottle publication will remain gated on this PR and a post-merge rebuild. No ABI change is implicated by this evidence. |
|
Recording the pre-rewrite head before focusing this PR: |
f3c2c58 to
14848c0
Compare
The deterministic region ordering already landed through #907, but its in-process regression does not vary Rust HashMap random state. Run the CLI in twelve fresh processes against an alternating-type nested-region fixture and compare the emitted bytes. Document the cross-process byte-reproducibility contract and update the fork-instrumentation reference to the current ABI 39. This adds no ABI or package-artifact change. Validation: the full fork-instrument suite passed 187 tests; the focused fresh-process test passed; and the ABI snapshot check passed through scripts/dev-shell.sh.
14848c0 to
ce70dc0
Compare
|
Closing this focused source PR because #934 now carries the unique fresh-process fork-output reproducibility fixture and current ABI-39 documentation at exact green head |
Why
#907 already landed the production fix that sorts fork-instrumentation regions before assigning synthetic locals and instruction IDs. That makes the output deterministic, but the existing regression repeats the transform inside one process and does not vary Rust's randomized hash-map state.
This PR keeps the remaining test and documentation work:
wasm-fork-instrumenttwelve times in fresh processes and compare every output byte;Removed from the old branch
fix/teardown-reclaim-readiness(Make teardown reclamation CI wait for a blocked worker #889) ancestry;The rewritten branch is one commit directly on current
main. Its pre-rewrite head wasf3c2c587c65ed7ed15507697efc2b381acd1a2d4.ABI and packages
This adds a test, a WAT fixture, and documentation only. It does not change the fork format, Wasm exports, host/kernel ABI,
ABI_VERSION, ABI snapshot, package inputs, package revisions, or built package bytes.Validation
Passed through
scripts/dev-shell.sh:bash scripts/ci-run-test-suite.sh fork-instrument— 187 tests passed;bash scripts/check-abi-version.sh— snapshot, C header, TypeScript bindings, and ABI version are consistent;git diff --check.Not run because this has no runtime, browser, libc, POSIX, VFS, or package-artifact changes:
./run.sh browser;cargo fmt --checkwas attempted through the dev shell, but that shell does not currently providecargo-fmt. The new Rust test follows the existing test style and compiled in both fork-instrument runs above.