Intermittent Indefinite Hang in tb-rest-client Login Method
We are experiencing an intermittent issue with the tb-rest-client (Version: 3.6.3) when used with ThingsBoard 3.6.3 Professional Edition. Approximately 1 in every 300–1000 login attempts results in the login call hanging indefinitely without throwing any exceptions. In these cases, the thread becomes blocked—observed to be stuck for 3+ hours—without any exception thrown or any indication of error in our logs.
This randomly happens ~once every few days, but I haven't previously investigated it further until now.
A py-spy stack dump (attached below) indicates that the thread is stuck during the SSL handshake phase of the login process.
Environment:
ThingsBoard: 3.6.3 Professional Edition
tb-rest-client Version: 3.6.3
Please investigate this behavior and advise on a fix or a workaround. I have implemented a temporarily workaround by externally enforcing a timout myself, but it is an ugly solution.