Bug 1644486 Comment 18 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Yes, we finally have the reasons why we're failing to write out the minidumps, see [this](https://crash-stats.mozilla.org/search/?release_channel=nightly&signature=%3DEMPTY%3A%20no%20crashing%20thread%20identified%3B%20EmptyMinidump&product=Firefox&version=102.0a1&date=%3E%3D2022-05-17T07%3A53%3A00.000Z&date=%3C2022-05-24T07%3A53%3A00.000Z&_facets=url&_facets=user_comments&_facets=install_time&_facets=version&_facets=address&_facets=moz_crash_reason&_facets=reason&_facets=build_id&_facets=platform_pretty_version&_facets=signature&_facets=dumper_error&_sort=-date&_columns=date&_columns=signature&_columns=product&_columns=version&_columns=build_id&_columns=platform#facet-dumper_error).

So out of the 34 recent crashes one thirds has a **No threads left to suspend (out of X)** error and another third has **Error during init phase: IO error for file /proc/<pid>/auxv: Permission denied (os error 13)** errors.

Regarding the first error it's probably happening because it's too late to write a minidump. I wonder if we could experiment with sending a `SIGSTOP` instead or use `ptrace()` with `PTRACE_ATTACH`. Regarding the latter error we can probably do away with the contents of the auxiliary vector and still write a mostly complete minidump. Additionally we might ptrace the auxiliary vector directly out of the crashed process if reading the corresponding /proc file fails. I'll file bugs for both.
Yes, we finally have the reasons why we're failing to write out the minidumps, see [this](https://crash-stats.mozilla.org/search/?release_channel=nightly&signature=%3DEMPTY%3A%20no%20crashing%20thread%20identified%3B%20EmptyMinidump&product=Firefox&version=102.0a1&date=%3E%3D2022-05-17T07%3A53%3A00.000Z&date=%3C2022-05-24T07%3A53%3A00.000Z&_facets=url&_facets=user_comments&_facets=install_time&_facets=version&_facets=address&_facets=moz_crash_reason&_facets=reason&_facets=build_id&_facets=platform_pretty_version&_facets=signature&_facets=dumper_error&_sort=-date&_columns=date&_columns=signature&_columns=product&_columns=version&_columns=build_id&_columns=platform#facet-dumper_error).

So out of the 34 recent crashes one thirds has a **No threads left to suspend (out of X)** error and another third has **Error during init phase: IO error for file /proc/<pid>/auxv: Permission denied (os error 13)** errors.

Regarding the first error it's probably happening because it's too late to write a minidump. I wonder if we could experiment with sending a `SIGSTOP` instead ~~or use ptrace() with PTRACE_ATTACH~~. Regarding the latter error we can probably do away with the contents of the auxiliary vector and still write a mostly complete minidump. Additionally we might ptrace the auxiliary vector directly out of the crashed process if reading the corresponding /proc file fails. I'll file bugs for both.

Edit: We already use PTRACE_ATTACH on every thread, sending it to the PID only stops that thread not the whole process but it's possible to SIGSTOP a process and then attach when the threads have already been stopped.

Back to Bug 1644486 Comment 18