8000 Minidumps without the main program mapping are created if the main program is missing a build id · Issue #122 · rust-minidump/minidump-writer · GitHub
[go: up one dir, main page]

Skip to content

Minidumps without the main program mapping are created if the main program is missing a build id #122

Open

Description

@afranchuk

As a result of https://bugzilla.mozilla.org/show_bug.cgi?id=1676109, any mappings without a build id are removed from the minidump. This behavior isn't great: if the main program doesn't have a build id, it will be removed, which invalidates assumptions in e.g. the minidump crate that the main module is the first mapping. I think at the time the assumption was that sane toolchains should always add build ids nowadays. I found this because the android linker does not (at least not when invoked by cargo)!

I would argue that the main module should never be removed. One could also argue that other modules shouldn't be removed either: the original bug had to do with saving space from "useless" mappings, however nowadays we do more with the mappings than just checking module versions/debug info. For instance, we use mappings to determine whether memory accesses would have been valid or not at crash time.

Furthermore, I think that the decision to remove such mappings should at least rest with the user of the crate, instead of being baked-in.

Activity

  1. gabrielesvelto commented on Jun 4, 2024

    @gabrielesvelto
    Contributor

    Yes, that's a good idea, and I suppose we could tweak the stack walker to react properly to these mappings (e.g. refuse to unwind through a mapped file which is not executable). With the old stack walker we'd happily unwind through those mappings, yielding some absolutely garbage stacks.

    We now also have the list of file descriptors in a stream, so we can certainly build more synergies between that and the non-executable file mappings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0