Stream: git-wasmtime

Topic: wasmtime / issue #11412 `tls::get` runtime panic


view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 11:45):

rvolosatovs opened issue #11412:

Test Case

While working on wasip3 wasi:filesystem I've encountered a panic in https://github.com/bytecodealliance/wasmtime/commit/54384721d13fcf5eecdc11a57eeb2c2a1c3e73c9

Steps to Reproduce

Expected Results

If the issue is in the wasi:filesystem implementation, i.e. the wasmtime API usage I'd ideally expect a compile-time error. If that's not possible, I'd expect a clearer error message as to what's wrong. If the implementation is correct, I'd not expect a panic.

Actual Results

thread 'p3::p3_filesystem_file_read_write' panicked at crates/wasmtime/src/runtime/component/concurrent/tls.rs:81:5:
attempted to recursively call `tls::get` when the pointer was not present or already taken by a previous call to `tls::get`

Versions and Environment

Wasmtime version or commit: https://github.com/bytecodealliance/wasmtime/commit/54384721d13fcf5eecdc11a57eeb2c2a1c3e73c9

Operating system: macOS

Architecture: aarch64

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 11:45):

rvolosatovs added the bug label to Issue #11412.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 11:55):

rvolosatovs commented on issue #11412:

FWIW, I've just tested https://github.com/bytecodealliance/wasmtime/pull/11374 and it did not fix the issue

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 14:38):

alexcrichton commented on issue #11412:

This is happening due to this panic condition. Effectively this line enters a with but store.get_file(&fd)? a few lines down also calls self.with, hence the recursive access.

This is more-or-less a known footgun with Accessor, and I'm not sure how to design something that statically avoids it. I have an idea for improving the error message though.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 16:36):

fitzgen closed issue #11412:

Test Case

While working on wasip3 wasi:filesystem I've encountered a panic in https://github.com/bytecodealliance/wasmtime/commit/54384721d13fcf5eecdc11a57eeb2c2a1c3e73c9

Steps to Reproduce

Expected Results

If the issue is in the wasi:filesystem implementation, i.e. the wasmtime API usage I'd ideally expect a compile-time error. If that's not possible, I'd expect a clearer error message as to what's wrong. If the implementation is correct, I'd not expect a panic.

Actual Results

thread 'p3::p3_filesystem_file_read_write' panicked at crates/wasmtime/src/runtime/component/concurrent/tls.rs:81:5:
attempted to recursively call `tls::get` when the pointer was not present or already taken by a previous call to `tls::get`

Versions and Environment

Wasmtime version or commit: https://github.com/bytecodealliance/wasmtime/commit/54384721d13fcf5eecdc11a57eeb2c2a1c3e73c9

Operating system: macOS

Architecture: aarch64


Last updated: Dec 06 2025 at 07:03 UTC