FOR DISCUSSION: ios: Suppress missing log for two intermediate dump keys. [crashpad/crashpad : main]

1 view
Skip to first unread message

Mark Mentovai (Gerrit)

unread,
Feb 27, 2023, 10:55:46 AM2/27/23
to Justin Cohen, Ben Hamilton, crashp...@chromium.org

Attention is currently required from: Ben Hamilton, Justin Cohen.

View Change

2 comments:

  • File snapshot/ios/module_snapshot_ios_intermediate_dump.cc:

    • Patch Set #4, Line 57:

        GetDataValueFromMap(image_data,
      Key::kSourceVersion,
      &source_version_,
      LogMissingDataValueFromMap::kDontLogIfMissing);

      This is fine: you’re not in control of every module, so you’re not in control of whether this load command will be present in every module.

  • File snapshot/ios/thread_snapshot_ios_intermediate_dump.cc:

    • Patch Set #4, Line 106:

        GetDataStringFromMap(thread_data,
      Key::kThreadName,
      &thread_name_,
      LogMissingDataValueFromMap::kDontLogIfMissing);

      Is this missing for threads that nobody set a name for, or where OS support doesn’t allow thread names to be set? Then this is fine.

      Is it missing for threads that we’re expecting to have a name set for (and where OS support allows names to be set)? Then this isn’t fine and we should investigate further.

To view, visit change 4283479. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: Ibf707fc9d7d4e15f1384e1ba7b84bc1ace3710e1
Gerrit-Change-Number: 4283479
Gerrit-PatchSet: 4
Gerrit-Owner: Justin Cohen <justi...@chromium.org>
Gerrit-Reviewer: Ben Hamilton <benha...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Attention: Ben Hamilton <benha...@google.com>
Gerrit-Attention: Justin Cohen <justi...@chromium.org>
Gerrit-Comment-Date: Mon, 27 Feb 2023 15:55:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Ben Hamilton (Gerrit)

unread,
Feb 27, 2023, 11:30:17 AM2/27/23
to Justin Cohen, Mark Mentovai, crashp...@chromium.org

Attention is currently required from: Justin Cohen, Mark Mentovai.

View Change

1 comment:

  • File snapshot/ios/thread_snapshot_ios_intermediate_dump.cc:

    • Patch Set #4, Line 106:

        GetDataStringFromMap(thread_data,
      Key::kThreadName,
      &thread_name_,
      LogMissingDataValueFromMap::kDontLogIfMissing);

To view, visit change 4283479. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: Ibf707fc9d7d4e15f1384e1ba7b84bc1ace3710e1
Gerrit-Change-Number: 4283479
Gerrit-PatchSet: 4
Gerrit-Owner: Justin Cohen <justi...@chromium.org>
Gerrit-Reviewer: Ben Hamilton <benha...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Attention: Justin Cohen <justi...@chromium.org>
Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
Gerrit-Comment-Date: Mon, 27 Feb 2023 16:30:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
Gerrit-MessageType: comment

Mark Mentovai (Gerrit)

unread,
Feb 27, 2023, 11:48:17 AM2/27/23
to Justin Cohen, Ben Hamilton, crashp...@chromium.org

Attention is currently required from: Ben Hamilton, Justin Cohen.

View Change

1 comment:

  • File snapshot/ios/thread_snapshot_ios_intermediate_dump.cc:

    • Patch Set #4, Line 106:

        GetDataStringFromMap(thread_data,
      Key::kThreadName,
      &thread_name_,
      LogMissingDataValueFromMap::kDontLogIfMissing);

    • Neither is quite the case.

To view, visit change 4283479. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: Ibf707fc9d7d4e15f1384e1ba7b84bc1ace3710e1
Gerrit-Change-Number: 4283479
Gerrit-PatchSet: 4
Gerrit-Owner: Justin Cohen <justi...@chromium.org>
Gerrit-Reviewer: Ben Hamilton <benha...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Attention: Ben Hamilton <benha...@google.com>
Gerrit-Attention: Justin Cohen <justi...@chromium.org>
Gerrit-Comment-Date: Mon, 27 Feb 2023 16:48:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Ben Hamilton <benha...@google.com>

Ben Hamilton (Gerrit)

unread,
Feb 27, 2023, 12:01:04 PM2/27/23
to Justin Cohen, Mark Mentovai, crashp...@chromium.org

Attention is currently required from: Justin Cohen, Mark Mentovai.

View Change

1 comment:

  • File snapshot/ios/thread_snapshot_ios_intermediate_dump.cc:

    • Patch Set #4, Line 106:

        GetDataStringFromMap(thread_data,
      Key::kThreadName,
      &thread_name_,
      LogMissingDataValueFromMap::kDontLogIfMissing);

    • How is it failing? The whole point of logging the kern_return_t is to help us understand what’s gone wrong.

      Good question! I don't think I have access to that data — Justin, can you help? I know you provided the raw counts here:

      https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4283479/comment/58b7da9a_19998338/

      but I don't know if there's a breakdown by error value.

      What about THREAD_IDENTIFIER_INFO?

      From Justin's graphs in the above comment thread, it looks like fetching `THREAD_IDENTIFIER_INFO` (for the key `kThreadID`) has failed 67K times since 2023-02-08, and `THREAD_EXTENDED_INFO` (for the key `kThreadName`, aka `6014` in Justin's graphs) has failed 634K times since 2023-02-08.

To view, visit change 4283479. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: Ibf707fc9d7d4e15f1384e1ba7b84bc1ace3710e1
Gerrit-Change-Number: 4283479
Gerrit-PatchSet: 4
Gerrit-Owner: Justin Cohen <justi...@chromium.org>
Gerrit-Reviewer: Ben Hamilton <benha...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Attention: Justin Cohen <justi...@chromium.org>
Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
Gerrit-Comment-Date: Mon, 27 Feb 2023 17:01:00 +0000

Justin Cohen (Gerrit)

unread,
Feb 27, 2023, 1:46:20 PM2/27/23
to Mark Mentovai, Ben Hamilton, crashp...@chromium.org

Attention is currently required from: Ben Hamilton, Mark Mentovai.

View Change

1 comment:

  • File snapshot/ios/thread_snapshot_ios_intermediate_dump.cc:

    • Patch Set #4, Line 106:

        GetDataStringFromMap(thread_data,
      Key::kThreadName,
      &thread_name_,
      LogMissingDataValueFromMap::kDontLogIfMissing);

    • > How is it failing? The whole point of logging the kern_return_t is to help us understand what’s go […]

      We don't store the kr value in the intermediate dump so we have no uma logs of the failure. We do log it to stderr -- but I don't see any evidence of this failing in our unit tess in google3 or chromium. I'm still digging.

To view, visit change 4283479. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: Ibf707fc9d7d4e15f1384e1ba7b84bc1ace3710e1
Gerrit-Change-Number: 4283479
Gerrit-PatchSet: 4
Gerrit-Owner: Justin Cohen <justi...@chromium.org>
Gerrit-Reviewer: Ben Hamilton <benha...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Attention: Ben Hamilton <benha...@google.com>
Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
Gerrit-Comment-Date: Mon, 27 Feb 2023 18:46:16 +0000

Mark Mentovai (Gerrit)

unread,
Feb 27, 2023, 2:15:51 PM2/27/23
to Justin Cohen, Ben Hamilton, crashp...@chromium.org

Attention is currently required from: Ben Hamilton, Justin Cohen.

View Change

1 comment:

  • File snapshot/ios/thread_snapshot_ios_intermediate_dump.cc:

    • Patch Set #3, Line 99:

        GetDataValueFromMap(thread_data, Key::kSuspendCount, &suspend_count_);
      GetDataValueFromMap(thread_data, Key::kPriority, &priority_);
      GetDataValueFromMap(thread_data, Key::kThreadID, &thread_id_);
      GetDataValueFromMap(
      thread_data, Key::kThreadDataAddress, &thread_specific_data_address_);

      // This key is often missing.


    • GetDataStringFromMap(thread_data,
      Key::kThreadName,
      &thread_name_,
      LogMissingDataValueFromMap::kDontLogIfMissing);

    • What's strange is kThreadName fails 8x more than kThreadId. kThreadDataAddress, kPriority, kSuspendCount all seems to fail at a similar rate, although slightly less (70%) of kThreadID. I'd expect kThread stuff to fail all at the same rate.

      see: https://screenshot.googleplex.com/AsjFyNmYgk2wGga

      and without outliers: https://screenshot.googleplex.com/3oSSg2zGsyNXUGV

      None of this means that the problem is definitely in any of the calls to `thread_info`. Those UMAs just mean that the intermediate dump didn’t have the data, which _could_ indicate a problem with a `thread_info` call, but could also point to some other failure to write that data to the intermediate dump: some other failure within `crashpad::internal::(unnamed)::WritePropertyBytes` → `crashpad::internal::IOSIntermediateDumpWriter::AddPropertyBytes`, for example. It could even have something to do with the buffering scheme.

To view, visit change 4283479. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: Ibf707fc9d7d4e15f1384e1ba7b84bc1ace3710e1
Gerrit-Change-Number: 4283479
Gerrit-PatchSet: 4
Gerrit-Owner: Justin Cohen <justi...@chromium.org>
Gerrit-Reviewer: Ben Hamilton <benha...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Attention: Ben Hamilton <benha...@google.com>
Gerrit-Attention: Justin Cohen <justi...@chromium.org>
Gerrit-Comment-Date: Mon, 27 Feb 2023 19:15:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Ben Hamilton <benha...@google.com>
Comment-In-Reply-To: Justin Cohen <justi...@chromium.org>
Gerrit-MessageType: comment

Justin Cohen (Gerrit)

unread,
Feb 27, 2023, 2:54:35 PM2/27/23
to Mark Mentovai, Ben Hamilton, crashp...@chromium.org

Attention is currently required from: Ben Hamilton, Mark Mentovai.

View Change

1 comment:

  • File snapshot/ios/thread_snapshot_ios_intermediate_dump.cc:

    • Patch Set #3, Line 99:

        GetDataValueFromMap(thread_data, Key::kSuspendCount, &suspend_count_);
      GetDataValueFromMap(thread_data, Key::kPriority, &priority_);
      GetDataValueFromMap(thread_data, Key::kThreadID, &thread_id_);
      GetDataValueFromMap(
      thread_data, Key::kThreadDataAddress, &thread_specific_data_address_);

      // This key is often missing.
      GetDataStringFromMap(thread_data,
      Key::kThreadName,
      &thread_name_,
      LogMissingDataValueFromMap::kDontLogIfMissing);

    • > What's strange is kThreadName fails 8x more than kThreadId. […]

      Here's the number of UMA entries for all the missing keys:
      https://paste.googleplex.com/6740451389341696?raw

      Around 30 keys have zero entries. Another 30 have just a few hundred. The top keys missing over a thousand are all related to thread data and module data:
       kSourceVersion (17M entries) (Module related)
      kThreadName (1M entries) (Thread related)
      kThreadID (297K entries) (Thread related)
      kThreadDataAddress (215K entries) (Thread related)
      kPriority (215K entries) (Thread related)
      kSuspendCount (214K entries) (Thread related)
      kThreadContextMemoryRegions (185K entries) (Thread related)
      kThreadState (121K entries) (Thread related)
      kModules (74K entries) (Module related)
      kFileType (19K entries) (Module related)
      kUUID (17K entries) (Module related)
      kName (14K entries) (Module related)
      kSize (13K entries) (Module related)
      kAddress (7K entries) (Module related)

To view, visit change 4283479. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: Ibf707fc9d7d4e15f1384e1ba7b84bc1ace3710e1
Gerrit-Change-Number: 4283479
Gerrit-PatchSet: 4
Gerrit-Owner: Justin Cohen <justi...@chromium.org>
Gerrit-Reviewer: Ben Hamilton <benha...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Attention: Ben Hamilton <benha...@google.com>
Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
Gerrit-Comment-Date: Mon, 27 Feb 2023 19:54:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Ben Hamilton <benha...@google.com>
Comment-In-Reply-To: Justin Cohen <justi...@chromium.org>

Justin Cohen (Gerrit)

unread,
Feb 27, 2023, 3:51:43 PM2/27/23
to Mark Mentovai, Ben Hamilton, crashp...@chromium.org

Attention is currently required from: Ben Hamilton, Mark Mentovai.

View Change

2 comments:

    • Patch Set #4, Line 57:

        GetDataValueFromMap(image_data,
      Key::kSourceVersion,
      &source_version_,
      LogMissingDataValueFromMap::kDontLogIfMissing);

    • This is fine: you’re not in control of every module, so you’re not in control of whether this load c […]

      Done

To view, visit change 4283479. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: Ibf707fc9d7d4e15f1384e1ba7b84bc1ace3710e1
Gerrit-Change-Number: 4283479
Gerrit-PatchSet: 4
Gerrit-Owner: Justin Cohen <justi...@chromium.org>
Gerrit-Reviewer: Ben Hamilton <benha...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Attention: Ben Hamilton <benha...@google.com>
Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
Gerrit-Comment-Date: Mon, 27 Feb 2023 20:51:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Reply all
Reply to author
Forward
0 new messages