Hi!
After upgrading Wasmtime to v41 (from v34), I started getting:
thread 'tokio-runtime-worker' panicked at wasmtime-41.0.3/src/runtime/component/concurrent.rs:4384:9
assertion failed: self.threads.is_empty()
Worth noting that I reuse the store for a short period of time (10-20 calls) to reduce the overhead of instantiating components.
What happens:
TypedFunc::call_async).TaskId::host_future_dropped called.already_lowered_parameters == false), or there is no params.Waitable::Guest(self.task).delete_from(...) called and it asserts that the task has no guest threads (self.threads.is_empty()), and that assertion fails, causing the panic.Reproduce: https://github.com/bmartynov/wasmtime-threads-assert (cargo run)
Thanks for reporting this! Have you tried running the same test using the main branch of Wasmtime? We've been doing a lot of work related to that code recently.
No, will try soon, thanks.
For now I just disabled component-model-async feature
It doesn’t reproduce on the main branch(bbfcd588641e7ce0f69b3627d7eed69a57af67cf)
Last updated: Feb 24 2026 at 04:36 UTC