[fuchsia] Log status on error for ZX_PROP_PROCESS_DEBUG_ADDR [crashpad/crashpad : main]

6 views
Skip to first unread message

Thomas Gales (Gerrit)

unread,
May 23, 2025, 2:38:56 PM5/23/25
to Mark Mentovai, Alex Pankhurst, crashp...@chromium.org
Attention needed from Alex Pankhurst and Mark Mentovai

Thomas Gales added 2 comments

Commit Message
Line 9, Patchset 11: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 . resolved

Commit messages should wrap at 72 columns.

Thomas Gales

Done

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

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.

Thomas Gales

Works for me. Pared this down to just logging the status on error.

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: 12
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 18:38:53 +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

Mark Mentovai (Gerrit)

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

Mark Mentovai voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Alex Pankhurst
  • Thomas Gales
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: 12
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:56:02 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Thomas Gales (Gerrit)

unread,
May 23, 2025, 3:18:10 PM5/23/25
to Mark Mentovai, Alex Pankhurst, crashp...@chromium.org
Attention needed from Alex Pankhurst

Thomas Gales voted Commit-Queue+2

Commit-Queue+2
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: 12
Gerrit-Owner: Thomas Gales <tga...@google.com>
Gerrit-Reviewer: Alex Pankhurst <pank...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Reviewer: Thomas Gales <tga...@google.com>
Gerrit-Attention: Alex Pankhurst <pank...@google.com>
Gerrit-Comment-Date: Fri, 23 May 2025 19:18:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Thomas Gales (Gerrit)

unread,
May 23, 2025, 3:19:14 PM5/23/25
to Joshua Peraza, Crashpad LUCI CQ, Mark Mentovai, Alex Pankhurst, crashp...@chromium.org
Attention needed from Alex Pankhurst and Joshua Peraza

Thomas Gales added 1 comment

Patchset-level comments
File-level comment, Patchset 12 (Latest):
Thomas Gales . resolved

Looks like we need 2 reviewers

Open in Gerrit

Related details

Attention is currently required from:
  • Alex Pankhurst
  • Joshua Peraza
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: 12
Gerrit-Owner: Thomas Gales <tga...@google.com>
Gerrit-Reviewer: Alex Pankhurst <pank...@google.com>
Gerrit-Reviewer: Joshua Peraza <jpe...@chromium.org>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Reviewer: Thomas Gales <tga...@google.com>
Gerrit-Attention: Joshua Peraza <jpe...@chromium.org>
Gerrit-Attention: Alex Pankhurst <pank...@google.com>
Gerrit-Comment-Date: Fri, 23 May 2025 19:19:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Joshua Peraza (Gerrit)

unread,
May 23, 2025, 3:35:14 PM5/23/25
to Thomas Gales, Crashpad LUCI CQ, Mark Mentovai, Alex Pankhurst, crashp...@chromium.org
Attention needed from Alex Pankhurst and Thomas Gales

Joshua Peraza voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Alex Pankhurst
  • Thomas Gales
Submit Requirements:
  • requirement 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: 12
Gerrit-Owner: Thomas Gales <tga...@google.com>
Gerrit-Reviewer: Alex Pankhurst <pank...@google.com>
Gerrit-Reviewer: Joshua Peraza <jpe...@chromium.org>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Reviewer: Thomas Gales <tga...@google.com>
Gerrit-Attention: Thomas Gales <tga...@google.com>
Gerrit-Attention: Alex Pankhurst <pank...@google.com>
Gerrit-Comment-Date: Fri, 23 May 2025 19:35:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Thomas Gales (Gerrit)

unread,
May 23, 2025, 3:40:36 PM5/23/25
to Joshua Peraza, Crashpad LUCI CQ, Mark Mentovai, Alex Pankhurst, crashp...@chromium.org
Attention needed from Alex Pankhurst

Thomas Gales voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention is currently required from:
  • Alex Pankhurst
Submit Requirements:
  • requirement 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: 12
Gerrit-Owner: Thomas Gales <tga...@google.com>
Gerrit-Reviewer: Alex Pankhurst <pank...@google.com>
Gerrit-Reviewer: Joshua Peraza <jpe...@chromium.org>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Reviewer: Thomas Gales <tga...@google.com>
Gerrit-Attention: Alex Pankhurst <pank...@google.com>
Gerrit-Comment-Date: Fri, 23 May 2025 19:40:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Crashpad LUCI CQ (Gerrit)

unread,
May 23, 2025, 3:50:04 PM5/23/25
to Thomas Gales, Joshua Peraza, Mark Mentovai, Alex Pankhurst, crashp...@chromium.org

Crashpad LUCI CQ submitted the change

Change information

Commit message:
[fuchsia] Log status on error for ZX_PROP_PROCESS_DEBUG_ADDR

This will help give insight as to why the error occurred.
Bug: 411717557
Change-Id: I569ac405bd3632ad821d50382369cb31e1f75536
Reviewed-by: Mark Mentovai <ma...@chromium.org>
Reviewed-by: Joshua Peraza <jpe...@chromium.org>
Commit-Queue: Thomas Gales <tga...@google.com>
Files:
  • M snapshot/fuchsia/process_reader_fuchsia.cc
Change size: XS
Delta: 1 file changed, 3 insertions(+), 1 deletion(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Mark Mentovai, +1 by Joshua Peraza
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I569ac405bd3632ad821d50382369cb31e1f75536
Gerrit-Change-Number: 6576640
Gerrit-PatchSet: 13
Gerrit-Owner: Thomas Gales <tga...@google.com>
Gerrit-Reviewer: Alex Pankhurst <pank...@google.com>
Gerrit-Reviewer: Crashpad LUCI CQ <crashpa...@luci-project-accounts.iam.gserviceaccount.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages