summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2020-04-16 16:22:52 -0700
committer Steven Moreland <smoreland@google.com> 2020-04-16 17:56:57 -0700
commitb077deb700bfaf1209baf9ecfd7d03a0dc12f054 (patch)
tree902fa5f6b22eff558bf902188ca0f96a30e6a147
parentaf9652b1fb191e4637c1864bf5cd09b731536306 (diff)
libbinder: driver unfinished write error code
This fatal log used to be hidden inside of a function (Parcel::remove) which always failed, and so when it was removed, the error gained context, but I failed to include other relevant information in the log, such as the error code. Bug: 154144726 Test: m only Change-Id: I477aaee1a335a9faf8c9b249a97c979c08bc4ebf
-rw-r--r--libs/binder/IPCThreadState.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 9e89c57da3..d67ce15ca9 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -997,7 +997,11 @@ status_t IPCThreadState::talkWithDriver(bool doReceive)
if (err >= NO_ERROR) {
if (bwr.write_consumed > 0) {
if (bwr.write_consumed < mOut.dataSize())
- LOG_ALWAYS_FATAL("Driver did not consume write buffer");
+ LOG_ALWAYS_FATAL("Driver did not consume write buffer. "
+ "err: %s consumed: %zu of %zu",
+ statusToString(err).c_str(),
+ (size_t)bwr.write_consumed,
+ mOut.dataSize());
else {
mOut.setDataSize(0);
processPostWriteDerefs();