peterhuene opened Issue #2495:
Repro
- Create a Rust wasm file that simply panics in main.
- Run the wasm with
wasmtime foo.wasm
Expected behavior
As the module doesn't declare a module name, Wasmtime should provide a meaningful default based on the file name for displaying in back traces.
Actual behavior
Wasmtime prints
<unknown>
for module names, which can be confusing.An example from a user:
1: wasm trap: unreachable wasm backtrace: 0: 0x6c34 - <unknown>!__rust_start_panic 1: 0x68df - <unknown>!rust_panic 2: 0x65b9 - <unknown>!std::panicking::rust_panic_with_hook::h2345fb0909b53e12 3: 0x10c7 - <unknown>!std::panicking::begin_panic::{{closure}}::h86678b4e45fbd7fa 4: 0x1ccc - <unknown>!std::sys_common::backtrace::__rust_end_short_backtrace::h8c7fe73fc6112e0e 5: 0xfb5 - <unknown>!std::panicking::begin_panic::h5a83b3bb18195122 6: 0x1fed - <unknown>!wasm_backtrace::g::hc5f9230a6e65a92c 7: 0x1fbf - <unknown>!wasm_backtrace::f::h80747d9c660ceee4 8: 0x1fb5 - <unknown>!wasm_backtrace::main::h9fc5985544d26b7b 9: 0x1bee - <unknown>!core::ops::function::FnOnce::call_once::hfd088d5879747b81 10: 0x1d03 - <unknown>!std::sys_common::backtrace::__rust_begin_short_backtrace::h2d7439e32125816a 11: 0x4a5 - <unknown>!std::rt::lang_start::{{closure}}::hc9be9987846fa67a 12: 0x69f0 - <unknown>!std::rt::lang_start_internal::h260050c92cd470af 13: 0x457 - <unknown>!std::rt::lang_start::hd15e4b73e676a12b 14: 0x200b - <unknown>!__original_main 15: 0x397 - <unknown>!_start
peterhuene labeled Issue #2495:
Repro
- Create a Rust wasm file that simply panics in main.
- Run the wasm with
wasmtime foo.wasm
Expected behavior
As the module doesn't declare a module name, Wasmtime should provide a meaningful default based on the file name for displaying in back traces.
Actual behavior
Wasmtime prints
<unknown>
for module names, which can be confusing.An example from a user:
1: wasm trap: unreachable wasm backtrace: 0: 0x6c34 - <unknown>!__rust_start_panic 1: 0x68df - <unknown>!rust_panic 2: 0x65b9 - <unknown>!std::panicking::rust_panic_with_hook::h2345fb0909b53e12 3: 0x10c7 - <unknown>!std::panicking::begin_panic::{{closure}}::h86678b4e45fbd7fa 4: 0x1ccc - <unknown>!std::sys_common::backtrace::__rust_end_short_backtrace::h8c7fe73fc6112e0e 5: 0xfb5 - <unknown>!std::panicking::begin_panic::h5a83b3bb18195122 6: 0x1fed - <unknown>!wasm_backtrace::g::hc5f9230a6e65a92c 7: 0x1fbf - <unknown>!wasm_backtrace::f::h80747d9c660ceee4 8: 0x1fb5 - <unknown>!wasm_backtrace::main::h9fc5985544d26b7b 9: 0x1bee - <unknown>!core::ops::function::FnOnce::call_once::hfd088d5879747b81 10: 0x1d03 - <unknown>!std::sys_common::backtrace::__rust_begin_short_backtrace::h2d7439e32125816a 11: 0x4a5 - <unknown>!std::rt::lang_start::{{closure}}::hc9be9987846fa67a 12: 0x69f0 - <unknown>!std::rt::lang_start_internal::h260050c92cd470af 13: 0x457 - <unknown>!std::rt::lang_start::hd15e4b73e676a12b 14: 0x200b - <unknown>!__original_main 15: 0x397 - <unknown>!_start
peterhuene edited Issue #2495:
Repro
- Create a Rust wasm file that simply panics in main.
- Run the wasm with
wasmtime foo.wasm
Expected behavior
As the module doesn't declare a module name, Wasmtime should provide a meaningful default based on the file name for displaying in back traces.
Actual behavior
Wasmtime prints
<unknown>
for module names, which can be confusing. Additionally, calls between modules without names will be even harder to decipher.An example from a user:
1: wasm trap: unreachable wasm backtrace: 0: 0x6c34 - <unknown>!__rust_start_panic 1: 0x68df - <unknown>!rust_panic 2: 0x65b9 - <unknown>!std::panicking::rust_panic_with_hook::h2345fb0909b53e12 3: 0x10c7 - <unknown>!std::panicking::begin_panic::{{closure}}::h86678b4e45fbd7fa 4: 0x1ccc - <unknown>!std::sys_common::backtrace::__rust_end_short_backtrace::h8c7fe73fc6112e0e 5: 0xfb5 - <unknown>!std::panicking::begin_panic::h5a83b3bb18195122 6: 0x1fed - <unknown>!wasm_backtrace::g::hc5f9230a6e65a92c 7: 0x1fbf - <unknown>!wasm_backtrace::f::h80747d9c660ceee4 8: 0x1fb5 - <unknown>!wasm_backtrace::main::h9fc5985544d26b7b 9: 0x1bee - <unknown>!core::ops::function::FnOnce::call_once::hfd088d5879747b81 10: 0x1d03 - <unknown>!std::sys_common::backtrace::__rust_begin_short_backtrace::h2d7439e32125816a 11: 0x4a5 - <unknown>!std::rt::lang_start::{{closure}}::hc9be9987846fa67a 12: 0x69f0 - <unknown>!std::rt::lang_start_internal::h260050c92cd470af 13: 0x457 - <unknown>!std::rt::lang_start::hd15e4b73e676a12b 14: 0x200b - <unknown>!__original_main 15: 0x397 - <unknown>!_start
peterhuene edited Issue #2495:
Repro
- Create a Rust wasm file that simply panics in main.
- Run the wasm with
wasmtime foo.wasm
Expected behavior
As the module doesn't declare a module name, Wasmtime should provide a meaningful default based on the file name for displaying in back traces. In this case, perhaps
foo
would be a good name (i.e. the name of the file name without the extension).Actual behavior
Wasmtime prints
<unknown>
for module names, which can be confusing. Additionally, calls between modules without names will be even harder to decipher.An example from a user:
1: wasm trap: unreachable wasm backtrace: 0: 0x6c34 - <unknown>!__rust_start_panic 1: 0x68df - <unknown>!rust_panic 2: 0x65b9 - <unknown>!std::panicking::rust_panic_with_hook::h2345fb0909b53e12 3: 0x10c7 - <unknown>!std::panicking::begin_panic::{{closure}}::h86678b4e45fbd7fa 4: 0x1ccc - <unknown>!std::sys_common::backtrace::__rust_end_short_backtrace::h8c7fe73fc6112e0e 5: 0xfb5 - <unknown>!std::panicking::begin_panic::h5a83b3bb18195122 6: 0x1fed - <unknown>!wasm_backtrace::g::hc5f9230a6e65a92c 7: 0x1fbf - <unknown>!wasm_backtrace::f::h80747d9c660ceee4 8: 0x1fb5 - <unknown>!wasm_backtrace::main::h9fc5985544d26b7b 9: 0x1bee - <unknown>!core::ops::function::FnOnce::call_once::hfd088d5879747b81 10: 0x1d03 - <unknown>!std::sys_common::backtrace::__rust_begin_short_backtrace::h2d7439e32125816a 11: 0x4a5 - <unknown>!std::rt::lang_start::{{closure}}::hc9be9987846fa67a 12: 0x69f0 - <unknown>!std::rt::lang_start_internal::h260050c92cd470af 13: 0x457 - <unknown>!std::rt::lang_start::hd15e4b73e676a12b 14: 0x200b - <unknown>!__original_main 15: 0x397 - <unknown>!_start
peterhuene commented on Issue #2495:
It would also be nice if we padded the frame number column (perhaps with a width of 3?) so that it looks a little neater too.
peterhuene edited a comment on Issue #2495:
It would also be nice if we padded the frame number column (perhaps with a width of 3?) and 0-filled the offsets so that it looks a little neater too.
Last updated: Dec 23 2024 at 12:05 UTC