Loading debuggerd/client/debuggerd_client.cpp +16 −8 Original line number Original line Diff line number Diff line Loading @@ -143,11 +143,15 @@ bool debuggerd_trigger_dump(pid_t pid, DebuggerdDumpType dump_type, unsigned int ssize_t rc = ssize_t rc = TEMP_FAILURE_RETRY(recv(set_timeout(sockfd.get()), &response, sizeof(response), MSG_TRUNC)); TEMP_FAILURE_RETRY(recv(set_timeout(sockfd.get()), &response, sizeof(response), MSG_TRUNC)); if (rc == 0) { if (rc == 0) { LOG(ERROR) << "libdebuggerd_client: failed to read response from tombstoned: timeout reached?"; LOG(ERROR) << "libdebuggerd_client: failed to read initial response from tombstoned: " << "timeout reached?"; return false; } else if (rc == -1) { PLOG(ERROR) << "libdebuggerd_client: failed to read initial response from tombstoned"; return false; return false; } else if (rc != sizeof(response)) { } else if (rc != sizeof(response)) { LOG(ERROR) LOG(ERROR) << "libdebuggerd_client: received packet of unexpected length from tombstoned while " << "libdebuggerd_client: received packet of unexpected length from tombstoned: expected " "reading initial response: expected " << sizeof(response) << ", received " << rc; << sizeof(response) << ", received " << rc; return false; return false; } } Loading @@ -164,11 +168,15 @@ bool debuggerd_trigger_dump(pid_t pid, DebuggerdDumpType dump_type, unsigned int rc = TEMP_FAILURE_RETRY(recv(set_timeout(sockfd.get()), &response, sizeof(response), MSG_TRUNC)); rc = TEMP_FAILURE_RETRY(recv(set_timeout(sockfd.get()), &response, sizeof(response), MSG_TRUNC)); if (rc == 0) { if (rc == 0) { LOG(ERROR) << "libdebuggerd_client: failed to read response from tombstoned: timeout reached?"; LOG(ERROR) << "libdebuggerd_client: failed to read status response from tombstoned: " "timeout reached?"; return false; } else if (rc == -1) { PLOG(ERROR) << "libdebuggerd_client: failed to read status response from tombstoned"; return false; return false; } else if (rc != sizeof(response)) { } else if (rc != sizeof(response)) { LOG(ERROR) LOG(ERROR) << "libdebuggerd_client: received packet of unexpected length from tombstoned while " << "libdebuggerd_client: received packet of unexpected length from tombstoned: expected " "reading confirmation response: expected " << sizeof(response) << ", received " << rc; << sizeof(response) << ", received " << rc; return false; return false; } } Loading Loading
debuggerd/client/debuggerd_client.cpp +16 −8 Original line number Original line Diff line number Diff line Loading @@ -143,11 +143,15 @@ bool debuggerd_trigger_dump(pid_t pid, DebuggerdDumpType dump_type, unsigned int ssize_t rc = ssize_t rc = TEMP_FAILURE_RETRY(recv(set_timeout(sockfd.get()), &response, sizeof(response), MSG_TRUNC)); TEMP_FAILURE_RETRY(recv(set_timeout(sockfd.get()), &response, sizeof(response), MSG_TRUNC)); if (rc == 0) { if (rc == 0) { LOG(ERROR) << "libdebuggerd_client: failed to read response from tombstoned: timeout reached?"; LOG(ERROR) << "libdebuggerd_client: failed to read initial response from tombstoned: " << "timeout reached?"; return false; } else if (rc == -1) { PLOG(ERROR) << "libdebuggerd_client: failed to read initial response from tombstoned"; return false; return false; } else if (rc != sizeof(response)) { } else if (rc != sizeof(response)) { LOG(ERROR) LOG(ERROR) << "libdebuggerd_client: received packet of unexpected length from tombstoned while " << "libdebuggerd_client: received packet of unexpected length from tombstoned: expected " "reading initial response: expected " << sizeof(response) << ", received " << rc; << sizeof(response) << ", received " << rc; return false; return false; } } Loading @@ -164,11 +168,15 @@ bool debuggerd_trigger_dump(pid_t pid, DebuggerdDumpType dump_type, unsigned int rc = TEMP_FAILURE_RETRY(recv(set_timeout(sockfd.get()), &response, sizeof(response), MSG_TRUNC)); rc = TEMP_FAILURE_RETRY(recv(set_timeout(sockfd.get()), &response, sizeof(response), MSG_TRUNC)); if (rc == 0) { if (rc == 0) { LOG(ERROR) << "libdebuggerd_client: failed to read response from tombstoned: timeout reached?"; LOG(ERROR) << "libdebuggerd_client: failed to read status response from tombstoned: " "timeout reached?"; return false; } else if (rc == -1) { PLOG(ERROR) << "libdebuggerd_client: failed to read status response from tombstoned"; return false; return false; } else if (rc != sizeof(response)) { } else if (rc != sizeof(response)) { LOG(ERROR) LOG(ERROR) << "libdebuggerd_client: received packet of unexpected length from tombstoned while " << "libdebuggerd_client: received packet of unexpected length from tombstoned: expected " "reading confirmation response: expected " << sizeof(response) << ", received " << rc; << sizeof(response) << ", received " << rc; return false; return false; } } Loading