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

WASIX's file-based module cache will block the runtime thread #3851

Closed
Michael-F-Bryan opened this issue May 8, 2023 · 1 comment
Closed
Assignees
Labels
bug Something isn't working 📦 lib-wasi About wasmer-wasi lib-wasix Issues related to the WASIX toolchain. priority-medium Medium priority issue

Comments

@Michael-F-Bryan
Copy link
Contributor

Describe the bug

The fs-based cache WASIX uses for compiled modules is called from async code, but uses synchronous IO for reading the file and deserializing. This happens in both the current version (here and here) and the version introduced in #3841 (here).

We need to tweak the new FileSystemCache implementation to either use the tokio::fs module (typing the FileSystemCache to a tokio runtime) or make the FileSystemCache accept an Arc<dyn VirtualTaskManager> parameter in its constructor and do the blocking IO via spawn_blocking().

@Michael-F-Bryan Michael-F-Bryan added bug Something isn't working 📦 lib-wasi About wasmer-wasi lib-wasix Issues related to the WASIX toolchain. labels May 8, 2023
@Michael-F-Bryan Michael-F-Bryan self-assigned this May 8, 2023
@theduke theduke added the priority-medium Medium priority issue label May 9, 2023
@maminrayej
Copy link
Contributor

Resolved by #4345.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 📦 lib-wasi About wasmer-wasi lib-wasix Issues related to the WASIX toolchain. priority-medium Medium priority issue
Projects
None yet
Development

No branches or pull requests

3 participants