summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorDave Burke <daveburke@google.com>2012-10-05 23:25:57 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-05 23:25:57 -0700
commitdba919c5f372872179cd14f8b5beeb4c22fe23c1 (patch)
tree0bfcc0dd2198d99157788ce5d274c3e8680162b4 /libs
parent9504eb915c9628e130f45019bdefda0168089886 (diff)
parent0845d0245e09548110cacb0f20e9934753388aab (diff)
downloadframeworks_native-dba919c5f372872179cd14f8b5beeb4c22fe23c1.zip
frameworks_native-dba919c5f372872179cd14f8b5beeb4c22fe23c1.tar.gz
frameworks_native-dba919c5f372872179cd14f8b5beeb4c22fe23c1.tar.bz2
Merge "ugly, temporary, workaroung for a problem where a binder thread spins forever" into jb-mr1-dev
Diffstat (limited to 'libs')
-rw-r--r--libs/binder/IPCThreadState.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 6e83faa..03c1082 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -482,6 +482,18 @@ void IPCThreadState::joinThreadPool(bool isMain)
if(result == TIMED_OUT && !isMain) {
break;
}
+
+ // HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK
+ // FIXME: we sometimes get unexplained EINVAL which causes this
+ // thread to spin forever. TEMPORARILY allow it to exit.
+ // We should probably assert on eng builds
+ if(result == -EINVAL && !isMain) {
+ ALOGE("**** THREAD %p (PID %d) ERROR (%d) LEAVING THE THREAD POOL\n",
+ (void*)pthread_self(), getpid(), result);
+ break;
+ }
+ // HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK HACK
+
} while (result != -ECONNREFUSED && result != -EBADF);
LOG_THREADPOOL("**** THREAD %p (PID %d) IS LEAVING THE THREAD POOL err=%p\n",