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

Add a limits and trap-on-OOM options to the CLI #6149

Merged

Conversation

alexcrichton
Copy link
Member

This commit adds new options to the wasmtime CLI to control the Store::limiter behavior at runtime. This enables artificially restriction the memory usage of the wasm instance, for example. Additionally a new option is added to StoreLimits to force a trap on growth failure. This is intended to help quickly debug modules with backtraces if OOM is happening, or even diagnosing if OOM is happening in the first place.

This commit adds new options to the `wasmtime` CLI to control the
`Store::limiter` behavior at runtime. This enables artificially
restriction the memory usage of the wasm instance, for example.
Additionally a new option is added to `StoreLimits` to force a trap on
growth failure. This is intended to help quickly debug modules with
backtraces if OOM is happening, or even diagnosing if OOM is happening
in the first place.
@alexcrichton alexcrichton requested a review from a team as a code owner April 5, 2023 15:12
@alexcrichton alexcrichton requested review from pchickey and removed request for a team April 5, 2023 15:12
@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Apr 5, 2023
@github-actions
Copy link

github-actions bot commented Apr 5, 2023

Subscribe to Label Action

cc @peterhuene

This issue or pull request has been labeled: "wasmtime:api"

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

  • peterhuene: wasmtime:api

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

Learn more.

Copy link
Contributor

@pchickey pchickey left a comment

Choose a reason for hiding this comment

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

With trap_on_grow_failure, finally the very last remaining feature that Lucet had over Wasmtime has found its way home, cc @acfoltzer

@alexcrichton alexcrichton added this pull request to the merge queue Apr 5, 2023
@github-actions github-actions bot added the fuzzing Issues related to our fuzzing infrastructure label Apr 5, 2023
@github-actions
Copy link

github-actions bot commented Apr 5, 2023

Subscribe to Label Action

cc @fitzgen

This issue or pull request has been labeled: "fuzzing"

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.

Merged via the queue into bytecodealliance:main with commit 52e9053 Apr 5, 2023
@alexcrichton alexcrichton deleted the trap-on-grow-failure branch April 5, 2023 18:02
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants