IMPALA-3875, on a kerberized system, when the HS2 server does the initial SASL negotiation after the open, if the client never sends any data, the read() will hang and hangs the entire server port.
- TThreadPoolServer calls getTransport() on a client from the Server
thread (the thread that does the accepts).
- TSaslServerTransport->getTransport() calls TSaslTransport->open()
- TSaslServerTransport->open() tries to negotiate SASL which calls
- If read/write blocks, the TThreadPoolServer cannot accept
- This can be demonstrated by running against a kerberos enabled cluster:
nc <impala host> <hs2 port> &
then trying to connect to the hs2 port via beeline. The beeline
connection will hang until the nc process is killed.
- Can fix by setting the underlying TSocket recvTimeout and sendTimeout
before the TSaslServerTransport->open() and reset them to 0 after
- Consider adding sasl_connect_tcp_timeout_seconds command line option (defaults to 10, 0 to disable)