Skip to content

"Downgrade" threads support to tier 2, disable fuzzing#12036

Merged
alexcrichton merged 8 commits intobytecodealliance:mainfrom
alexcrichton:downgrade-threads
Nov 24, 2025
Merged

"Downgrade" threads support to tier 2, disable fuzzing#12036
alexcrichton merged 8 commits intobytecodealliance:mainfrom
alexcrichton:downgrade-threads

Conversation

@alexcrichton
Copy link
Member

This commit is borne out of a fuzz bug that was opened recently. The fuzz bug specifically has to do with fallout from #12022, specifically SharedMemory being used to allocated instead of Memory. In this situation the resource limiter is no longer consulted meaning that shared memories bypass this and aren't caught by OOM checks. This is currently by design because SharedMemory instances don't know which resource limiter to hook into per-store.

More generally though the implementation of wasm threads, while workable in Wasmtime, has a number of known relatively large deficiencies. These were not resolved prior to ungating the wasm proposal (that's on me) but nevertheless the quality of implementation is not quite up to "tier 1 par" with the rest of what Wasmtime offers. Given that I'm proposing that threads is downgraded to tier 2 for now which means, primarily, that we won't issue CVEs for issues with it. The proposal is still on-by-default and usable-by-default, but my hope is to reflect the current level of quality in Wasmtime with this adjustment.

This commit shuffles around some documentation of wasm proposals to split it into tier 1/2/3 instead of on/off-by-default and then adds a column for whether the proposal is on-by-default.

@alexcrichton alexcrichton requested review from a team as code owners November 17, 2025 19:27
@alexcrichton alexcrichton requested review from cfallin and removed request for a team November 17, 2025 19:27
Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No objections from me at least; not sure if we want to discuss in the Wasmtime meeting or if anyone else has any input on the decision...

@alexcrichton
Copy link
Member Author

Good point yeah, let's discuss in a meeting

@github-actions github-actions bot added fuzzing Issues related to our fuzzing infrastructure wasmtime:docs Issues related to Wasmtime's documentation labels Nov 17, 2025
@github-actions
Copy link

Subscribe to Label Action

cc @fitzgen

Details This issue or pull request has been labeled: "fuzzing", "wasmtime:docs"

Thus the following users have been cc'd because of the following labels:

  • fitzgen: fuzzing

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@alexcrichton alexcrichton requested a review from a team as a code owner November 21, 2025 02:23
@alexcrichton alexcrichton requested review from dicej and removed request for a team November 21, 2025 02:23
@alexcrichton
Copy link
Member Author

Ok updated this from today's discussion in the Wasmtime meeting namely:

  • The threads proposal is still downgraded to tier 2
  • The WebAssembly threads feature continues to be enabled by default
  • Creation of shared memories is now disabled by default

Notably there's not actually any means of exercising the threading/problematic parts of the API, namely SharedMemory. That being said single-threaded atomics are still allowed in wasm which should work just fine.

@github-actions github-actions bot added wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:c-api Issues pertaining to the C API. wasmtime:config Issues related to the configuration of Wasmtime labels Nov 21, 2025
@github-actions
Copy link

Label Messager: wasmtime:config

It looks like you are changing Wasmtime's configuration options. Make sure to
complete this check list:

  • If you added a new Config method, you wrote extensive documentation for
    it.

    Details

    Our documentation should be of the following form:

    Short, simple summary sentence.
    
    More details. These details can be multiple paragraphs. There should be
    information about not just the method, but its parameters and results as
    well.
    
    Is this method fallible? If so, when can it return an error?
    
    Can this method panic? If so, when does it panic?
    
    # Example
    
    Optional example here.
    
  • If you added a new Config method, or modified an existing one, you
    ensured that this configuration is exercised by the fuzz targets.

    Details

    For example, if you expose a new strategy for allocating the next instance
    slot inside the pooling allocator, you should ensure that at least one of our
    fuzz targets exercises that new strategy.

    Often, all that is required of you is to ensure that there is a knob for this
    configuration option in wasmtime_fuzzing::Config (or one
    of its nested structs).

    Rarely, this may require authoring a new fuzz target to specifically test this
    configuration. See our docs on fuzzing for more details.

  • If you are enabling a configuration option by default, make sure that it
    has been fuzzed for at least two weeks before turning it on by default.


Details

To modify this label's message, edit the .github/label-messager/wasmtime-config.md file.

To add new label messages or remove existing label messages, edit the
.github/label-messager.json configuration file.

Learn more.

This commit is borne out of a fuzz bug that was opened recently. The
fuzz bug specifically has to do with fallout from bytecodealliance#12022, specifically
`SharedMemory` being used to allocated instead of `Memory`. In this
situation the resource limiter is no longer consulted meaning that
shared memories bypass this and aren't caught by OOM checks. This is
currently by design because `SharedMemory` instances don't know which
resource limiter to hook into per-store.

More generally though the implementation of wasm threads, while workable
in Wasmtime, has a number of known relatively large deficiencies. These
were not resolved prior to ungating the wasm proposal (that's on me) but
nevertheless the quality of implementation is not quite up to "tier 1
par" with the rest of what Wasmtime offers. Given this the threads
proposal is now downgraded to tier 2. To help minimize the impact of
this the wasm proposal is left enabled-by-default, but creation of a
`SharedMemory` in the Rust API requires opting-in via a new
`Config::shared_memory` method.

This commit shuffles around some documentation of wasm proposals to
split it into tier 1/2/3 instead of on/off-by-default and then adds a
column for whether the proposal is on-by-default.
Fix an issue where defined shared memories weren't gated
prtest:full
@alexcrichton alexcrichton added this pull request to the merge queue Nov 24, 2025
Merged via the queue into bytecodealliance:main with commit 0a55f80 Nov 24, 2025
342 of 344 checks passed
@alexcrichton alexcrichton deleted the downgrade-threads branch November 24, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fuzzing Issues related to our fuzzing infrastructure wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:c-api Issues pertaining to the C API. wasmtime:config Issues related to the configuration of Wasmtime wasmtime:docs Issues related to Wasmtime's documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants