ugly, temporary, workaroung for a problem where a binder thread spins forever

Bug: 7289992
Change-Id: I0c3d482a1af57e5f444be2ba7f2751ac3e954af2
This commit is contained in:
Mathias Agopian 2012-10-05 17:28:04 -07:00
parent 0e8fcc2c27
commit 0845d0245e
1 changed files with 12 additions and 0 deletions

View File

@ -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",