From: Jeff Tinker Date: Tue, 11 Jun 2013 18:30:21 +0000 (-0700) Subject: Prevent IPCThreadState::joinThreadPool from spinning on unexpected error X-Git-Tag: android-x86-4.4-r1~115^2~7^2~1 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0c9a590efae5c17792b8f2df1657ef79b0b66a2e;p=android-x86%2Fframeworks-native.git 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 --- 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