-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Naive usage of wastime rust crate leaks memory #2627
Comments
Thanks for the report! What you're doing looks correct, but I believe that this is a bug in Wasmtime. I believe #2017 addresses the problem, so I'll take another look at landing that. |
Confirmed that that fixed it! Yay! Thank you! How can I track when the change lands and I can get off of |
Ok thanks for confirming! I'd recommend following the releases of this repository, so you'll get a notification when we publish the next release. |
This may well just be me holding the crate wrong, but my application keeps using more and more memory every time I create and execute an instance.
I have a
wasm32-wasi
Rust binary that I want to run in a wasmtime sandbox. The binary'smain()
reads some data fromstdin
, writes it tostdout
, and exits. I want each execution of the binary to be in its own independent sandbox, and I want to minimize latency. As such, I keep anEngine
and aModule
around between executions but drop theInstance
,Store
, etc. Or at least, I drop the Rust values, but it seems that the memory doesn't actually get freed.Here's my code: https://github.com/hjfreyer/pictophone-be/blob/09bbe890c5fa8387d3e590209d7231ce48b130e4/server/src/runner.rs#L34
Is this a bug? Am I doing it wrong? I'm using version
0.22.0
of thewasmtime
,wasmtime-wasi
, andwasi-common
crates.The text was updated successfully, but these errors were encountered: