Skip to content

Panic on windows using Rust 1.84 #507

Description

@cceckman-at-fastly

We're a little stuck at the moment:

  • cargo publish requires an up-to-date lockfile. (--locked means "the lockfile is already supposed to be up to date", not "don't change it".)
  • Updating the lockfile upgrades spdx, a transitive dependency
  • The new spdx version 0.10.9 requires Rust >= 1.85 for edition2024
  • Running tests on Windows with Rust 1.85 errors: see here

So... we need to get past Rust 1.85 somehow before we can cut a new release.

Activity

  1. cceckman-at-fastly commented on Aug 11, 2025

    @cceckman-at-fastly
    ContributorAuthor

    From here, the trap-test:

    running 2 tests
    
    thread 'tokio-runtime-worker' panicked at library\core\src\panicking.rs:218:5:
    panic in a function that cannot unwind
    stack backtrace:
       0: std::panicking::begin_panic_handler
                 at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library\std\src\panicking.rs:692
       1: core::panicking::panic_nounwind_fmt
                 at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library\core\src\intrinsics\mod.rs:3869
       2: core::panicking::panic_nounwind
                 at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library\core\src\panicking.rs:218
       3: core::panicking::panic_cannot_unwind
                 at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library\core\src\panicking.rs:307
       4: enum2$<wasmtime::runtime::func::HostContext>::array_call_trampoline<viceroy_lib::linking::WasmCtx,wasmtime::runtime::func::impl$56::into_func::closure_env$0<viceroy_lib::linking::WasmCtx,viceroy_lib::wiggle_abi::fastly_http_resp::add_to_linker::closure_env
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\func.rs:2225
       5: _CxxFrameHandler3
       6: is_exception_typeof
       7: _C_specific_handler
       8: is_exception_typeof
       9: _CxxFrameHandler3
      10: _chkstk
      11: RtlUnwindEx
      12: RtlUnwind
      13: _report_gsfailure
      14: wasmtime_longjmp_25_0_3
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\vm\helpers.c:77
      15: wasmtime::runtime::vm::traphandlers::call_thread_state::CallThreadState::unwind_with
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\vm\traphandlers.rs:439
      16: wasmtime::runtime::vm::traphandlers::raise_trap::closure$0
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\vm\traphandlers.rs:97
      17: wasmtime::runtime::vm::traphandlers::tls::with<never$,wasmtime::runtime::vm::traphandlers::raise_trap::closure_env$0>
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\vm\traphandlers.rs:785
      18: wasmtime::runtime::vm::traphandlers::raise_trap
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\vm\traphandlers.rs:97
      19: wasmtime::runtime::vm::traphandlers::raise_user_trap
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\vm\traphandlers.rs:112
      20: wasmtime::runtime::trap::raise
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\trap.rs:77
      21: enum2$<wasmtime::runtime::func::HostContext>::array_call_trampoline<viceroy_lib::linking::WasmCtx,wasmtime::runtime::func::impl$56::into_func::closure_env$0<viceroy_lib::linking::WasmCtx,viceroy_lib::wiggle_abi::fastly_http_resp::add_to_linker::closure_env
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\func.rs:2297
      22: <unknown>
      23: <unknown>
      24: <unknown>
      25: <unknown>
      26: <unknown>
      27: <unknown>
      28: <unknown>
      29: <unknown>
      30: <unknown>
      31: <unknown>
      32: <unknown>
      33: <unknown>
      34: <unknown>
      35: <unknown>
      36: <unknown>
      37: <unknown>
      38: <unknown>
      39: <unknown>
      40: <unknown>
      41: <unknown>
      42: <unknown>
      43: <unknown>
      44: <unknown>
      45: <unknown>
      46: wasmtime::runtime::func::typed::impl$1::call_raw::closure$0<tuple$<>,tuple$<>,viceroy_lib::linking::WasmCtx>
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\func\typed.rs:217
      47: wasmtime::runtime::vm::traphandlers::catch_traps::call_closure<wasmtime::runtime::func::typed::impl$1::call_raw::closure_env$0<tuple$<>,tuple$<>,viceroy_lib::linking::WasmCtx> >
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\vm\traphandlers.rs:282
      48: wasmtime_setjmp_25_0_3
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\vm\helpers.c:71
      49: wasmtime::runtime::vm::traphandlers::catch_traps::closure$1<wasmtime::runtime::func::typed::impl$1::call_raw::closure_env$0<tuple$<>,tuple$<>,viceroy_lib::linking::WasmCtx> >
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\vm\traphandlers.rs:259
      50: wasmtime::runtime::vm::traphandlers::impl$3::with::closure$0<wasmtime::runtime::vm::traphandlers::catch_traps::closure_env$1<wasmtime::runtime::func::typed::impl$1::call_raw::closure_env$0<tuple$<>,tuple$<>,viceroy_lib::linking::WasmCtx> > >
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\vm\traphandlers.rs:402
      51: wasmtime::runtime::vm::traphandlers::tls::set<i32,wasmtime::runtime::vm::traphandlers::impl$3::with::closure_env$0<wasmtime::runtime::vm::traphandlers::catch_traps::closure_env$1<wasmtime::runtime::func::typed::impl$1::call_raw::closure_env$0<tuple$<>,tupl
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\vm\traphandlers.rs:778
      52: wasmtime::runtime::vm::traphandlers::call_thread_state::CallThreadState::with<wasmtime::runtime::vm::traphandlers::catch_traps::closure_env$1<wasmtime::runtime::func::typed::impl$1::call_raw::closure_env$0<tuple$<>,tuple$<>,viceroy_lib::linking::WasmCtx> >
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\vm\traphandlers.rs:402
      53: wasmtime::runtime::vm::traphandlers::catch_traps<wasmtime::runtime::func::typed::impl$1::call_raw::closure_env$0<tuple$<>,tuple$<>,viceroy_lib::linking::WasmCtx> >
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\vm\traphandlers.rs:257
      54: wasmtime::runtime::func::invoke_wasm_and_catch_traps<viceroy_lib::linking::WasmCtx,wasmtime::runtime::func::typed::impl$1::call_raw::closure_env$0<tuple$<>,tuple$<>,viceroy_lib::linking::WasmCtx> >
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\func.rs:1601
      55: wasmtime::runtime::func::typed::TypedFunc<tuple$<>,tuple$<> >::call_raw<tuple$<>,tuple$<>,viceroy_lib::linking::WasmCtx>
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\func\typed.rs:214
      56: wasmtime::runtime::func::typed::impl$1::call_async::async_fn$0::closure$0<tuple$<>,tuple$<>,viceroy_lib::linking::WasmCtx,ref_mut$<wasmtime::runtime::store::Store<viceroy_lib::linking::WasmCtx> > >
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\func\typed.rs:147
      57: wasmtime::runtime::store::impl$14::on_fiber::async_fn$0::closure$0<viceroy_lib::linking::WasmCtx,enum2$<core::result::Result<tuple$<>,anyhow::Error> >,wasmtime::runtime::func::typed::impl$1::call_async::async_fn$0::closure_env$0<tuple$<>,tuple$<>,viceroy_l
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-25.0.3\src\runtime\store.rs:2107
      58: wasmtime_fiber::impl$2::execute::closure$0<enum2$<core::result::Result<tuple$<>,anyhow::Error> >,tuple$<>,enum2$<core::result::Result<tuple$<>,anyhow::Error> >,wasmtime::runtime::store::impl$14::on_fiber::async_fn$0::closure_env$0<viceroy_lib::linking::Was
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-fiber-25.0.3\src\lib.rs:201
      59: core::panic::unwind_safe::impl$25::call_once<enum2$<core::result::Result<tuple$<>,anyhow::Error> >,wasmtime_fiber::impl$2::execute::closure_env$0<enum2$<core::result::Result<tuple$<>,anyhow::Error> >,tuple$<>,enum2$<core::result::Result<tuple$<>,anyhow::Er
                 at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181\library\core\src\panic\unwind_safe.rs:272
      60: std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<wasmtime_fiber::impl$2::execute::closure_env$0<enum2$<core::result::Result<tuple$<>,anyhow::Error> >,tuple$<>,enum2$<core::result::Result<tuple$<>,anyhow::Error> >,wasmtime::runtime::s
                 at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181\library\std\src\panicking.rs:584
      61: std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<wasmtime::runtime::component::func::host::call_host_and_handle_result::closure_env$0<viceroy_lib::linking::ComponentCtx,wasmtime::runtime::component::func::host::impl$0::entrypoint::closur
      62: std::panicking::try
                 at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181\library\std\src\panicking.rs:547
      63: std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<wasmtime_fiber::impl$2::execute::closure_env$0<enum2$<core::result::Result<tuple$<>,anyhow::Error> >,tuple$<>,enum2$<core::result::Result<tuple$<>,anyhow::Error> >,wasmtime::runtime::store
                 at /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181\library\std\src\panic.rs:358
      64: wasmtime_fiber::Suspend<enum2$<core::result::Result<tuple$<>,anyhow::Error> >,tuple$<>,enum2$<core::result::Result<tuple$<>,anyhow::Error> > >::execute<enum2$<core::result::Result<tuple$<>,anyhow::Error> >,tuple$<>,enum2$<core::result::Result<tuple$<>,anyh
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-fiber-25.0.3\src\lib.rs:201
      65: wasmtime_fiber::windows::fiber_start<wasmtime::runtime::store::impl$14::on_fiber::async_fn$0::closure_env$0<viceroy_lib::linking::WasmCtx,enum2$<core::result::Result<tuple$<>,anyhow::Error> >,wasmtime::runtime::func::typed::impl$1::call_async::async_fn$0::
                 at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\wasmtime-fiber-25.0.3\src\windows.rs:77
      66: QueryInterruptTimePrecise
      67: RtlUserFiberStart
    
  2. changed the title [-]Panic on windows using Rust 1.85[/-] [+]Panic on windows using Rust 1.84[/+] on Aug 11, 2025
  3. cceckman-at-fastly commented on Aug 11, 2025

    @cceckman-at-fastly
    ContributorAuthor

    With some digging- looks like others experienced this too, with this as the change in 1.83/1.84, up to this

    And I see some recent discussion about whether C-unwind should show up in more places in wasmtime...

  4. cceckman-at-fastly commented on Aug 12, 2025

    @cceckman-at-fastly
    ContributorAuthor

    If we could use resolver = 3 with Rust 1.83, we'd be set, because we could keep spdx at its lower version and deploy the new version of our crate. But it's not finalized in 1.83, and 1.84 has the unwinding change that appears to break things.

  5. cceckman-at-fastly commented on Aug 13, 2025

    @cceckman-at-fastly
    ContributorAuthor

    Fixed by #512

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions