Stream: general

Topic: Debug information error?


view this post on Zulip Thibault Charbonnier (Mar 11 2021 at 23:30):

Hi everyone,
Somewhat puzzled by an issue that started happening in my CI environment, but which I cannot reproduce locally (and thus can't really investigate): on wasmtime_module_new, I'm getting a Debug information error with the following description: "The end offset of a location list entry must not be before the beginning."
Would anybody have any hints on what this error is all about? TIA!

view this post on Zulip Peter Huene (Mar 11 2021 at 23:44):

This appears to come from gimli's InvalidLocationAddressRange error. so perhaps the DWARF information in the module is incorrect? Do you know what was used to produce the module?

view this post on Zulip Thibault Charbonnier (Mar 11 2021 at 23:51):

Hi Peter; thanks! Must be it; The module is cleaned+built on each run with a fresh minimal rustup install of Rust 1.52.0-nightly (linux-gnu f98721f88 2021-03-10) with the wasm32-unknown-unknown target

view this post on Zulip Peter Huene (Mar 11 2021 at 23:53):

Hmm, I think we should be bypassing parsing of the debug sections unless WASMTIME_BACKTRACE_DETAILS=1 is in the environment (I don't think this is controllable from the C API, sadly)

view this post on Zulip Thibault Charbonnier (Mar 11 2021 at 23:54):

Oh, I just reproduced locally after updating: nightly-x86_64-unknown-linux-gnu updated - rustc 1.52.0-nightly (f98721f88 2021-03-10) (from rustc 1.52.0-nightly (4f20caa62 2021-03-01))

view this post on Zulip Thibault Charbonnier (Mar 11 2021 at 23:57):

(I just double checked, no WASMTIME_* or RUST* env variable set)

view this post on Zulip Peter Huene (Mar 11 2021 at 23:58):

oh you also have to disable generating DWARF for the JIT too it seems

view this post on Zulip Peter Huene (Mar 11 2021 at 23:59):

that is actually controllable from the C API with wasmtime_config_debug_info_set, try setting that to false and seeing if the module compiles

view this post on Zulip Peter Huene (Mar 12 2021 at 00:00):

if this only reproduces on nightly, i'm guessing there's some bug causing bad DWARF

view this post on Zulip Peter Huene (Mar 12 2021 at 00:02):

in this case, specifically in the .debug_loclists section

view this post on Zulip Thibault Charbonnier (Mar 12 2021 at 00:02):

Ah, I completely forgot I had this on; yes indeed, the module load without it

view this post on Zulip Thibault Charbonnier (Mar 12 2021 at 00:03):

So a temporary situation, would you say? Given it is nightly

view this post on Zulip Peter Huene (Mar 12 2021 at 00:10):

one would hope; probably an LLVM bug to track down, but it could also be a bug in gimli's parser (this function, at least, hasn't been touched in 2 years; so I'd definitely lean LLVM)

view this post on Zulip Thibault Charbonnier (Mar 12 2021 at 00:10):

Understood, thanks @Peter Huene, much helpful!

view this post on Zulip Peter Huene (Mar 12 2021 at 00:16):

If possible, would you mind filing an issue in the wasmtime repo and attach the problematic module? One of us can probably track down what's invalid in the debug section at least and follow up with the relevant downstream project

view this post on Zulip Thibault Charbonnier (Mar 12 2021 at 00:38):

Will do!


Last updated: Dec 23 2024 at 13:07 UTC