summaryrefslogtreecommitdiff
path: root/libs/binder/RpcSession.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2022-03-10 23:11:56 +0000
committer Steven Moreland <smoreland@google.com> 2022-03-10 23:16:49 +0000
commit25d9cc5a410e9f3972c11100cceeecf0db86a572 (patch)
treed4dc82e6865cfd4a147dc302873bd8916803632f /libs/binder/RpcSession.cpp
parent2362edf7a6c9c7d756d6e573c4d44837e16fed36 (diff)
libbinder: RPC clarify thread exhaustion log
This log used the old 'client' 'server' terminology which in this context was disambiguated to 'incoming' and 'outcoming' threads, and it also now says what to do when threads are exhausted. Note: as you can see from this log, RpcServer still needs a way to limit the number of outgoing connections that it will create. Fixes: 220177986 Test: binderRpcTest Change-Id: Ib4c6bf654acd4a33d054d134ed578b40a976c314
Diffstat (limited to 'libs/binder/RpcSession.cpp')
-rw-r--r--libs/binder/RpcSession.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/libs/binder/RpcSession.cpp b/libs/binder/RpcSession.cpp
index e79cb86ffa..d40778a3d8 100644
--- a/libs/binder/RpcSession.cpp
+++ b/libs/binder/RpcSession.cpp
@@ -853,10 +853,16 @@ status_t RpcSession::ExclusiveConnection::find(const sp<RpcSession>& session, Co
}
if (session->mConnections.mOutgoing.size() == 0) {
- ALOGE("Session has no client connections. This is required for an RPC server to make "
- "any non-nested (e.g. oneway or on another thread) calls. Use: %d. Server "
- "connections: %zu",
- static_cast<int>(use), session->mConnections.mIncoming.size());
+ ALOGE("Session has no outgoing connections. This is required for an RPC server to make "
+ "any non-nested (e.g. oneway or on another thread) calls. Use code request "
+ "reason: %d. Incoming connections: %zu. %s.",
+ static_cast<int>(use), session->mConnections.mIncoming.size(),
+ (session->server()
+ ? "This is a server session, so see RpcSession::setMaxIncomingThreads "
+ "for the corresponding client"
+ : "This is a client session, so see RpcSession::setMaxOutgoingThreads "
+ "for this client or RpcServer::setMaxThreads for the corresponding "
+ "server"));
return WOULD_BLOCK;
}