You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
auto-opt: ext-zlib provider link failure on cold object cache (undefined js_zlib_deflate_raw_sync + panic_unwind symbols) #6847
Undefined symbols for architecture arm64:
"__RNvCs4SDFJOLwvtW_7___rustc17___rust_drop_panic", referenced from:
panic_unwind ... in __libperry_ext_zlib.a_nosharedeps.lib_trimmed.lib
"_js_zlib_deflate_raw_sync", referenced from: _main
The auto-optimize pipeline pairs the ext-zlib provider archive with an auto-opt stdlib rebuild that lacks the zlib native symbols, and the provider archive carries panic_unwind runtime objects the panic=abort link cannot satisfy. PERRY_NO_AUTO_OPTIMIZE=1 compiles and links the same test fine.
Why this went unnoticed: the compile-object cache under /private/tmp/node_modules/.cache/perry held pre-breakage objects with the old routing baked in; any machine with a warm cache (dev boxes, CI with restored caches) sails past the broken codegen path. A reboot (cleared /tmp) exposed it — six gap tests now compile_fail cold: test_gap_zlib_4917_level, test_gap_zlib_3285_params, test_gap_zlib_fs_assert_2935_2752_2971, test_gap_3662_node_argvalidation, test_gap_constants_tail_3683plus, test_gap_handle_band_object_ops.
Related fragility worth fixing while in here: the compile-object cache living under /private/tmp makes every reboot a cold start and couples cache identity to a world-writable path.
Verified against current with a fresh object cache and a genuinely cold profile rebuild: rebuilt runtime/stdlib, linked, wrote the executable, and ran successfully. PR #7021 fixed the zlib surface plus the panic-runtime dedup holes that caused this report. Closing as resolved.
Reopening for macOS: #7599's audit of known_failures.json caught this reproducing — test_gap_zlib_4917_level fails 3/3 on macOS with the exact original signature (Undefined symbols: _js_zlib_deflate_raw_sync, _js_zlib_inflate_raw_sync) while its zlib siblings pass and Linux passes it. The entry is now platform-scoped macos in known_failures.json rather than unscoped, so it no longer suppresses the passing Linux run. The fix that closed this issue evidently did not cover the macOS link path.
Re-tested the cold-cache reproduction on main @ db44b31b7. The link failure no longer happens, and the remaining half — the auto-optimize rebuild itself failing — is fixed by the open PR #7772.
The reported failure does not reproduce
Full cold start, exactly as this issue specifies (rm -rf target/perry-auto-* — 872 MB + 417 MB of state removed — plus /private/tmp/node_modules/.cache/perry and the local object cache):
perry test-files/test_gap_zlib_4917_level.ts -o /tmp/zl2
→ exit 0, binary written, and it RUNS:
deflateRawSync level1 >= level9: true
deflateRawSync levels differ: true
deflateRawSync roundtrip l1: true
No undefined _js_zlib_deflate_raw_sync, no panic_unwind symbols. What saves it is a fallback that now exists on the auto-optimize path:
auto-optimize: cargo build failed (exit status: 101), using prebuilt libraries. The prebuilt archives may lack the feature-gated js_* entrypoints this compile routed to ext crates; if the link fails with undefined symbols, fix the cargo error above …
So the pipeline no longer hands the linker a half-built pair — it declines and uses the prebuilt archives, which link.
The underlying cause, still live on main
That fallback is firing because perry-stdlib does not compile under the feature set auto-optimize selects (panic=abort, features=async-runtime,external-zlib-pump):
error[E0433]: cannot find `events` in `crate`
--> crates/perry-stdlib/src/common/dispatch/init.rs:668:57
perry_runtime::js_set_native_events_dispatch(crate::events::js_events_native_dispatch);
note: found an item that was configured out — gated behind the `bundled-events` feature
Reproduced directly: cargo check -p perry-stdlib --no-default-features --features async-runtime,external-zlib-pump fails on main with that one error, and is clean on #7772's branch, which adds the missing #[cfg(feature = "bundled-events")] to exactly that line. That PR is open for #7764 and closes this half too.
So this issue is resolved by two independent changes
the prebuilt-archive fallback (already on main) means a broken rebuild can no longer produce an undefined-symbol link;
Leaving open until #7772 merges, since without it every auto-optimize build on this configuration silently ships the un-optimized prebuilt archives — correct, but not what the pipeline is for, and the only signal is one warning line.
The secondary point in the issue body still stands and is untouched: the object cache under /private/tmp makes every reboot a cold start and couples cache identity to a world-writable path. Worth its own issue if it is to be fixed.
Validated on current origin/main at 8260a9e from a fresh worktree.
The condition called out in the last investigation is now satisfied: #7772 merged as 021c721 and that commit is an ancestor of origin/main. The exact auto-opt stdlib configuration that previously failed now succeeds:
The prior cold-cache macOS retest already established that the reported undefined js_zlib_deflate_raw_sync / js_zlib_inflate_raw_sync and panic_unwind link failure no longer reproduces; #7772 fixes the remaining stripped-feature rebuild failure instead of relying on the prebuilt-library fallback. Its auto-opt-app-patterns check also passed.
I attempted an additional cold-cache compile on this Windows host, but this particular fixture is stopped before linking by the separately tracked #7354 WinEH/RS4GC try/catch guard, so it provides no contrary signal about the macOS linker path.
Closing as completed. The separate /private/tmp cache-location concern remains out of scope for this linker defect and can be tracked independently.
Activity
test: triage six cold-cache auto-opt compile failures against #6847
perf(runtime): #6812 — object-owned overflow storage (spill buffer) r…
proggeramlug commentedon Jul 30, 2026
Verified against current with a fresh object cache and a genuinely cold profile rebuild: rebuilt runtime/stdlib, linked, wrote the executable, and ran successfully. PR #7021 fixed the zlib surface plus the panic-runtime dedup holes that caused this report. Closing as resolved.
test(parity): retire the 28 stale known_failures entries the ratchet …
test(parity): keep test_gap_zlib_4917_level, scoped to macOS — #6847 …
docs(changelog): record the audit result and the macOS #6847 reproduc…
test(parity): retire the 28 stale known_failures entries the ratchet …
test(parity): keep test_gap_zlib_4917_level, scoped to macOS — #6847 …
docs(changelog): record the audit result and the macOS #6847 reproduc…
test(parity): make known_failures.json a ratchet, not a suppression l…
proggeramlug commentedon Aug 7, 2026
Reopening for macOS: #7599's audit of known_failures.json caught this reproducing —
test_gap_zlib_4917_levelfails 3/3 on macOS with the exact original signature (Undefined symbols: _js_zlib_deflate_raw_sync, _js_zlib_inflate_raw_sync) while its zlib siblings pass and Linux passes it. The entry is now platform-scopedmacosin known_failures.json rather than unscoped, so it no longer suppresses the passing Linux run. The fix that closed this issue evidently did not cover the macOS link path.proggeramlug commentedon Aug 10, 2026
Re-tested the cold-cache reproduction on
main@db44b31b7. The link failure no longer happens, and the remaining half — the auto-optimize rebuild itself failing — is fixed by the open PR #7772.The reported failure does not reproduce
Full cold start, exactly as this issue specifies (
rm -rf target/perry-auto-*— 872 MB + 417 MB of state removed — plus/private/tmp/node_modules/.cache/perryand the local object cache):No undefined
_js_zlib_deflate_raw_sync, nopanic_unwindsymbols. What saves it is a fallback that now exists on the auto-optimize path:So the pipeline no longer hands the linker a half-built pair — it declines and uses the prebuilt archives, which link.
The underlying cause, still live on
mainThat fallback is firing because
perry-stdlibdoes not compile under the feature set auto-optimize selects (panic=abort, features=async-runtime,external-zlib-pump):Reproduced directly:
cargo check -p perry-stdlib --no-default-features --features async-runtime,external-zlib-pumpfails onmainwith that one error, and is clean on #7772's branch, which adds the missing#[cfg(feature = "bundled-events")]to exactly that line. That PR is open for #7764 and closes this half too.So this issue is resolved by two independent changes
main) means a broken rebuild can no longer produce an undefined-symbol link;Leaving open until #7772 merges, since without it every auto-optimize build on this configuration silently ships the un-optimized prebuilt archives — correct, but not what the pipeline is for, and the only signal is one warning line.
The secondary point in the issue body still stands and is untouched: the object cache under
/private/tmpmakes every reboot a cold start and couples cache identity to a world-writable path. Worth its own issue if it is to be fixed.proggeramlug commentedon Aug 12, 2026
Validated on current origin/main at 8260a9e from a fresh worktree.
The condition called out in the last investigation is now satisfied: #7772 merged as 021c721 and that commit is an ancestor of origin/main. The exact auto-opt stdlib configuration that previously failed now succeeds:
The prior cold-cache macOS retest already established that the reported undefined js_zlib_deflate_raw_sync / js_zlib_inflate_raw_sync and panic_unwind link failure no longer reproduces; #7772 fixes the remaining stripped-feature rebuild failure instead of relying on the prebuilt-library fallback. Its auto-opt-app-patterns check also passed.
I attempted an additional cold-cache compile on this Windows host, but this particular fixture is stopped before linking by the separately tracked #7354 WinEH/RS4GC try/catch guard, so it provides no contrary signal about the macOS linker path.
Closing as completed. The separate /private/tmp cache-location concern remains out of scope for this linker defect and can be tracked independently.