VirtualBox

Ticket #17396 (closed defect: invalid)

Opened 3 years ago

Last modified 2 years ago

VM does not stop if client is connected via VNC during shutdown/poweroff/stop

Reported by: Derek Evan Schrock Owned by:
Component: other Version: VirtualBox 5.2.2
Keywords: VNC Cc:
Guest type: all Host type: other

Description

On FreeBSD 11.1 amd64 with VNC support enabled if the VM is shutdown while a client is connected to the VM console via VNC the VM will become stuck in a Stopping state and does not power off and VNC server remains up.

If no VNC sessions are open during power off the VM will shutdown.

This appears to when started via virtualbox and vboxheadless (from the command line and phpvirtualbox).

The only way to get the VM to a stat where it can be interacted with is to kill the virtualbox or vboxheadless process. Once killed the VM is given an "Aborted" status.

Attachments

VBox.log Download (62.5 KB) - added by Derek Evan Schrock 3 years ago.
VBox.log the VM stops logging after an attempt to resize the console
vboxheadless.log Download (2.6 KB) - added by Derek Evan Schrock 3 years ago.
vboxheadless output containing some libvncserver messages
VBox.2.log Download (66.2 KB) - added by Quentin BUATHIER 2 years ago.
VBox.log (on Debian Stretch) the VM stops logging after an attempt to resize the console
vboxheadless.2.log Download (1.4 KB) - added by Quentin BUATHIER 2 years ago.
vboxheadless (on Debian Stretch) output containing some libvncserver messages
gdb.txt Download (18.9 KB) - added by Quentin BUATHIER 2 years ago.
gdb backtrace output (on Debian Stretch) of a stuck vboxheadless process

Change History

Changed 3 years ago by Derek Evan Schrock

VBox.log the VM stops logging after an attempt to resize the console

Changed 3 years ago by Derek Evan Schrock

vboxheadless output containing some libvncserver messages

comment:1 Changed 2 years ago by Quentin BUATHIER

The issue is also in the version 5.2.10_Debianr121806 on Debian Stretch (Kernel 4.9.0-6). It isn't on Jessie with the exact same version (compile by hand). The oldest version I did test is the 5.1.6 and it already has the issue too on Stretch and not Jessie.

To reproduce the issue, I'm just configuring a VM to enable VNC, start it, launch my VNC client and using vboxmanage to poweroff the VM. 100% reproducible.

I will attach the log of my VBox.log and vboxheadless.log too, if it could be useful.

Could it be due to the newest version of libvncserver available on Stretch?

Derek: Can you change the "Host type" of the ticket?

Last edited 2 years ago by Quentin BUATHIER (previous) (diff)

Changed 2 years ago by Quentin BUATHIER

VBox.log (on Debian Stretch) the VM stops logging after an attempt to resize the console

Changed 2 years ago by Quentin BUATHIER

vboxheadless (on Debian Stretch) output containing some libvncserver messages

comment:2 Changed 2 years ago by Quentin BUATHIER

I did use GDB to see the backtrace of VBoxHeadless when the VM is stuck and it looks like one thread is stuck in the libvncserver itself.

Thread 27 (Thread 0x7fd4f41b7700 (LWP 19607)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007fd524ddd11d in rfbClientConnectionGone () from /usr/lib/x86_64-linux-gnu/libvncserver.so.1
#2  0x00007fd524ddc65a in rfbShutdownServer () from /usr/lib/x86_64-linux-gnu/libvncserver.so.1
#3  0x00007fd52503315a in ?? () from /usr/lib/virtualbox/ExtensionPacks/VNC/linux.amd64/VBoxVNC.so

I will attach the full output of GDB

Changed 2 years ago by Quentin BUATHIER

gdb backtrace output (on Debian Stretch) of a stuck vboxheadless process

comment:3 Changed 2 years ago by Quentin BUATHIER

I opened a pull request on libvncserver to fix the issue and successfully test it on a hand-compiled version of Virtualbox.  https://github.com/LibVNC/libvncserver/pull/238

comment:4 Changed 2 years ago by vushakov

  • Status changed from new to closed
  • Resolution set to invalid

Thanks for the update. Since VBox uses host's libvncserver library I'm closing this as not a bug.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use