When SYSTEM.CATALOG region server is restarted and the server is experiencing heavy metadata call volume.
The stack traces indicate that all the default handler pool threads are waiting for the CQSI.init thread to finish initializing.
The CQSI.init thread itself cannot proceed since it cannot complete the second RPC call (org.apache.phoenix.query.ConnectionQueryServicesImpl.checkClientServerCompatibility) due to thread starvation.
The following code turned the getTable(..) into needing an additional server-to-server RPC call when initializing a PhoenixConnection (CQSI.init) for the first time on the JVM.
It is well-known that server-to-server RPC calls are prone to deadlocking due to thread pool exhaustion.