Here are a few steps I would take to troubleshoot this issue:
1. Generate a thread dump of the application to see the state of all threads. This will show any threads that may be blocked or in an unexpected state.
2. Analyze the thread dump to look for threads that are in a "RUNNABLE" state but not making progress. These could be spinning threads wasting CPU.
3. Check for threads blocked on locks, monitors or other synchronization primitives. These indicate possible deadlocks.
4. Trace the code path for the package management service to see where it may be spinning or blocking unexpectedly.
5. Check application and server logs for any errors or exceptions that could cause blocking
Related topics: