[fuchsia] Bail if module list is empty [crashpad/crashpad : main]

1 view
Skip to first unread message

Thomas Gales (Gerrit)

unread,
May 21, 2025, 3:43:27 PM5/21/25
to Alex Pankhurst, crashp...@chromium.org
Attention needed from Alex Pankhurst

Thomas Gales added 1 comment

File snapshot/fuchsia/process_reader_fuchsia.h
Line 114, Patchset 4: std::optional<
std::reference_wrapper<const std::vector<ProcessReaderFuchsia::Module>>>
Alex Pankhurst . resolved

I think having to use `std::reference_wrapper` here is too cumbersome. Can we either:

  • have a separate method that returns whether the modules were successfully initialized
  • store a `std::optional<std::vector<..>>` and return a `const std::optional<std::vector<...>> &`
  • use the fact an empty module list is unexpected and check for the vector being empty?
Thomas Gales

Used the fact that an empty module list is unexpected

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Pankhurst
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I569ac405bd3632ad821d50382369cb31e1f75536
Gerrit-Change-Number: 6576640
Gerrit-PatchSet: 9
Gerrit-Owner: Thomas Gales <tga...@google.com>
Gerrit-Reviewer: Alex Pankhurst <pank...@google.com>
Gerrit-Attention: Alex Pankhurst <pank...@google.com>
Gerrit-Comment-Date: Wed, 21 May 2025 19:43:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Alex Pankhurst <pank...@google.com>
unsatisfied_requirement
open
diffy

Alex Pankhurst (Gerrit)

unread,
May 21, 2025, 3:49:58 PM5/21/25
to Thomas Gales, crashp...@chromium.org
Attention needed from Thomas Gales

Alex Pankhurst added 2 comments

Patchset-level comments
File-level comment, Patchset 9 (Latest):
Alex Pankhurst . resolved

LGTM with the comment

File snapshot/fuchsia/process_snapshot_fuchsia.cc
Line 236, Patchset 9 (Latest): return false;
Alex Pankhurst . unresolved

Add a comment stating why an empty module list is unexpected and we won't be able to make a useful minidump.

Open in Gerrit

Related details

Attention is currently required from:
  • Thomas Gales
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: crashpad/crashpad
    Gerrit-Branch: main
    Gerrit-Change-Id: I569ac405bd3632ad821d50382369cb31e1f75536
    Gerrit-Change-Number: 6576640
    Gerrit-PatchSet: 9
    Gerrit-Owner: Thomas Gales <tga...@google.com>
    Gerrit-Reviewer: Alex Pankhurst <pank...@google.com>
    Gerrit-Attention: Thomas Gales <tga...@google.com>
    Gerrit-Comment-Date: Wed, 21 May 2025 19:49:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Thomas Gales (Gerrit)

    unread,
    May 21, 2025, 3:53:21 PM5/21/25
    to Mark Mentovai, Alex Pankhurst, crashp...@chromium.org
    Attention needed from Alex Pankhurst and Mark Mentovai

    Thomas Gales added 1 comment

    File snapshot/fuchsia/process_snapshot_fuchsia.cc
    Line 236, Patchset 9: return false;
    Alex Pankhurst . resolved

    Add a comment stating why an empty module list is unexpected and we won't be able to make a useful minidump.

    Thomas Gales

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Pankhurst
    • Mark Mentovai
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: crashpad/crashpad
    Gerrit-Branch: main
    Gerrit-Change-Id: I569ac405bd3632ad821d50382369cb31e1f75536
    Gerrit-Change-Number: 6576640
    Gerrit-PatchSet: 10
    Gerrit-Owner: Thomas Gales <tga...@google.com>
    Gerrit-Reviewer: Alex Pankhurst <pank...@google.com>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-Attention: Alex Pankhurst <pank...@google.com>
    Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
    Gerrit-Comment-Date: Wed, 21 May 2025 19:53:19 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Alex Pankhurst <pank...@google.com>
    unsatisfied_requirement
    open
    diffy

    Mark Mentovai (Gerrit)

    unread,
    May 21, 2025, 4:03:08 PM5/21/25
    to Thomas Gales, Alex Pankhurst, crashp...@chromium.org
    Attention needed from Alex Pankhurst and Thomas Gales

    Mark Mentovai added 5 comments

    File snapshot/fuchsia/process_reader_fuchsia.cc
    Line 21, Patchset 10 (Latest):#include <zircon/status.h>
    Mark Mentovai . unresolved

    This belongs in the section above.

    Line 180, Patchset 10 (Latest): LOG(ERROR)
    << "zx_object_get_property ZX_PROP_PROCESS_DEBUG_ADDR, return status: "
    << zx_status_get_string(status);
    Mark Mentovai . unresolved

    Use `ZX_LOG(ERROR, STATUS) << "zx_object_get_property ZX_PROP_PROCESS_DEBUG_ADDR";` instead.

    File snapshot/fuchsia/process_snapshot_fuchsia.cc
    Line 44, Patchset 10 (Latest): if (!InitializeModules()) {
    return false;
    Mark Mentovai . unresolved

    Why should this block setting up `memory_map_`?

    Line 239, Patchset 10 (Latest): return false;
    Mark Mentovai . unresolved

    Will ProcessReaderFuchsia::Modules have logged something in this case? If not, you should.

    Line 249, Patchset 10 (Latest): if (module->Initialize()) {
    Mark Mentovai . unresolved

    This behaves contrary to the documentation you provided in the header.

    What happens with your return value if ProcessReaderFuchsia::Modules gave you a module, but ModuleSnapshotElf::Initialize failed?

    What happens with your return value if ModuleSnapshotElf::Initialize fails for all modules?

    I’m not necessarily saying that one behavior is correct and another is incorrect, but your implementation and documentation need to agree.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alex Pankhurst
    • Thomas Gales
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: crashpad/crashpad
      Gerrit-Branch: main
      Gerrit-Change-Id: I569ac405bd3632ad821d50382369cb31e1f75536
      Gerrit-Change-Number: 6576640
      Gerrit-PatchSet: 10
      Gerrit-Owner: Thomas Gales <tga...@google.com>
      Gerrit-Reviewer: Alex Pankhurst <pank...@google.com>
      Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
      Gerrit-Attention: Thomas Gales <tga...@google.com>
      Gerrit-Attention: Alex Pankhurst <pank...@google.com>
      Gerrit-Comment-Date: Wed, 21 May 2025 20:03:05 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      open
      diffy

      Thomas Gales (Gerrit)

      unread,
      May 21, 2025, 4:59:58 PM5/21/25
      to Mark Mentovai, Alex Pankhurst, crashp...@chromium.org
      Attention needed from Alex Pankhurst and Mark Mentovai

      Thomas Gales added 5 comments

      File snapshot/fuchsia/process_reader_fuchsia.cc
      Line 21, Patchset 10:#include <zircon/status.h>
      Mark Mentovai . resolved

      This belongs in the section above.

      Thomas Gales

      Done


      << "zx_object_get_property ZX_PROP_PROCESS_DEBUG_ADDR, return status: "
      << zx_status_get_string(status);
      Mark Mentovai . resolved

      Use `ZX_LOG(ERROR, STATUS) << "zx_object_get_property ZX_PROP_PROCESS_DEBUG_ADDR";` instead.

      Thomas Gales

      Done

      File snapshot/fuchsia/process_snapshot_fuchsia.cc
      Line 44, Patchset 10: if (!InitializeModules()) {
      return false;
      Mark Mentovai . unresolved

      Why should this block setting up `memory_map_`?

      Thomas Gales

      Our thinking was that an error in module initialization should result in no minidump being produced, since a minidump without modules isn't very useful. Here's where Fuchsia calls this function, and would bail on the minidump if this function returns false: https://cs.opensource.google/fuchsia/fuchsia/+/main:src/developer/forensics/exceptions/handler/minidump.cc;l=147-151;drc=3af0c9b250edb3f1dc3660f0bd1f640176838719

      If you think we should handle it differently, I'm all ears

      Line 239, Patchset 10: return false;
      Mark Mentovai . resolved

      Will ProcessReaderFuchsia::Modules have logged something in this case? If not, you should.

      Thomas Gales

      Done

      Line 249, Patchset 10: if (module->Initialize()) {
      Mark Mentovai . resolved

      This behaves contrary to the documentation you provided in the header.

      What happens with your return value if ProcessReaderFuchsia::Modules gave you a module, but ModuleSnapshotElf::Initialize failed?

      What happens with your return value if ModuleSnapshotElf::Initialize fails for all modules?

      I’m not necessarily saying that one behavior is correct and another is incorrect, but your implementation and documentation need to agree.

      Thomas Gales

      Good point. Moved the check to the end of the function, so if for some reason ModuleSnapshotElf::Initialize fails for all modules we will still return false.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alex Pankhurst
      • Mark Mentovai
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: crashpad/crashpad
      Gerrit-Branch: main
      Gerrit-Change-Id: I569ac405bd3632ad821d50382369cb31e1f75536
      Gerrit-Change-Number: 6576640
      Gerrit-PatchSet: 11
      Gerrit-Owner: Thomas Gales <tga...@google.com>
      Gerrit-Reviewer: Alex Pankhurst <pank...@google.com>
      Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
      Gerrit-Attention: Alex Pankhurst <pank...@google.com>
      Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
      Gerrit-Comment-Date: Wed, 21 May 2025 20:59:56 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
      unsatisfied_requirement
      open
      diffy

      Mark Mentovai (Gerrit)

      unread,
      May 22, 2025, 10:08:05 AM5/22/25
      to Thomas Gales, Alex Pankhurst, crashp...@chromium.org
      Attention needed from Alex Pankhurst and Thomas Gales

      Mark Mentovai added 2 comments

      Commit Message
      Line 9, Patchset 11 (Latest):If Crashpad encounters an error, such as for ZX_PROP_PROCESS_DEBUG_ADDR, Crashpad should propagate an error up to the caller so that Fuchsia knows that no meaningful minidump could be produced.
      Mark Mentovai . unresolved

      Commit messages should wrap at 72 columns.

      File snapshot/fuchsia/process_snapshot_fuchsia.cc
      Line 44, Patchset 10: if (!InitializeModules()) {
      return false;
      Mark Mentovai . unresolved

      Why should this block setting up `memory_map_`?

      Thomas Gales

      Our thinking was that an error in module initialization should result in no minidump being produced, since a minidump without modules isn't very useful. Here's where Fuchsia calls this function, and would bail on the minidump if this function returns false: https://cs.opensource.google/fuchsia/fuchsia/+/main:src/developer/forensics/exceptions/handler/minidump.cc;l=147-151;drc=3af0c9b250edb3f1dc3660f0bd1f640176838719

      If you think we should handle it differently, I'm all ears

      Mark Mentovai

      Our thinking was that an error in module initialization should result in no minidump being produced, since a minidump without modules isn't very useful.

      Crashpad disagrees with this in principle.

      It’s true that a minidump without modules is less useful than one with. It’s not true that it’s useless. Having some signal that there was a crash is still valuable, even if the presence of a crash is the only signal that the minidump is carrying. Usually, though, we can find even more signal by stuffing the minidump with other information that we are able to scrape together.

      The bug you’re trying to solve is actually a good example of how this principle is working: you’re holding a batch of minidumps that aren’t as useful as you’d like them to be. Ideally, we would understand and correct that problem, to improve our coverage. If we just bailed out and refused to generate a minidump when we couldn’t figure out what modules ought to be included, you wouldn’t be holding this batch of minidumps, and you might be blissfully ignorant to the magnitude of the problem, or even the fact that there’s a problem at all.

      Adding the status logging to help understand why this is happening is uncontentious and a very good idea. You should do that.

      I don’t see a strong reason to make the system more brittle by treating failures of individual data collection activities as fatal, or by (as this patch proposes) singling out one class of data collection as more critical and more fatal than others. Why, for example, are you treating modules as critical but threads as best-effort?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alex Pankhurst
      • Thomas Gales
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: crashpad/crashpad
      Gerrit-Branch: main
      Gerrit-Change-Id: I569ac405bd3632ad821d50382369cb31e1f75536
      Gerrit-Change-Number: 6576640
      Gerrit-PatchSet: 11
      Gerrit-Owner: Thomas Gales <tga...@google.com>
      Gerrit-Reviewer: Alex Pankhurst <pank...@google.com>
      Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
      Gerrit-Attention: Thomas Gales <tga...@google.com>
      Gerrit-Attention: Alex Pankhurst <pank...@google.com>
      Gerrit-Comment-Date: Thu, 22 May 2025 14:08:02 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Thomas Gales <tga...@google.com>
      Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
      unsatisfied_requirement
      open
      diffy

      Thomas Gales (Gerrit)

      unread,
      May 22, 2025, 1:54:40 PM5/22/25
      to Mark Mentovai, Alex Pankhurst, crashp...@chromium.org
      Attention needed from Alex Pankhurst and Mark Mentovai

      Thomas Gales added 1 comment

      File snapshot/fuchsia/process_snapshot_fuchsia.cc
      Line 44, Patchset 10: if (!InitializeModules()) {
      return false;
      Mark Mentovai . unresolved

      Why should this block setting up `memory_map_`?

      Thomas Gales

      Our thinking was that an error in module initialization should result in no minidump being produced, since a minidump without modules isn't very useful. Here's where Fuchsia calls this function, and would bail on the minidump if this function returns false: https://cs.opensource.google/fuchsia/fuchsia/+/main:src/developer/forensics/exceptions/handler/minidump.cc;l=147-151;drc=3af0c9b250edb3f1dc3660f0bd1f640176838719

      If you think we should handle it differently, I'm all ears

      Mark Mentovai

      Our thinking was that an error in module initialization should result in no minidump being produced, since a minidump without modules isn't very useful.

      Crashpad disagrees with this in principle.

      It’s true that a minidump without modules is less useful than one with. It’s not true that it’s useless. Having some signal that there was a crash is still valuable, even if the presence of a crash is the only signal that the minidump is carrying. Usually, though, we can find even more signal by stuffing the minidump with other information that we are able to scrape together.

      The bug you’re trying to solve is actually a good example of how this principle is working: you’re holding a batch of minidumps that aren’t as useful as you’d like them to be. Ideally, we would understand and correct that problem, to improve our coverage. If we just bailed out and refused to generate a minidump when we couldn’t figure out what modules ought to be included, you wouldn’t be holding this batch of minidumps, and you might be blissfully ignorant to the magnitude of the problem, or even the fact that there’s a problem at all.

      Adding the status logging to help understand why this is happening is uncontentious and a very good idea. You should do that.

      I don’t see a strong reason to make the system more brittle by treating failures of individual data collection activities as fatal, or by (as this patch proposes) singling out one class of data collection as more critical and more fatal than others. Why, for example, are you treating modules as critical but threads as best-effort?

      Thomas Gales

      A couple things I think might be relevant:

      • Even without a minidump, Fuchsia will still upload a crash report. Server-side, we may still be able to extract a stack trace from the logs (Fuchsia has a lightweight program print the stack trace before passing the baton to our full crash reporting flow)
      • We're focusing on missing modules rather than threads because in practice we've found missing modules to be a frequent problem, but haven't encountered missing threads
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alex Pankhurst
      • Mark Mentovai
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: crashpad/crashpad
      Gerrit-Branch: main
      Gerrit-Change-Id: I569ac405bd3632ad821d50382369cb31e1f75536
      Gerrit-Change-Number: 6576640
      Gerrit-PatchSet: 11
      Gerrit-Owner: Thomas Gales <tga...@google.com>
      Gerrit-Reviewer: Alex Pankhurst <pank...@google.com>
      Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
      Gerrit-Attention: Alex Pankhurst <pank...@google.com>
      Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
      Gerrit-Comment-Date: Thu, 22 May 2025 17:54:37 +0000
      unsatisfied_requirement
      open
      diffy

      Thomas Gales (Gerrit)

      unread,
      May 23, 2025, 1:13:44 PM5/23/25
      to Mark Mentovai, Alex Pankhurst, crashp...@chromium.org
      Attention needed from Alex Pankhurst and Mark Mentovai

      Thomas Gales added 1 comment

      File snapshot/fuchsia/process_snapshot_fuchsia.cc
      Line 44, Patchset 10: if (!InitializeModules()) {
      return false;
      Mark Mentovai . unresolved

      Why should this block setting up `memory_map_`?

      Thomas Gales

      Our thinking was that an error in module initialization should result in no minidump being produced, since a minidump without modules isn't very useful. Here's where Fuchsia calls this function, and would bail on the minidump if this function returns false: https://cs.opensource.google/fuchsia/fuchsia/+/main:src/developer/forensics/exceptions/handler/minidump.cc;l=147-151;drc=3af0c9b250edb3f1dc3660f0bd1f640176838719

      If you think we should handle it differently, I'm all ears

      Mark Mentovai

      Our thinking was that an error in module initialization should result in no minidump being produced, since a minidump without modules isn't very useful.

      Crashpad disagrees with this in principle.

      It’s true that a minidump without modules is less useful than one with. It’s not true that it’s useless. Having some signal that there was a crash is still valuable, even if the presence of a crash is the only signal that the minidump is carrying. Usually, though, we can find even more signal by stuffing the minidump with other information that we are able to scrape together.

      The bug you’re trying to solve is actually a good example of how this principle is working: you’re holding a batch of minidumps that aren’t as useful as you’d like them to be. Ideally, we would understand and correct that problem, to improve our coverage. If we just bailed out and refused to generate a minidump when we couldn’t figure out what modules ought to be included, you wouldn’t be holding this batch of minidumps, and you might be blissfully ignorant to the magnitude of the problem, or even the fact that there’s a problem at all.

      Adding the status logging to help understand why this is happening is uncontentious and a very good idea. You should do that.

      I don’t see a strong reason to make the system more brittle by treating failures of individual data collection activities as fatal, or by (as this patch proposes) singling out one class of data collection as more critical and more fatal than others. Why, for example, are you treating modules as critical but threads as best-effort?

      Thomas Gales

      A couple things I think might be relevant:

      • Even without a minidump, Fuchsia will still upload a crash report. Server-side, we may still be able to extract a stack trace from the logs (Fuchsia has a lightweight program print the stack trace before passing the baton to our full crash reporting flow)
      • We're focusing on missing modules rather than threads because in practice we've found missing modules to be a frequent problem, but haven't encountered missing threads
      Thomas Gales

      Another consideration is if we don't plan on using the minidump, omitting it from the crash report will save on power and bandwidth

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alex Pankhurst
      • Mark Mentovai
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: crashpad/crashpad
      Gerrit-Branch: main
      Gerrit-Change-Id: I569ac405bd3632ad821d50382369cb31e1f75536
      Gerrit-Change-Number: 6576640
      Gerrit-PatchSet: 11
      Gerrit-Owner: Thomas Gales <tga...@google.com>
      Gerrit-Reviewer: Alex Pankhurst <pank...@google.com>
      Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
      Gerrit-Attention: Alex Pankhurst <pank...@google.com>
      Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
      Gerrit-Comment-Date: Fri, 23 May 2025 17:13:42 +0000
      unsatisfied_requirement
      open
      diffy

      Mark Mentovai (Gerrit)

      unread,
      May 23, 2025, 2:17:28 PM5/23/25
      to Thomas Gales, Alex Pankhurst, crashp...@chromium.org
      Attention needed from Alex Pankhurst and Thomas Gales

      Mark Mentovai added 1 comment

      File snapshot/fuchsia/process_snapshot_fuchsia.cc
      Line 44, Patchset 10: if (!InitializeModules()) {
      return false;
      Mark Mentovai . unresolved

      Why should this block setting up `memory_map_`?

      Thomas Gales

      Our thinking was that an error in module initialization should result in no minidump being produced, since a minidump without modules isn't very useful. Here's where Fuchsia calls this function, and would bail on the minidump if this function returns false: https://cs.opensource.google/fuchsia/fuchsia/+/main:src/developer/forensics/exceptions/handler/minidump.cc;l=147-151;drc=3af0c9b250edb3f1dc3660f0bd1f640176838719

      If you think we should handle it differently, I'm all ears

      Mark Mentovai

      Our thinking was that an error in module initialization should result in no minidump being produced, since a minidump without modules isn't very useful.

      Crashpad disagrees with this in principle.

      It’s true that a minidump without modules is less useful than one with. It’s not true that it’s useless. Having some signal that there was a crash is still valuable, even if the presence of a crash is the only signal that the minidump is carrying. Usually, though, we can find even more signal by stuffing the minidump with other information that we are able to scrape together.

      The bug you’re trying to solve is actually a good example of how this principle is working: you’re holding a batch of minidumps that aren’t as useful as you’d like them to be. Ideally, we would understand and correct that problem, to improve our coverage. If we just bailed out and refused to generate a minidump when we couldn’t figure out what modules ought to be included, you wouldn’t be holding this batch of minidumps, and you might be blissfully ignorant to the magnitude of the problem, or even the fact that there’s a problem at all.

      Adding the status logging to help understand why this is happening is uncontentious and a very good idea. You should do that.

      I don’t see a strong reason to make the system more brittle by treating failures of individual data collection activities as fatal, or by (as this patch proposes) singling out one class of data collection as more critical and more fatal than others. Why, for example, are you treating modules as critical but threads as best-effort?

      Thomas Gales

      A couple things I think might be relevant:

      • Even without a minidump, Fuchsia will still upload a crash report. Server-side, we may still be able to extract a stack trace from the logs (Fuchsia has a lightweight program print the stack trace before passing the baton to our full crash reporting flow)
      • We're focusing on missing modules rather than threads because in practice we've found missing modules to be a frequent problem, but haven't encountered missing threads
      Thomas Gales

      Another consideration is if we don't plan on using the minidump, omitting it from the crash report will save on power and bandwidth

      Mark Mentovai

      I’ve described how this approach would be contrary to Crashpad’s philosophy, which was set with intention. This portion of your change would cause Fuchsia’s implementation to differ from other platforms’ for what amounts to a reason of opinion. I’m not convinced.

      On the other hand, you highlighted the calling code where you were hoping to pick up this signal. Since you’re holding a `crashpad::ProcessSnapshotFuchsia` in that code, it’s trivial for you to achieve your objective right there, without having to make any changes to Crashpad:

      ```cpp
      if (process_snapshot.Modules().empty()) {
      FX_LOGS(WARNING) << "Process " << process_name << ": no modules";
      return {};
      }
      ```

      I don’t favor that approach, but in that code, you don’t need my approval.

      I still support the change you’re proposing in snapshot/fuchsia/process_reader_fuchsia.cc.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alex Pankhurst
      • Thomas Gales
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: crashpad/crashpad
      Gerrit-Branch: main
      Gerrit-Change-Id: I569ac405bd3632ad821d50382369cb31e1f75536
      Gerrit-Change-Number: 6576640
      Gerrit-PatchSet: 11
      Gerrit-Owner: Thomas Gales <tga...@google.com>
      Gerrit-Reviewer: Alex Pankhurst <pank...@google.com>
      Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
      Gerrit-Attention: Thomas Gales <tga...@google.com>
      Gerrit-Attention: Alex Pankhurst <pank...@google.com>
      Gerrit-Comment-Date: Fri, 23 May 2025 18:17:26 +0000
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages