summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Tinker <jtinker@google.com>2013-06-11 11:30:21 -0700
committerJeff Tinker <jtinker@google.com>2013-06-11 18:03:01 -0700
commitef07386e2fca73680214ececc3c9c0ecbb0f6d88 (patch)
tree3412be488fcd05ff8af86f1e528a6fd9bc36ebc0
parent23dacde4b624921df4f2c9646d20ca7acae357b6 (diff)
downloadnative-ef07386e2fca73680214ececc3c9c0ecbb0f6d88.tar.gz
Prevent IPCThreadState::joinThreadPool from spinning on unexpected error
Adds logging to help determine what is happening to the /dev/binder fd and dump the process state when it happens. bug: 8912673 Change-Id: I2aa0c66fc499e91e0bf9ee4ae20404bec35adc82
-rw-r--r--libs/binder/IPCThreadState.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 6e83faab7e..2ffa92779e 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -466,6 +466,10 @@ void IPCThreadState::joinThreadPool(bool isMain)
result = executeCommand(cmd);
+ } else if (result != TIMED_OUT && result != -ECONNREFUSED && result != -EBADF) {
+ ALOGE("talkWithDriver(fd=%d) returned unexpected error %d, aborting",
+ mProcess->mDriverFD, result);
+ abort();
}
// After executing the command, ensure that the thread is returned to the