MitchDrage opened a new issue, #14538:
URL: https://github.com/apache/cloudstack/issues/14538

   ### problem
   
   Console sessions opened while the target VM was being restarted get stuck in 
waitForNoVNCReply().
   I found that the method is while (isWaitForNoVnc()) { cycles++; }, and it 
doesn't include a sleep or timeout, and doesn't consult the websocket or VNC 
socket to confirm that it's still required.
   
   I found that qemu had already closed the VNC socket (CLOSE-WAIT on the CPVM 
side).
   Restarting the cloud service in the CPVM cleared the issue.
   
   As you'll note, the chance of this occurring is quite low as it requires 
specific timing, but these threads never clear so on busy environments this 
could start to tie up CPU cycles leading to console slowdown until an eventual 
CPVM crash.
   
   ### versions
   
   4.22.1.1
   
   ### The steps to reproduce the bug
   
   1. Open the console of a running KVM instance from the UI.
   2. Stop, start or reboot the instance (or its host) while the console is 
connecting.
   3. Watch top -H inside the CPVM.
   
   ### What to do about it?
   
   waitForNoVNCReply() needs a short sleep and a timeout, and should give up 
once the session or socket is closed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to