Add a list to track unfinished tasks and dumpStackTraces
Previously exception message only prints unstarted tasks in the thread pool. We also want to know the started but unfinished tasks. Add an array list mPendingTask to track all unfinished tasks. Also dumpStackTraces() so we can tell why the task in the threadpool failed to finish on time. This will help us to find root cause of IllegalStateException in SystemServerInitThreadPool.shutdown(). Bug: 128928718 Test: Reboot device, adb logcat | grep SystemServerInitThreadPool. Force a task to sleep for 30 seconds, observe IllegalStateException with unfinished task printed and stack traces is dumped in a ANR file. Change-Id: I98ba86e58ae1f2e1ab2b3f8ea3724c6b70a796eb
Loading
Please register or sign in to comment