APC: Add browsertest to ensure crashed renderer is observed [chromium/src : main]

0 views
Skip to first unread message

Khushal Sagar (Gerrit)

unread,
Dec 12, 2025, 10:28:39 PM (3 days ago) Dec 12
to Mark Foltz, David Bokan, chromium...@chromium.org, chrome-intell...@chromium.org, chrome-intelligence-te...@google.com, mfoltz+wa...@chromium.org
Attention needed from David Bokan and Mark Foltz

Khushal Sagar voted and added 1 comment

Votes added by Khushal Sagar

Auto-Submit+1
Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Khushal Sagar . unresolved

The test works but I tried adding this code to induce a crash in the renderer:

--- a/third_party/blink/renderer/modules/content_extraction/ai_page_content_agent.cc
+++ b/third_party/blink/renderer/modules/content_extraction/ai_page_content_agent.cc
@@ -983,6 +983,9 @@ void AIPageContentAgent::GetAIPageContent(
GetAIPageContentCallback callback) {
base::TimeTicks start_time = base::TimeTicks::Now();

+ bool* bad = nullptr;
+ CHECK(bad);
+
LocalFrameView* view = GetSupplementable()->View();

And that doesn't result in the callback being invoked via WrapCallbackWithDefaultInvokeIfNotRun...

Open in Gerrit

Related details

Attention is currently required from:
  • David Bokan
  • Mark Foltz
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I65b33dc21d12a5f4b7ebeffde0f04e2102dc7670
Gerrit-Change-Number: 7253416
Gerrit-PatchSet: 1
Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
Gerrit-Reviewer: David Bokan <bo...@chromium.org>
Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Attention: Mark Foltz <mfo...@chromium.org>
Gerrit-Attention: David Bokan <bo...@chromium.org>
Gerrit-Comment-Date: Sat, 13 Dec 2025 03:28:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Mark Foltz (Gerrit)

unread,
Dec 15, 2025, 2:54:29 PM (19 hours ago) Dec 15
to Khushal Sagar, Chromium LUCI CQ, Mark Foltz, David Bokan, chromium...@chromium.org, chrome-intell...@chromium.org, chrome-intelligence-te...@google.com, mfoltz+wa...@chromium.org
Attention needed from David Bokan and Khushal Sagar

Mark Foltz added 1 comment

File components/optimization_guide/content/browser/page_content_proto_provider_browsertest.cc
Line 2545, Patchset 1 (Latest): GetAIPageContent(
Mark Foltz . unresolved

I think this will race with the signal sent by `child_process->Shutdown(0)` and sometimes the `GetAIPageContents` call will succeed. You may need to wait for the mojo disconnection or simulate it to get deterministic behavior.

Not sure, depends on the details of the `GetAIPageContents` implementation.

Open in Gerrit

Related details

Attention is currently required from:
  • David Bokan
  • Khushal Sagar
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I65b33dc21d12a5f4b7ebeffde0f04e2102dc7670
Gerrit-Change-Number: 7253416
Gerrit-PatchSet: 1
Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
Gerrit-Reviewer: David Bokan <bo...@chromium.org>
Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Attention: Khushal Sagar <khusha...@chromium.org>
Gerrit-Attention: David Bokan <bo...@chromium.org>
Gerrit-Comment-Date: Mon, 15 Dec 2025 19:54:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Khushal Sagar (Gerrit)

unread,
Dec 15, 2025, 3:57:38 PM (18 hours ago) Dec 15
to Chromium LUCI CQ, Mark Foltz, David Bokan, chromium...@chromium.org, chrome-intell...@chromium.org, chrome-intelligence-te...@google.com, mfoltz+wa...@chromium.org
Attention needed from David Bokan and Mark Foltz

Khushal Sagar added 1 comment

File components/optimization_guide/content/browser/page_content_proto_provider_browsertest.cc
Mark Foltz . unresolved

I think this will race with the signal sent by `child_process->Shutdown(0)` and sometimes the `GetAIPageContents` call will succeed. You may need to wait for the mojo disconnection or simulate it to get deterministic behavior.

Not sure, depends on the details of the `GetAIPageContents` implementation.

Khushal Sagar

I think this will race with the signal sent by `child_process->Shutdown(0)` and sometimes the `GetAIPageContents` call will succeed. You may need to wait for the mojo disconnection or simulate it to get deterministic behavior.

Not sure, depends on the details of the `GetAIPageContents` implementation.

GetAIPageContents is sending an IPC to each renderer. I figured sending the shutdown IPC above *before* the IPCs issued by GetAIPageContent will ensure the disconnection happens first. But I realize now that since these are using mojo interfaces which aren't associated, ordering is not guaranteed.

Hmmm, this is hard to do in a browsertest environment. Will think about this more...

Open in Gerrit

Related details

Attention is currently required from:
  • David Bokan
  • Mark Foltz
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I65b33dc21d12a5f4b7ebeffde0f04e2102dc7670
Gerrit-Change-Number: 7253416
Gerrit-PatchSet: 1
Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
Gerrit-Reviewer: David Bokan <bo...@chromium.org>
Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Attention: Mark Foltz <mfo...@chromium.org>
Gerrit-Attention: David Bokan <bo...@chromium.org>
Gerrit-Comment-Date: Mon, 15 Dec 2025 20:57:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mark Foltz <mfo...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Mark Foltz (Gerrit)

unread,
Dec 15, 2025, 6:06:04 PM (15 hours ago) Dec 15
to Khushal Sagar, Chromium LUCI CQ, Mark Foltz, David Bokan, chromium...@chromium.org, chrome-intell...@chromium.org, chrome-intelligence-te...@google.com, mfoltz+wa...@chromium.org
Attention needed from David Bokan and Khushal Sagar

Mark Foltz added 2 comments

Patchset-level comments
Mark Foltz . resolved

It's interesting that the test is only flaky on Linux/Android - the pipe destruction timing likely depends on OS specifics

File components/optimization_guide/content/browser/page_content_proto_provider_browsertest.cc
Mark Foltz . unresolved

I think this will race with the signal sent by `child_process->Shutdown(0)` and sometimes the `GetAIPageContents` call will succeed. You may need to wait for the mojo disconnection or simulate it to get deterministic behavior.

Not sure, depends on the details of the `GetAIPageContents` implementation.

Khushal Sagar

I think this will race with the signal sent by `child_process->Shutdown(0)` and sometimes the `GetAIPageContents` call will succeed. You may need to wait for the mojo disconnection or simulate it to get deterministic behavior.

Not sure, depends on the details of the `GetAIPageContents` implementation.

GetAIPageContents is sending an IPC to each renderer. I figured sending the shutdown IPC above *before* the IPCs issued by GetAIPageContent will ensure the disconnection happens first. But I realize now that since these are using mojo interfaces which aren't associated, ordering is not guaranteed.

Hmmm, this is hard to do in a browsertest environment. Will think about this more...

Mark Foltz

Are you specifically testing process crash behavior or just behavior on mojo disconnect? If the latter then you could plumb in a test API to disconnect the specific pipe for `GetAIPageContent`.

The assumption would be that renderer crash would always trigger a mojo pipe disconnect and the callback, but that seems like a safe assumption.

Open in Gerrit

Related details

Attention is currently required from:
  • David Bokan
  • Khushal Sagar
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I65b33dc21d12a5f4b7ebeffde0f04e2102dc7670
Gerrit-Change-Number: 7253416
Gerrit-PatchSet: 1
Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
Gerrit-Reviewer: David Bokan <bo...@chromium.org>
Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
Gerrit-Reviewer: Mark Foltz <mfo...@chromium.org>
Gerrit-Attention: Khushal Sagar <khusha...@chromium.org>
Gerrit-Attention: David Bokan <bo...@chromium.org>
Gerrit-Comment-Date: Mon, 15 Dec 2025 23:05:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mark Foltz <mfo...@chromium.org>
Comment-In-Reply-To: Khushal Sagar <khusha...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages