[api, heap] Report HeapStats on OOM through crash keys [v8/v8 : main]

0 views
Skip to first unread message

Dominik Inführ (Gerrit)

unread,
Oct 23, 2025, 11:25:30 AM (2 days ago) Oct 23
to Michael Lippautz, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Dominik Inführ voted and added 1 comment

Votes added by Dominik Inführ

Commit-Queue+1

1 comment

Patchset-level comments
Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I30c15351d284b1691ad2cf6e1da94d9e6c38a892
Gerrit-Change-Number: 7072272
Gerrit-PatchSet: 12
Gerrit-Owner: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Thu, 23 Oct 2025 15:25:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Oct 24, 2025, 3:47:28 AM (yesterday) Oct 24
to Dominik Inführ, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Dominik Inführ

Michael Lippautz voted and added 4 comments

Votes added by Michael Lippautz

Code-Review+1

4 comments

Patchset-level comments
File-level comment, Patchset 14 (Latest):
Michael Lippautz . resolved

lgtm, very nice!

File include/v8-callbacks.h
Line 265, Patchset 14 (Latest):enum class CrashKeySize { Size32, Size64, Size256, Size1024 };
Michael Lippautz . unresolved

I guess that's the max size on the Blink side?

File src/execution/isolate.cc
Line 7083, Patchset 14 (Latest): if (!allocate_crash_key_string_callback_) return nullptr;
Michael Lippautz . unresolved

`CHECK(HasCrashKeyStringCallbacks())`?

File src/heap/heap.cc
Line 5522, Patchset 14 (Latest): constexpr char kPrefix[] = "v8-oom-";
Michael Lippautz . unresolved

nit: Move out prefix and use in `sizeof()` as well.

Open in Gerrit

Related details

Attention is currently required from:
  • Dominik Inführ
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I30c15351d284b1691ad2cf6e1da94d9e6c38a892
Gerrit-Change-Number: 7072272
Gerrit-PatchSet: 14
Gerrit-Owner: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
Gerrit-Comment-Date: Fri, 24 Oct 2025 07:47:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Dominik Inführ (Gerrit)

unread,
Oct 24, 2025, 4:55:57 AM (yesterday) Oct 24
to Michael Lippautz, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Dominik Inführ added 2 comments

File src/execution/isolate.cc
Line 7083, Patchset 14 (Latest): if (!allocate_crash_key_string_callback_) return nullptr;
Michael Lippautz . unresolved

`CHECK(HasCrashKeyStringCallbacks())`?

Dominik Inführ

The already existing AddCrashKey() behaves like this as well. There are only 2 calls of that method which make use of that bailout, so we can easily change those locations when migration from AddCrashKey() to AddCrashKeyString(). I would see it as a convenience feature though. Otherwise we would always need to check HasCrashKeyStringCallbacks() first setting a crash key. Up to you to decide.

File src/heap/heap.cc
Line 5522, Patchset 14 (Latest): constexpr char kPrefix[] = "v8-oom-";
Michael Lippautz . resolved

nit: Move out prefix and use in `sizeof()` as well.

Dominik Inführ

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I30c15351d284b1691ad2cf6e1da94d9e6c38a892
Gerrit-Change-Number: 7072272
Gerrit-PatchSet: 14
Gerrit-Owner: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Fri, 24 Oct 2025 08:55:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Dominik Inführ (Gerrit)

unread,
Oct 24, 2025, 4:57:28 AM (yesterday) Oct 24
to Michael Lippautz, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Dominik Inführ added 1 comment

File include/v8-callbacks.h
Line 265, Patchset 14 (Latest):enum class CrashKeySize { Size32, Size64, Size256, Size1024 };
Michael Lippautz . unresolved

I guess that's the max size on the Blink side?

Dominik Inführ

Yes exactly. This enum is a copy of base::debug::CrashKeySize.

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I30c15351d284b1691ad2cf6e1da94d9e6c38a892
Gerrit-Change-Number: 7072272
Gerrit-PatchSet: 14
Gerrit-Owner: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Fri, 24 Oct 2025 08:57:23 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Michael Lippautz (Gerrit)

unread,
Oct 24, 2025, 5:35:55 AM (yesterday) Oct 24
to Dominik Inführ, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Dominik Inführ

Michael Lippautz voted and added 2 comments

Votes added by Michael Lippautz

Code-Review+1

2 comments

File include/v8-callbacks.h
Line 265, Patchset 14:enum class CrashKeySize { Size32, Size64, Size256, Size1024 };
Michael Lippautz . resolved

I guess that's the max size on the Blink side?

Dominik Inführ

Yes exactly. This enum is a copy of base::debug::CrashKeySize.

Michael Lippautz

Acknowledged

File src/execution/isolate.cc
Line 7083, Patchset 14: if (!allocate_crash_key_string_callback_) return nullptr;
Michael Lippautz . unresolved

`CHECK(HasCrashKeyStringCallbacks())`?

Dominik Inführ

The already existing AddCrashKey() behaves like this as well. There are only 2 calls of that method which make use of that bailout, so we can easily change those locations when migration from AddCrashKey() to AddCrashKeyString(). I would see it as a convenience feature though. Otherwise we would always need to check HasCrashKeyStringCallbacks() first setting a crash key. Up to you to decide.

