You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Console proxy threads spin at 100% CPU in NoVncClient.waitForNoVNCReply() when noVNC never replies #14538
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
Open the console of a running KVM instance from the UI.
Stop, start or reboot the instance (or its host) while the console is connecting.
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.
Hi, I had also noticed this problem. I've been working on a fix for a few days, and the unit tests I wrote for it pass. I'll probably open a PR with the fix if the CloudStack team agrees the change is needed.
Activity
Daniel-Pereira-Linux commentedon Oct 30, 2026
Hi, I had also noticed this problem. I've been working on a fix for a few days, and the unit tests I wrote for it pass. I'll probably open a PR with the fix if the CloudStack team agrees the change is needed.
console-proxy: stop busy-spinning in NoVncClient.waitForNoVNCReply