abc767234318 opened issue #4458:
Test Case
demo.zip
This is a wasm file first mentioned in wasmer issues NO.936.Steps to Reproduce
wasmtime --dir=. demo.wasm '{"a":"txt", "b":1}'
Expected Results
Successfully execute the test.wasm and print :
The program accepts a JSON input via stdin [Usage]: wasmer run --dir=. main.wasm '{"a":"txt", "b":2}' The input is unmarshaled and saved to a file log.txt ---------------------------------------- Got input = {"a":"txt", "b":1} File log.txt updated
Actual Results
Error: failed to run main module `demo.wasm` Caused by: 0: failed to instantiate "demo.wasm" 1: command export '__rustc_debug_gdb_scripts_section__' is not a function
Versions and Environment
Wasmtime version or commit: wasmtime-cli 0.38.1
Operating system: ubuntu20.04
abc767234318 labeled issue #4458:
Test Case
demo.zip
This is a wasm file first mentioned in wasmer issues NO.936.Steps to Reproduce
wasmtime --dir=. demo.wasm '{"a":"txt", "b":1}'
Expected Results
Successfully execute the test.wasm and print :
The program accepts a JSON input via stdin [Usage]: wasmer run --dir=. main.wasm '{"a":"txt", "b":2}' The input is unmarshaled and saved to a file log.txt ---------------------------------------- Got input = {"a":"txt", "b":1} File log.txt updated
Actual Results
Error: failed to run main module `demo.wasm` Caused by: 0: failed to instantiate "demo.wasm" 1: command export '__rustc_debug_gdb_scripts_section__' is not a function
Versions and Environment
Wasmtime version or commit: wasmtime-cli 0.38.1
Operating system: ubuntu20.04
abc767234318 edited issue #4458:
Test Case
demo.zip
This is a wasm file first mentioned in wasmer issues NO.936.Steps to Reproduce
touch log.txt
wasmtime --dir=. demo.wasm '{"a":"txt", "b":1}'Expected Results
Successfully execute the test.wasm and print :
The program accepts a JSON input via stdin [Usage]: wasmer run --dir=. main.wasm '{"a":"txt", "b":2}' The input is unmarshaled and saved to a file log.txt ---------------------------------------- Got input = {"a":"txt", "b":1} File log.txt updated
Actual Results
Error: failed to run main module `demo.wasm` Caused by: 0: failed to instantiate "demo.wasm" 1: command export '__rustc_debug_gdb_scripts_section__' is not a function
Versions and Environment
Wasmtime version or commit: wasmtime-cli 0.38.1
Operating system: ubuntu20.04
rostamn739 commented on issue #4458:
This is a more detailed run with
--allow-unknown-exports
✗ cargo run -- run --allow-precompiled --allow-unknown-exports ./demo.cwasm Running `target/debug/wasmtime run --allow-precompiled --allow-unknown-exports ./demo.cwasm` The program accepts a JSON input via stdin [Usage]: wasmer run --dir=. main.wasm '{"a":"txt", "b":2}' The input is unmarshaled and saved to a file log.txt ---------------------------------------- Got input = {"a":"txt","b": 123} thread 'main' panicked at 'cannot open file: Custom { kind: Other, error: "failed to find a preopened file descriptor through which \"log.txt\" could be opened" }', src/libcore/result.rs:1084:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. Error: failed to run main module `./demo.cwasm` Caused by: 0: failed to invoke command default 1: wasm trap: wasm `unreachable` instruction executed wasm backtrace: 0: 0x3adc6 - <unknown>!__rust_start_panic 1: 0x3a5ef - <unknown>!rust_panic 2: 0x3a2b4 - <unknown>!std::panicking::rust_panic_with_hook::h38e55c6f9a9b5d9f 3: 0x3a087 - <unknown>!std::panicking::continue_panic_fmt::hbdab1a44e1ebdad7 4: 0x39fe6 - <unknown>!rust_begin_unwind 5: 0x43303 - <unknown>!core::panicking::panic_fmt::h7e9f94035af782b3 6: 0x4508f - <unknown>!core::result::unwrap_failed::hf7591c1dd9412006 7: 0x7e6c - <unknown>!core::result::Result<T,E>::expect::h4b0ac66bb9239b5e 8: 0x17ca - <unknown>!demo::main::hd0c421d0ef0fb50e 9: 0x1ae5 - <unknown>!std::rt::lang_start::{{closure}}::h298634c7c1655c18 10: 0x39966 - <unknown>!std::sys_common::backtrace::__rust_begin_short_backtrace::hf3ea6316715e2a72 11: 0x39fd8 - <unknown>!std::panicking::try::do_call::h2cc3188b185bea03 12: 0x3adba - <unknown>!__rust_maybe_catch_panic 13: 0x3a73c - <unknown>!std::rt::lang_start_internal::h5c7c5a5aac4d00f7 14: 0x1a90 - <unknown>!std::rt::lang_start::hbe7627577ab85542 15: 0x1a10 - <unknown>!main 16: 0x9f5 - <unknown>!_start note: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable to may show more debugging information
jameysharp commented on issue #4458:
According to #2294, newer versions of Rust shouldn't emit the
__rustc_debug_gdb_scripts_section__
symbol any more. Based on #511, it sounds like 1.50 is new enough, which is over a year old. It looks like this was built with Rust 1.38, which is almost three years old.I don't know enough about either Rust's WASI target or wasmtime's WASI implementation, but I'm wondering if recompiling with newer Rust would fix both of these issues.
@sunfishcode, does this sound familiar to you?
sunfishcode commented on issue #4458:
I don't know recognize
__rustc_debug_gdb_scripts_section__
myself, but that sounds plausible.
sunfishcode edited a comment on issue #4458:
I don't recognize
__rustc_debug_gdb_scripts_section__
myself, but that sounds plausible.
sunfishcode commented on issue #4458:
I don't know what toolchain produces the error message "failed to find a preopened file descriptor through which \"log.txt\" could be opened", so it's not clear to me what the problem is, without a significant amount of debugging.
This binary uses the old "wasi_unstable" module. It would be valuable to recompile it and see if the error persists.
alexcrichton commented on issue #4458:
I'm going to close this since I believe Wasmtime is working as intended, requiring the
--allow-unknown-exports
flag. The subsequent error message seems related to the specific wasm module here and possibly a missing--dir .
option. I don't think there's anything left to fix per se here, so I'm going to close this.
alexcrichton closed issue #4458:
Test Case
demo.zip
This is a wasm file first mentioned in wasmer issues NO.936.Steps to Reproduce
touch log.txt
wasmtime --dir=. demo.wasm '{"a":"txt", "b":1}'Expected Results
Successfully execute the test.wasm and print :
The program accepts a JSON input via stdin [Usage]: wasmer run --dir=. main.wasm '{"a":"txt", "b":2}' The input is unmarshaled and saved to a file log.txt ---------------------------------------- Got input = {"a":"txt", "b":1} File log.txt updated
Actual Results
Error: failed to run main module `demo.wasm` Caused by: 0: failed to instantiate "demo.wasm" 1: command export '__rustc_debug_gdb_scripts_section__' is not a function
Versions and Environment
Wasmtime version or commit: wasmtime-cli 0.38.1
Operating system: ubuntu20.04
Last updated: Nov 22 2024 at 16:03 UTC