Bug 1723941 - Fix several issues in macOS minidump generation which can lead to hangs & crashes r=KrisWright

Differential Revision: https://phabricator.services.mozilla.com/D121725
This commit is contained in:
Gabriele Svelto 2021-08-05 13:05:39 +00:00
Родитель 66288306a5
Коммит ba4eb56216
2 изменённых файлов: 5 добавлений и 8 удалений

Просмотреть файл

@ -58,17 +58,16 @@ bool CrashGenerationClient::RequestDumpForException(
message.SetData(&info, sizeof(info));
const mach_msg_timeout_t kSendTimeoutMs = 2 * 1000;
kern_return_t result = sender_.SendMessage(message, kSendTimeoutMs);
kern_return_t result = sender_.SendMessage(message, MACH_MSG_TIMEOUT_NONE);
if (result != KERN_SUCCESS)
return false;
// Give the server slightly longer to reply since it has to
// inspect this task and write the minidump.
const mach_msg_timeout_t kReceiveTimeoutMs = 5 * 1000;
MachReceiveMessage acknowledge_message;
result = acknowledge_port.WaitForMessage(&acknowledge_message,
kReceiveTimeoutMs);
MACH_MSG_TIMEOUT_NONE);
return result == KERN_SUCCESS;
}

Просмотреть файл

@ -144,12 +144,10 @@ bool CrashGenerationServer::WaitForOneMessage() {
if (ack_port != MACH_PORT_DEAD && ack_port != MACH_PORT_NULL) {
MachPortSender sender(ack_port);
MachSendMessage ack_message(kAcknowledgementMessage);
const mach_msg_timeout_t kSendTimeoutMs = 2 * 1000;
sender.SendMessage(ack_message, kSendTimeoutMs);
sender.SendMessage(ack_message, MACH_MSG_TIMEOUT_NONE);
}
if (exit_callback_) {
if (result && exit_callback_) {
exit_callback_(exit_context_, client);
}
break;