diff options
| author | 2021-05-25 17:55:42 +0000 | |
|---|---|---|
| committer | 2021-05-25 17:55:42 +0000 | |
| commit | faedb79fe76ee2f3304bf986de1d251e0c5d98ea (patch) | |
| tree | cab7612fa6dd1e4b955e5021805809e364e0cf47 /libs/binder/RpcServer.cpp | |
| parent | 60888bf80b0996859602bed43ad27da81aadb754 (diff) | |
| parent | 1c3b2b131b4d4c687249efe63c0a420a7aa8db1f (diff) | |
Merge changes Id4971e54,Id80da21c,Ice446ec4,If10f00de,I4f59ad60 am: 8f0b7f288c am: 1c3b2b131b
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1716634
Change-Id: Ia44ce224ee650114c8e7c4cb96d7bf22b9f54a33
Diffstat (limited to 'libs/binder/RpcServer.cpp')
| -rw-r--r-- | libs/binder/RpcServer.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/binder/RpcServer.cpp b/libs/binder/RpcServer.cpp index bff5543c9b..93f970946a 100644 --- a/libs/binder/RpcServer.cpp +++ b/libs/binder/RpcServer.cpp @@ -193,10 +193,12 @@ bool RpcServer::shutdown() { mShutdownTrigger->trigger(); while (mJoinThreadRunning || !mConnectingThreads.empty() || !mSessions.empty()) { - ALOGI("Waiting for RpcServer to shut down. Join thread running: %d, Connecting threads: " - "%zu, Sessions: %zu", - mJoinThreadRunning, mConnectingThreads.size(), mSessions.size()); - mShutdownCv.wait(_l); + if (std::cv_status::timeout == mShutdownCv.wait_for(_l, std::chrono::seconds(1))) { + ALOGE("Waiting for RpcServer to shut down (1s w/o progress). Join thread running: %d, " + "Connecting threads: " + "%zu, Sessions: %zu. Is your server deadlocked?", + mJoinThreadRunning, mConnectingThreads.size(), mSessions.size()); + } } // At this point, we know join() is about to exit, but the thread that calls |