Michael Lippautz

Ah, well, I don't have a strong opinion here.

I think the better pattern would have been
```
if (!isolate->HasCrashKeyStringCallbacks()) return;

isolate->AddCrashKeyString(...); // Assuming that this works with a CHECK()
```

If other code works with the same pattern it's fine to leave as is.

Open in Gerrit

Related details

Attention is currently required from:
  • Dominik Inführ
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I30c15351d284b1691ad2cf6e1da94d9e6c38a892
Gerrit-Change-Number: 7072272
Gerrit-PatchSet: 15
Gerrit-Owner: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Dominik Inführ <dinf...@chromium.org>
Gerrit-Comment-Date: Fri, 24 Oct 2025 09:35:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Michael Lippautz <mlip...@chromium.org>
Comment-In-Reply-To: Dominik Inführ <dinf...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Dominik Inführ (Gerrit)

unread,
Oct 24, 2025, 7:20:58 AM (yesterday) Oct 24
to Michael Lippautz, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Dominik Inführ added 1 comment

File src/execution/isolate.cc
Line 7083, Patchset 14: if (!allocate_crash_key_string_callback_) return nullptr;
Michael Lippautz . unresolved

`CHECK(HasCrashKeyStringCallbacks())`?

Dominik Inführ

The already existing AddCrashKey() behaves like this as well. There are only 2 calls of that method which make use of that bailout, so we can easily change those locations when migration from AddCrashKey() to AddCrashKeyString(). I would see it as a convenience feature though. Otherwise we would always need to check HasCrashKeyStringCallbacks() first setting a crash key. Up to you to decide.

Michael Lippautz

Ah, well, I don't have a strong opinion here.

I think the better pattern would have been
```
if (!isolate->HasCrashKeyStringCallbacks()) return;

isolate->AddCrashKeyString(...); // Assuming that this works with a CHECK()
```

If other code works with the same pattern it's fine to leave as is.

Dominik Inführ

That is reasonable imho. There are just 2 uses iiuc and they belong together. We can easily change that code. I've added the CHECK to the method.

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I30c15351d284b1691ad2cf6e1da94d9e6c38a892
Gerrit-Change-Number: 7072272
Gerrit-PatchSet: 16
Gerrit-Owner: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
Gerrit-CC: Hannes Payer <hpa...@chromium.org>
Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
Gerrit-Comment-Date: Fri, 24 Oct 2025 11:20:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Dominik Inführ (Gerrit)

unread,
Oct 24, 2025, 7:21:43 AM (yesterday) Oct 24
to Michael Lippautz, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
Attention needed from Michael Lippautz

Dominik Inführ added 1 comment

File src/execution/isolate.cc
Line 7083, Patchset 14: if (!allocate_crash_key_string_callback_) return nullptr;
Michael Lippautz . resolved

`CHECK(HasCrashKeyStringCallbacks())`?

Dominik Inführ

The already existing AddCrashKey() behaves like this as well. There are only 2 calls of that method which make use of that bailout, so we can easily change those locations when migration from AddCrashKey() to AddCrashKeyString(). I would see it as a convenience feature though. Otherwise we would always need to check HasCrashKeyStringCallbacks() first setting a crash key. Up to you to decide.

Michael Lippautz

Ah, well, I don't have a strong opinion here.

I think the better pattern would have been
```
if (!isolate->HasCrashKeyStringCallbacks()) return;

isolate->AddCrashKeyString(...); // Assuming that this works with a CHECK()
```

If other code works with the same pattern it's fine to leave as is.

Dominik Inführ

That is reasonable imho. There are just 2 uses iiuc and they belong together. We can easily change that code. I've added the CHECK to the method.

Dominik Inführ

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Lippautz
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I30c15351d284b1691ad2cf6e1da94d9e6c38a892
    Gerrit-Change-Number: 7072272
    Gerrit-PatchSet: 16
    Gerrit-Owner: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Comment-Date: Fri, 24 Oct 2025 11:21:38 +0000
    satisfied_requirement
    open
    diffy

    Dominik Inführ (Gerrit)

    unread,
    Oct 24, 2025, 9:34:37 AM (yesterday) Oct 24
    to Michael Lippautz, V8 LUCI CQ, Hannes Payer, cbruni...@chromium.org, mlippau...@chromium.org, v8-re...@googlegroups.com
    Attention needed from Michael Lippautz

    Dominik Inführ voted Commit-Queue+2

    Commit-Queue+2
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Lippautz
    Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I30c15351d284b1691ad2cf6e1da94d9e6c38a892
    Gerrit-Change-Number: 7072272
    Gerrit-PatchSet: 16
    Gerrit-Owner: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Dominik Inführ <dinf...@chromium.org>
    Gerrit-Reviewer: Michael Lippautz <mlip...@chromium.org>
    Gerrit-CC: Hannes Payer <hpa...@chromium.org>
    Gerrit-Attention: Michael Lippautz <mlip...@chromium.org>
    Gerrit-Comment-Date: Fri, 24 Oct 2025 13:34:32 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages