Linux Zygote: change some CHECK to PCHECK
We're seeing some crashes on Cluterfuzz in both the browser and the zygote during the boot sequence when reading from or writing to the Zygote's socketpair. Let's see what errors we're actually getting from the kernel. Bug: 1433569, 631824, 1396289 Change-Id: I2d169f4e31cea0178063575717d680f3e87c9091 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4482799 Auto-Submit: Matthew Denton <mpdenton@chromium.org> Commit-Queue: Robert Sesek <rsesek@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Cr-Commit-Position: refs/heads/main@{#1136543}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
c53801ed27
commit
342ae5d5c2
content
@ -197,8 +197,8 @@ pid_t ZygoteHostImpl::LaunchZygote(
|
||||
|
||||
// First we receive a message from the zygote boot process.
|
||||
base::ProcessId boot_pid;
|
||||
CHECK(ReceiveFixedMessage(fds[0], kZygoteBootMessage,
|
||||
sizeof(kZygoteBootMessage), &boot_pid));
|
||||
PCHECK(ReceiveFixedMessage(fds[0], kZygoteBootMessage,
|
||||
sizeof(kZygoteBootMessage), &boot_pid));
|
||||
|
||||
// Within the PID namespace, the zygote boot process thinks it's PID 1,
|
||||
// but its real PID can never be 1. This gives us a reliable test that
|
||||
@ -211,8 +211,8 @@ pid_t ZygoteHostImpl::LaunchZygote(
|
||||
// Now receive the message that the zygote's ready to go, along with the
|
||||
// main zygote process's ID.
|
||||
pid_t real_pid;
|
||||
CHECK(ReceiveFixedMessage(fds[0], kZygoteHelloMessage,
|
||||
sizeof(kZygoteHelloMessage), &real_pid));
|
||||
PCHECK(ReceiveFixedMessage(fds[0], kZygoteHelloMessage,
|
||||
sizeof(kZygoteHelloMessage), &real_pid));
|
||||
CHECK_GT(real_pid, 1);
|
||||
|
||||
if (real_pid != pid) {
|
||||
|
@ -133,7 +133,7 @@ bool Zygote::ProcessRequests() {
|
||||
if (!r)
|
||||
_exit(RESULT_CODE_NORMAL_EXIT);
|
||||
#else
|
||||
CHECK(r) << "Sending zygote magic failed";
|
||||
PCHECK(r) << "Sending zygote magic failed";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user