Dunno how to reproduce this. But I have a hunch why this may happen. Apparently, when there are a lot of pinned threads, we may call startService/stopService way too often and there may form a race condition where you start a service then stop it immediately then start again, etc. I think we need to add a debouncer so that start/stop is only called once in 500-1000ms. I believe this should help.
Dunno how to reproduce this. But I have a hunch why this may happen. Apparently, when there are a lot of pinned threads, we may call startService/stopService way too often and there may form a race condition where you start a service then stop it immediately then start again, etc. I think we need to add a debouncer so that start/stop is only called once in 500-1000ms. I believe this should help.