-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Panic during component instantiation #10802
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
Comments
@pacman82 @markus-klein-aa |
The error happens at https://github.com/bytecodealliance/rustix/blob/cb01fbe4660844b67fdd4eee2a5f769518f6a655/src/backend/linux_raw/param/auxv.rs#L302 which indicates that one of the auxv entries for the process may be incorrect. By the way are you running an arm64 version of Wasmtime or an x86_64 version on your mac? |
On CI we build for x86_64. Locally on our Mac OS Developer machines we build with:
I am walking back a bit, that we witness the same error on CI. We need to validate that. It might be a different issue. |
Verified it also fails locally on our dev machines if we build for Yet, it does not fail, if we build it natively without a container around it. |
Currently Wasmtime has a function `crate::runtime::vm::host_page_size` but this is only used sometimes and the rest of the time `rustix::param::page_size` is used in a few locations. It looks like this usage of `rustix` is causing a panic in bytecodealliance#10802 and additionally it's best to only have one source for this, so this commit updates this all to route through our preexisting `host_page_size` function.
Currently Wasmtime has a function `crate::runtime::vm::host_page_size` but this is only used sometimes and the rest of the time `rustix::param::page_size` is used in a few locations. It looks like this usage of `rustix` is causing a panic in bytecodealliance#10802 and additionally it's best to only have one source for this, so this commit updates this all to route through our preexisting `host_page_size` function.
I'm not sure why this is panicking as I'm not familiar with auxv or how rustix is calculating the host page size, but I've submitted #10803 to remove calls to this function which will somewhat indirectly "fix" this insofar as Wasmtime won't panic at that location any more. @markus-klein-aa if you're able to reduce I believe the rustix project would likely be thankful to have an issue about this panic on their issue tracker. |
Yeah, absolutely we want a minimal example. Yet this is some effort and we thought there might be value in sharing the stack trace up front. |
FWIW the reproduction will likely be invoking this function and that's pretty much it. The main thing to reproduce is your environment which triggers this panic. |
Hey, thanks for the hint. I'll give it a try! |
Currently Wasmtime has a function `crate::runtime::vm::host_page_size` but this is only used sometimes and the rest of the time `rustix::param::page_size` is used in a few locations. It looks like this usage of `rustix` is causing a panic in bytecodealliance#10802 and additionally it's best to only have one source for this, so this commit updates this all to route through our preexisting `host_page_size` function.
Currently Wasmtime has a function `crate::runtime::vm::host_page_size` but this isn't reachable from the `wasmtime-fiber` crate and instead tha crate uses `rustix::param::page_size` to determine the host page size. It looks like this usage of `rustix` is causing a panic in bytecodealliance#10802. Ideally `wasmtime-fiber` would be able to use the same function but the crate separation does not currently make that feasible. For now duplicate the logic of `wasmtime` into `wasmtime-fiber` as it's modest enough to ensure that this does not panic. Closes bytecodealliance#10802
@alexcrichton You were correct about that we only need to call the function to reproduce it. Opened an issue in rustix. Thanks again. |
* Duplicate page size determination in `wasmtime-fiber` Currently Wasmtime has a function `crate::runtime::vm::host_page_size` but this isn't reachable from the `wasmtime-fiber` crate and instead tha crate uses `rustix::param::page_size` to determine the host page size. It looks like this usage of `rustix` is causing a panic in #10802. Ideally `wasmtime-fiber` would be able to use the same function but the crate separation does not currently make that feasible. For now duplicate the logic of `wasmtime` into `wasmtime-fiber` as it's modest enough to ensure that this does not panic. Closes #10802 * Run full test suite in CI prtest:full
Test Case
Work in progress. Currently we only witness this in our production code base. We are currently working on a minimal example. Yet we found it may be valuable to share the back trace with you up front.
Steps to Reproduce
See above.
Expected Results
Instantiating the component without a panic.
Actual Results
We encounter a panic.
Versions and Environment
We see the panic in wasmtime 32, not in 31. We do not see the problem on all platforms.
We saw it on:
We did not see it on:
The text was updated successfully, but these errors were encountered: