-
Notifications
You must be signed in to change notification settings - Fork 824
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
failed to find instruction for 7fd8fbada259 #1856
Comments
It could be possibly be related to caching; does your CI preserve wasmer's cache data? |
Doesn't seem so: |
Since we use Wasmer as a library, I am not aware of any caching that could happen. The only thing that is cached is cargo stuff. |
@webmaster128 I've investigated a bit the issue. Is it possible that you are testing in release mode in local (mac/linux) but in debug mode in CircleCI? |
@syrusakbary thank you for looking into this. It debug in all cases:
i.e. the Wasm is build in release and the tests are executed in debug. But I found something different on my local machine. With a local copy of Wasmer and some debugging statements like this diff --git a/lib/engine/src/trap/frame_info.rs b/lib/engine/src/trap/frame_info.rs
index 9d5585a03..5574c5ad4 100644
--- a/lib/engine/src/trap/frame_info.rs
+++ b/lib/engine/src/trap/frame_info.rs
@@ -108,8 +108,11 @@ impl GlobalFrameInfo {
/// Returns an object if this `pc` is known to some previously registered
/// module, or returns `None` if no information can be found.
pub fn lookup_frame_info(&self, pc: usize) -> Option<FrameInfo> {
+ println!("In lookup_frame_info");
let module = self.module_info(pc)?;
+ println!("Got module");
let func = module.function_info(pc)?;
+ println!("Got func");
// Use our relative position from the start of the function to find the
// machine instruction that corresponds to `pc`, which then allows us to
@@ -148,6 +151,7 @@ impl GlobalFrameInfo {
// the function, because otherwise something is buggy along the way and
// not accounting for all the instructions. This isn't super critical
// though so we can omit this check in release mode.
+ println!("Pos: {:?}", pos);
debug_assert!(pos.is_some(), "failed to find instruction for {:x}", pc);
let instr = match pos { I only get the first log statement locally. "Got module" is never reached. |
The behaviour is the same on the 1.0.0-beta1 tag. Here is a stacktrace to it:
|
Great, thanks for the report. We'll take a closer look soon |
@webmaster128 after some research we found the issue:
The solution for 2. is available in the PR #1870. If you could test it and output results would be great! |
Great, thank you. At 6eb897d (from #1870)
The local Linux machine I was referring to was on the wrong branch 🤦♂️. I can now reproduce the CI's behaviour there. So only two cases left: Mac+singlepass and Linux+singlepass. |
1870: Added basic AddressMap support for singlepass r=syrusakbary a=syrusakbary <!-- Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test: https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests --> # Description This PR should fix #1856 and #1523 by adding address maps with the locations related to the traps. The PR makes the following command to pass (in debug mode): ``` cargo test --features "singlepass" --features "test-singlepass test-jit" ``` <!-- Provide details regarding the change including motivation, links to related issues, and the context of the PR. --> # Review - [ ] Add a short description of the the change to the CHANGELOG.md file Co-authored-by: Syrus <[email protected]> Co-authored-by: Syrus Akbary <[email protected]>
Describe the bug
I'm upgrading to Wasmer at 6041c03 (almost latest master). I have everything working fine locally and all tests passing.
Now there is a strange error that only happens in the CI:
which refers to this line. The name "handle_panic" is my test name, which executes Wasm that contains a Rust panic.
Steps to reproduce
Unfortunately this only happens in the CI, not on my local mac machine and not on my local Linux. All run Rust in debug mode.
Expected behavior
Tests passt
Actual behavior
Tests error with the message above
Additional context
See CosmWasm/cosmwasm#504
The text was updated successfully, but these errors were encountered: