Skip to content

CI: build the wasm binding without wasi-sdk - #54

Merged
Mnwa merged 1 commit into
mainfrom
ci/drop-wasi-sdk
Nov 27, 2026
Merged

Mnwa merged 1 commit into
mainfrom
ci/drop-wasi-sdk

Conversation

@Mnwa

@Mnwa Mnwa commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Fixes the Test (wasm32-wasip1-threads fallback) hang that started with the deps refresh in 03ee2a9 and blocks the release PR #52.

Cause

Since rustc 1.100.0 (2026-11-09), the wasm binding built with WASI_SDK_PATH pointing at wasi-sdk-29 never finishes loading. The last green run (Nov 4) was built with rustc 1.99.1 and the same SDK.

The debug PR #53 traced it on the runner:

  • The main thread spins at 100% CPU right after the runtime modules load, before any Worker exists, and prints nothing at all.
  • gdb samples of the frame-pointer chain, named through V8's perf map with an unstripped wasm, all land in wasi-libc's __pthread_key_delete. Its do td->tsd[k] = 0; while ((td = td->next) != self); loop never ends when the main thread's entry was never linked into the thread list.

With WASI_SDK_PATH set, napi build links the SDK's wasi-libc. Without it, the module links Rust's self-contained wasi-libc, which calls __init_tp before that delete. That's why the same rustc passes locally.

Change

  • Drop the wasi-sdk install from ci.yml and from the wasm row of release.yml. Nothing in the wasm build compiles C any more: zstd-sys is a dev-dependency only, so the old "clang for zstd-sys" reason is gone.
  • Give the wasm CI job timeout-minutes: 30, its smoke step timeout-minutes: 5, and the release smoke test timeout 300, so a hang fails fast instead of holding a runner for 6 h.

Verification

On #53, the same Linux runner without wasi-sdk passes the smoke test in about 1 s and the whole wasm test suite.

🤖 Generated with Claude Code

Since rustc 1.100 the wasm32-wasip1-threads binding built with
WASI_SDK_PATH pointing at wasi-sdk-29 never finishes loading: its main
thread spins at 100% CPU in wasi-libc's __pthread_key_delete during module
init, walking a thread list whose main-thread entry was never linked, before
any Worker starts. rustc 1.99.1 with the same SDK was fine. With
WASI_SDK_PATH set, napi build links the SDK's wasi-libc; without it the
module links Rust's self-contained wasi-libc and loads normally.

Nothing in the wasm build compiles C any more (zstd-sys is a dev-dependency
only), so drop the SDK from both CI and the release build. Bound the wasm
job and both smoke tests so a hang fails fast instead of holding a runner
for six hours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Mnwa
Mnwa merged commit 2876cb8 into main Nov 27, 2026
7 checks passed
@Mnwa
Mnwa deleted the ci/drop-wasi-sdk branch November 27, 2026 10:33
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.

1 participant