Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GC] assertion left != right failed: 0x110 is supposedly live; should have nonzero ref count #10182

Open
vouillon opened this issue Feb 4, 2025 · 2 comments
Assignees
Labels
bug Incorrect behavior in the current implementation that needs fixing wasm-proposal:gc Issues with the implementation of the gc wasm proposal

Comments

@vouillon
Copy link

vouillon commented Feb 4, 2025

Test Case

localfunction.zip

Steps to Reproduce

Run the following command:

./target/debug/wasmtime  -W=all-proposals=y localfunction.wasm

Expected Results

This works fine if one add the -C collector=null option:

$ ./target/debug/wasmtime -C collector=null  -W=all-proposals=y localfunction.wasm
5840

Actual Results

We get a panic:

thread 'main' panicked at crates/wasmtime/src/runtime/vm/gc/enabled/drc.rs:142:9:
assertion `left != right` failed: 0x110 is supposedly live; should have nonzero ref count
  left: 0
 right: 0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at crates/wasmtime/src/runtime/vm/gc/enabled/drc.rs:167:9:
assertion `left != right` failed: 0x110 is supposedly live; should have nonzero ref count
  left: 0
 right: 0
stack backtrace:
   0:     0x5a63fb6a476a - std::backtrace_rs::backtrace::libunwind::trace::h5a5b8284f2d0c266
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
   1:     0x5a63fb6a476a - std::backtrace_rs::backtrace::trace_unsynchronized::h76d4f1c9b0b875e3
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x5a63fb6a476a - std::sys::backtrace::_print_fmt::hc4546b8364a537c6
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/sys/backtrace.rs:66:9
   3:     0x5a63fb6a476a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h5b6bd5631a6d1f6b
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/sys/backtrace.rs:39:26
   4:     0x5a63fb6ce503 - core::fmt::rt::Argument::fmt::h270f6602a2b96f62
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/fmt/rt.rs:177:76
   5:     0x5a63fb6ce503 - core::fmt::write::h7550c97b06c86515
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/fmt/mod.rs:1186:21
   6:     0x5a63fb69ffc3 - std::io::Write::write_fmt::h7b09c64fe0be9c84
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/io/mod.rs:1839:15
   7:     0x5a63fb6a45b2 - std::sys::backtrace::BacktraceLock::print::h2395ccd2c84ba3aa
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/sys/backtrace.rs:42:9
   8:     0x5a63fb6a569c - std::panicking::default_hook::{{closure}}::he19d4c7230e07961
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:268:22
   9:     0x5a63fb6a54e2 - std::panicking::default_hook::hf614597d3c67bbdb
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:295:9
  10:     0x5a63fb6a5c77 - std::panicking::rust_panic_with_hook::h8942133a8b252070
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:801:13
  11:     0x5a63fb6a5b0a - std::panicking::begin_panic_handler::{{closure}}::hb5f5963570096b29
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:674:13
  12:     0x5a63fb6a4c49 - std::sys::backtrace::__rust_end_short_backtrace::h6208cedc1922feda
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/sys/backtrace.rs:170:18
  13:     0x5a63fb6a579c - rust_begin_unwind
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:665:5
  14:     0x5a63f7799390 - core::panicking::panic_fmt::h0c3082644d1bf418
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panicking.rs:74:14
  15:     0x5a63f77997f5 - core::panicking::assert_failed_inner::h2ddf1fcc067fa858
  16:     0x5a63f77989e3 - core::panicking::assert_failed::he996b0f85b093fc8
  17:     0x5a63f9a20bab - wasmtime::runtime::vm::gc::enabled::drc::DrcHeap::dec_ref::hedee28eb8908882f
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/gc/enabled/drc.rs:167:9
  18:     0x5a63f9a21054 - wasmtime::runtime::vm::gc::enabled::drc::DrcHeap::dec_ref_and_maybe_dealloc::h1e7fa8dbf0f76afe
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/gc/enabled/drc.rs:191:12
  19:     0x5a63f9a22844 - <wasmtime::runtime::vm::gc::enabled::drc::DrcHeap as wasmtime::runtime::vm::gc::gc_runtime::GcHeap>::write_gc_ref::h907c2f5b9fd965de
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/gc/enabled/drc.rs:503:13
  20:     0x5a63f9aa19cf - wasmtime::runtime::vm::gc::gc_runtime::GcHeap::drop_gc_ref::h3fd8951c49276ad4
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/gc/gc_runtime.rs:135:9
  21:     0x5a63f9af0025 - wasmtime::runtime::vm::gc::GcStore::drop_gc_ref::h83ca711fdd26510d
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/gc.rs:132:13
  22:     0x5a63f98183c5 - wasmtime::runtime::gc::enabled::rooting::RootSet::exit_lifo_scope_slow::hc31f21972eab0174
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/gc/enabled/rooting.rs:443:17
  23:     0x5a63f9818135 - wasmtime::runtime::gc::enabled::rooting::RootSet::exit_lifo_scope::hb268344dded0d6a3
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/gc/enabled/rooting.rs:422:13
  24:     0x5a63f97cee70 - wasmtime::runtime::store::StoreOpaque::exit_gc_lifo_scope::h44bd36e830734cde
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/store.rs:1492:9
  25:     0x5a63f9a6d725 - <wasmtime::runtime::gc::enabled::rooting::OpaqueRootScope<S> as core::ops::drop::Drop>::drop::ha14dd9b0aeec651d
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/gc/enabled/rooting.rs:1247:9
  26:     0x5a63f9a4df0b - core::ptr::drop_in_place<wasmtime::runtime::gc::enabled::rooting::OpaqueRootScope<&mut wasmtime::runtime::store::StoreOpaque>>::h59a509a3e5e5c5f8
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/ptr/mod.rs:574:1
  27:     0x5a63f9b49968 - wasmtime::runtime::vm::libcalls::array_copy::h31ca675977d4cf37
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/libcalls.rs:1000:1
  28:     0x5a63f97d10f8 - wasmtime::runtime::vm::libcalls::raw::array_copy::{{closure}}::{{closure}}::he609ade1bf0fe50d
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/libcalls.rs:122:33
  29:     0x5a63f98d1d1f - wasmtime::runtime::vm::instance::InstanceAndStore::from_vmctx::h70b7552243828ec3
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/instance.rs:124:9
  30:     0x5a63f97d1082 - wasmtime::runtime::vm::libcalls::raw::array_copy::{{closure}}::h069e468a9f8d43bc
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/libcalls.rs:120:29
  31:     0x5a63f9b186d9 - <core::result::Result<T,E> as wasmtime::runtime::vm::traphandlers::HostResult>::maybe_catch_unwind::{{closure}}::h7870e327860e3570
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/traphandlers.rs:213:31
  32:     0x5a63f973efcd - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h97e8c5250be12328
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panic/unwind_safe.rs:272:9
  33:     0x5a63f9b2dd1d - std::panicking::try::do_call::h6ddcfddda81ba7e9
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:557:40
  34:     0x5a63f984e37b - __rust_try
  35:     0x5a63f984d449 - std::panicking::try::h359f8a567d0cf151
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:520:19
  36:     0x5a63f984d449 - std::panic::catch_unwind::haf37da711ec3695b
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panic.rs:358:14
  37:     0x5a63f99db9a4 - <core::result::Result<T,E> as wasmtime::runtime::vm::traphandlers::HostResult>::maybe_catch_unwind::h70a996b0428a25ac
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/traphandlers.rs:222:19
  38:     0x5a63f9b0ef3d - wasmtime::runtime::vm::traphandlers::catch_unwind_and_record_trap::h153a9f7f708e7bb2
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/traphandlers.rs:117:25
  39:     0x5a63f97baa09 - wasmtime::runtime::vm::libcalls::raw::array_copy::hcd61143763fafd13
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/libcalls.rs:119:25
  40:     0x706e77362029 - <unknown>
  41:     0x706e77319a4f - <unknown>
  42:     0x706e77326c4a - <unknown>
  43:     0x706e77319ea1 - <unknown>
  44:     0x706e77313381 - <unknown>
  45:     0x706e773127db - <unknown>
  46:     0x706e7735d437 - <unknown>
  47:     0x5a63f977f3b6 - wasmtime::runtime::vm::vmcontext::VMFuncRef::array_call_native::hdea3785bb4610271
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/vmcontext.rs:792:9
  48:     0x5a63f977f1f2 - wasmtime::runtime::vm::vmcontext::VMFuncRef::array_call::ha55c8ae49afd506e
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/vmcontext.rs:753:21
  49:     0x5a63f7d9cbfc - wasmtime::runtime::func::Func::call_unchecked_raw::{{closure}}::h88a03ffbbb134962
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/func.rs:1073:13
  50:     0x5a63f8841905 - wasmtime::runtime::vm::traphandlers::catch_traps::{{closure}}::call_closure::h50ce0da9b682a048
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/traphandlers.rs:390:30
  51:     0x5a63f9b1c11a - wasmtime_setjmp_30_0_0
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/helpers.c:72:10
  52:     0x5a63f8842129 - wasmtime::runtime::vm::traphandlers::catch_traps::{{closure}}::ha6fb0a64699388c2
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/traphandlers.rs:383:32
  53:     0x5a63f88a360e - wasmtime::runtime::vm::traphandlers::<impl wasmtime::runtime::vm::traphandlers::call_thread_state::CallThreadState>::with::{{closure}}::h00254d3f0b0c571d
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/traphandlers.rs:553:50
  54:     0x5a63f876d12c - wasmtime::runtime::vm::traphandlers::tls::set::h1cf58d7c3446d0df
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/traphandlers.rs:970:13
  55:     0x5a63f8665c9b - wasmtime::runtime::vm::traphandlers::<impl wasmtime::runtime::vm::traphandlers::call_thread_state::CallThreadState>::with::h787565d25f149112
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/traphandlers.rs:553:25
  56:     0x5a63f883f198 - wasmtime::runtime::vm::traphandlers::catch_traps::h1a4c62543be84e60
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/vm/traphandlers.rs:365:18
  57:     0x5a63f7d99000 - wasmtime::runtime::func::invoke_wasm_and_catch_traps::h697dc02191f17259
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/func.rs:1607:22
  58:     0x5a63f7d9caa8 - wasmtime::runtime::func::Func::call_unchecked_raw::h047b98e422e9e965
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/func.rs:1072:9
  59:     0x5a63f7d9b983 - wasmtime::runtime::func::Func::call_unchecked::hefbd054928b5a174
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/func.rs:1064:9
  60:     0x5a63f7d9bd02 - wasmtime::runtime::func::Func::call_impl_do_call::h59b08bb15808d2af
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/func.rs:1250:13
  61:     0x5a63f7d9b351 - wasmtime::runtime::func::Func::call_async::{{closure}}::{{closure}}::ha1e0aa6a9b35966b
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/func.rs:1159:40
  62:     0x5a63f86d5aa3 - wasmtime::runtime::store::async_::<impl wasmtime::runtime::store::context::StoreContextMut<T>>::on_fiber::{{closure}}::{{closure}}::hb3a4b7b839b41a92
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/store/async_.rs:395:34
  63:     0x5a63f8251d00 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hfa78e18cb51f0dfa
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/alloc/src/boxed.rs:2454:9
  64:     0x5a63f89cdae5 - wasmtime_fiber::Suspend<Resume,Yield,Return>::execute::{{closure}}::h8797b0ed018f185f
                               at /home/jerome/sources/wasmtime/crates/fiber/src/lib.rs:244:66
  65:     0x5a63f87d5019 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h88e204674411056b
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/panic/unwind_safe.rs:272:9
  66:     0x5a63f7a0dc91 - std::panicking::try::do_call::h0793094418008093
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:557:40
  67:     0x5a63f7f9476b - __rust_try
  68:     0x5a63f7f52cb7 - std::panicking::try::hce03d7f03305f4a5
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:520:19
  69:     0x5a63f7f52cb7 - std::panic::catch_unwind::h08c95a8c228673a2
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panic.rs:358:14
  70:     0x5a63f89cd8aa - wasmtime_fiber::Suspend<Resume,Yield,Return>::execute::hf389991feaa1e18e
                               at /home/jerome/sources/wasmtime/crates/fiber/src/lib.rs:244:26
  71:     0x5a63f89e41b8 - wasmtime_fiber::unix::fiber_start::hf9e05070b86c5d41
                               at /home/jerome/sources/wasmtime/crates/fiber/src/unix.rs:217:9
  72:     0x5a63fae46a58 - wasmtime_fiber_start_30_0_0
  73:     0x5a63fae46abc - wasmtime_fiber::unix::asan_disabled::fiber_switch::hb972c99679bb3eb0
                               at /home/jerome/sources/wasmtime/crates/fiber/src/unix.rs:488:9
  74:     0x5a63f9ae76d0 - wasmtime_fiber::unix::Fiber::resume::h71291a4b0c518214
                               at /home/jerome/sources/wasmtime/crates/fiber/src/unix.rs:251:13
  75:     0x5a63f9a1de49 - wasmtime_fiber::Fiber<Resume,Yield,Return>::resume::h3a227158f8ef7f29
                               at /home/jerome/sources/wasmtime/crates/fiber/src/lib.rs:183:9
  76:     0x5a63f974b73a - wasmtime::runtime::store::async_::<impl wasmtime::runtime::store::context::StoreContextMut<T>>::on_fiber::{{closure}}::FiberFuture::resume::h9d7703ef321355a3
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/store/async_.rs:520:28
  77:     0x5a63f974b9d7 - <wasmtime::runtime::store::async_::<impl wasmtime::runtime::store::context::StoreContextMut<T>>::on_fiber::{{closure}}::FiberFuture as core::future::future::Future>::poll::h5c4302a5c922ba27
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/store/async_.rs:578:27
  78:     0x5a63f86c8559 - <&mut F as core::future::future::Future>::poll::hf9983eef60c0d90c
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/future/future.rs:111:9
  79:     0x5a63f86c9c3d - wasmtime::runtime::store::async_::<impl wasmtime::runtime::store::context::StoreContextMut<T>>::on_fiber::{{closure}}::h1c2f20bb3e99f87a
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/store/async_.rs:410:23
  80:     0x5a63f7d9b0db - wasmtime::runtime::func::Func::call_async::{{closure}}::h64cb52e231c06ed2
                               at /home/jerome/sources/wasmtime/crates/wasmtime/src/runtime/func.rs:1160:14
  81:     0x5a63f87321e2 - wasmtime_cli::commands::run::RunCommand::invoke_func::{{closure}}::hbf7bf108424d9ba7
                               at /home/jerome/sources/wasmtime/src/commands/run.rs:542:14
  82:     0x5a63f8730b7b - wasmtime_cli::commands::run::RunCommand::load_main_module::{{closure}}::hca3d653effd9d4c7
                               at /home/jerome/sources/wasmtime/src/commands/run.rs:463:65
  83:     0x5a63f872e0bc - wasmtime_cli::commands::run::RunCommand::execute::{{closure}}::{{closure}}::h1831bca96eef9473
                               at /home/jerome/sources/wasmtime/src/commands/run.rs:222:22
  84:     0x5a63f853bf69 - <tokio::time::timeout::Timeout<T> as core::future::future::Future>::poll::h0b63b49b0cb34b8a
                               at /home/jerome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.30.0/src/time/timeout.rs:202:33
  85:     0x5a63f872d271 - wasmtime_cli::commands::run::RunCommand::execute::{{closure}}::h0e6a45b1bdc897de
                               at /home/jerome/sources/wasmtime/src/commands/run.rs:230:14
  86:     0x5a63f87e07a3 - tokio::runtime::park::CachedParkThread::block_on::{{closure}}::h1ea11bcc08cb3567
                               at /home/jerome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.30.0/src/runtime/park.rs:282:63
  87:     0x5a63f87e0047 - tokio::runtime::coop::with_budget::h88ee66f944a674e7
                               at /home/jerome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.30.0/src/runtime/coop.rs:107:5
  88:     0x5a63f87e0047 - tokio::runtime::coop::budget::h0044023e231d8246
                               at /home/jerome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.30.0/src/runtime/coop.rs:73:5
  89:     0x5a63f87e0047 - tokio::runtime::park::CachedParkThread::block_on::hd7144c755a92c43b
                               at /home/jerome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.30.0/src/runtime/park.rs:282:31
  90:     0x5a63f818bb57 - tokio::runtime::context::blocking::BlockingRegionGuard::block_on::h0d158157ea6ee905
                               at /home/jerome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.30.0/src/runtime/context/blocking.rs:66:9
  91:     0x5a63f7db0b75 - tokio::runtime::scheduler::multi_thread::MultiThread::block_on::{{closure}}::h14e3b364278bf7c5
                               at /home/jerome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.30.0/src/runtime/scheduler/multi_thread/mod.rs:87:13
  92:     0x5a63f879fdcb - tokio::runtime::context::runtime::enter_runtime::h62b68efdf1542d85
                               at /home/jerome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.30.0/src/runtime/context/runtime.rs:65:16
  93:     0x5a63f7db09e0 - tokio::runtime::scheduler::multi_thread::MultiThread::block_on::h67f42a74093be960
                               at /home/jerome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.30.0/src/runtime/scheduler/multi_thread/mod.rs:86:9
  94:     0x5a63f7c8a193 - tokio::runtime::runtime::Runtime::block_on::he39294c9dbd142e4
                               at /home/jerome/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.30.0/src/runtime/runtime.rs:349:45
  95:     0x5a63f7db3a3a - wasmtime_cli::commands::run::RunCommand::execute::h78bb2859f74206be
                               at /home/jerome/sources/wasmtime/src/commands/run.rs:179:22
  96:     0x5a63f779bf73 - wasmtime::Wasmtime::execute::h466f564696f3b5cf
                               at /home/jerome/sources/wasmtime/src/bin/wasmtime.rs:100:35
  97:     0x5a63f779c2ab - wasmtime::main::h194ca1414ba22cb1
                               at /home/jerome/sources/wasmtime/src/bin/wasmtime.rs:158:12
  98:     0x5a63f77a16fb - core::ops::function::FnOnce::call_once::h65c2d1d6cf195453
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/ops/function.rs:250:5
  99:     0x5a63f77a064d - std::sys::backtrace::__rust_begin_short_backtrace::h432c422713a52d83
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/sys/backtrace.rs:154:18
 100:     0x5a63f7799fa1 - std::rt::lang_start::{{closure}}::h25738480edd4d4b7
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/rt.rs:195:18
 101:     0x5a63fb695ede - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hfdb85f4ee94732d3
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/core/src/ops/function.rs:284:13
 102:     0x5a63fb695ede - std::panicking::try::do_call::h6e577310f330cbef
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:557:40
 103:     0x5a63fb695ede - std::panicking::try::ha588d438267d2645
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:520:19
 104:     0x5a63fb695ede - std::panic::catch_unwind::h429fda1e025f26d9
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panic.rs:358:14
 105:     0x5a63fb695ede - std::rt::lang_start_internal::{{closure}}::h7b731265e841c4bf
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/rt.rs:174:48
 106:     0x5a63fb695ede - std::panicking::try::do_call::hc0f6a675b7ae5a36
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:557:40
 107:     0x5a63fb695ede - std::panicking::try::h4c93b7ff0671f1ff
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panicking.rs:520:19
 108:     0x5a63fb695ede - std::panic::catch_unwind::hcc1e154961d16ce6
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/panic.rs:358:14
 109:     0x5a63fb695ede - std::rt::lang_start_internal::h1c66660c99c8424c
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/rt.rs:174:20
 110:     0x5a63f7799f7a - std::rt::lang_start::h886043b2ccf84952
                               at /rustc/90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf/library/std/src/rt.rs:194:17
 111:     0x5a63f779e6de - main
 112:     0x706e7742a3b8 - __libc_start_call_main
                               at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
 113:     0x706e7742a47b - __libc_start_main_impl
                               at ./csu/../csu/libc-start.c:360:3
 114:     0x5a63f7799e75 - _start
 115:                0x0 - <unknown>
