summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-09-10 00:38:25 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-09-10 00:38:25 +0000
commiteaf71ed468898ddbdb749f92b5c6aa63a8a4554e (patch)
tree4fd44df7556afb4f0bc8419eb9190729f3c93d62
parente5164efe89bf21f76e68402f6589c8afc7e3bce9 (diff)
parentd08d9dea7d908c6b1afadb63f7a604f0f12ad209 (diff)
Merge "Add some error logs for FdTrigger errors" into main
-rw-r--r--libs/binder/FdTrigger.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/binder/FdTrigger.cpp b/libs/binder/FdTrigger.cpp
index 455a4338e5..f0aa801d01 100644
--- a/libs/binder/FdTrigger.cpp
+++ b/libs/binder/FdTrigger.cpp
@@ -82,7 +82,9 @@ status_t FdTrigger::triggerablePoll(const android::RpcTransportFd& transportFd,
int ret = TEMP_FAILURE_RETRY(poll(pfd, countof(pfd), -1));
if (ret < 0) {
- return -errno;
+ int saved_errno = errno;
+ ALOGE("FdTrigger poll returned error: %d, with error: %s", ret, strerror(saved_errno));
+ return -saved_errno;
}
LOG_ALWAYS_FATAL_IF(ret == 0, "poll(%d) returns 0 with infinite timeout", transportFd.fd.get());
@@ -106,6 +108,7 @@ status_t FdTrigger::triggerablePoll(const android::RpcTransportFd& transportFd,
// POLLNVAL: invalid FD number, e.g. not opened.
if (pfd[0].revents & POLLNVAL) {
+ ALOGE("Invalid FD number (%d) in FdTrigger (POLLNVAL)", pfd[0].fd);
return BAD_VALUE;
}