rvolosatovs opened issue #11412:
Test Case
While working on wasip3
wasi:filesystemI've encountered a panic in https://github.com/bytecodealliance/wasmtime/commit/54384721d13fcf5eecdc11a57eeb2c2a1c3e73c9Steps to Reproduce
- checkout https://github.com/bytecodealliance/wasmtime/commit/54384721d13fcf5eecdc11a57eeb2c2a1c3e73c9
- run
wasmtime_wasitests withp3feature enabledExpected Results
If the issue is in the
wasi:filesystemimplementation, 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
rvolosatovs added the bug label to Issue #11412.
rvolosatovs commented on issue #11412:
FWIW, I've just tested https://github.com/bytecodealliance/wasmtime/pull/11374 and it did not fix the issue
alexcrichton commented on issue #11412:
This is happening due to this panic condition. Effectively this line enters a
withbutstore.get_file(&fd)?a few lines down also callsself.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.
fitzgen closed issue #11412:
Test Case
While working on wasip3
wasi:filesystemI've encountered a panic in https://github.com/bytecodealliance/wasmtime/commit/54384721d13fcf5eecdc11a57eeb2c2a1c3e73c9Steps to Reproduce
- checkout https://github.com/bytecodealliance/wasmtime/commit/54384721d13fcf5eecdc11a57eeb2c2a1c3e73c9
- run
wasmtime_wasitests withp3feature enabledExpected Results
If the issue is in the
wasi:filesystemimplementation, 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