thread 'main' panicked at core/src/panicking.rs:229:5:
panic in a destructor during cleanup
thread caused non-unwinding panic. aborting.

Versions and Environment

Wasmtime commit: 0e05600

Operating system: Linux

Architecture: x64

@vouillon vouillon added the bug Incorrect behavior in the current implementation that needs fixing label Feb 4, 2025
@fitzgen fitzgen added the wasm-proposal:gc Issues with the implementation of the gc wasm proposal label Feb 4, 2025
@fitzgen
Copy link
Member

fitzgen commented Feb 4, 2025

Thanks for this bug report as well!

Ditto regarding reducing the test case, if you have time.

@vouillon
Copy link
Author

vouillon commented Feb 6, 2025

This seems to have something to do with array.copy:

(module
 (type $0 (array (mut (ref eq))))
 (type $1 (func))
 (global $global$0 (ref $0) (array.new_fixed $0 1
  (array.new_fixed $0 0)
 ))
 (export "" (func $0))
 (func $0
  (local $0 (ref $0))
  (local.set $0
   (global.get $global$0)
  )
  (array.copy $0 $0
   (local.get $0)
   (i32.const 0)
   (local.get $0)
   (i32.const 0)
   (i32.const 1)
  )
 )
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior in the current implementation that needs fixing wasm-proposal:gc Issues with the implementation of the gc wasm proposal
Projects
None yet
Development

No branches or pull requests

2 participants