Stream: general

Topic: Wasmtime hangs. How best to debug


view this post on Zulip Yage Hu (Nov 21 2023 at 01:20):

Hi folks, I've been fuzzing Wasmtime by feeding it sequences of WASI calls. I've encountered a case where Wasmtime would hang > 10 seconds when calling path_open. I've minimized the call sequence to something like 500 calls. Any suggestion how I can best debug this?

view this post on Zulip Pat Hickey (Nov 21 2023 at 01:22):

strace? what syscall has it hung on?

view this post on Zulip Yage Hu (Nov 21 2023 at 01:25):

Looks like futex.

view this post on Zulip Pat Hickey (Nov 21 2023 at 01:25):

attach gdb and see a backtrace from there?

view this post on Zulip Yage Hu (Nov 21 2023 at 01:30):

Thanks for the pointer! Would I need to run wasmtime debug build for that? Do I need -D debug-info when invoking wasmtime?

view this post on Zulip Pat Hickey (Nov 21 2023 at 01:51):

its probably helpful to have a wasmtime debug build, start with that before enabling -D debug-info

view this post on Zulip Pat Hickey (Nov 21 2023 at 01:52):

even without a debug build the backtrace might give you some clues of where to add some debug prints


Last updated: Dec 23 2024 at 12:05 UTC