Opened 10 years ago
Closed 8 years ago
#13254 closed defect (obsolete)
CPU hot unplug crashes VBoxService on Linux guest
| Reported by: | abelcheung | Owned by: | |
|---|---|---|---|
| Component: | guest additions | Version: | VirtualBox 4.3.14 |
| Keywords: | Cc: | ||
| Guest type: | Linux | Host type: | other |
Description
When VBoxService on Linux guest is started without arguments (meaning cpu hotplug monitoring is enabled), it would crash immediately when VBoxManage.exe (i'm using Windows 7 host) attempts unplugcpu on host side, leading to failed hot-remove attempts. Such crash is 100% reproduceable on several different kinds of Linux guest tested so far:
- Debian Wheezy 7.6 (64 bit)
- Ubuntu 14.04 (32 bit)
- CentOS 6.5 (64 bit)
- CentOS 7.0 (64 bit)
For illustration purpose, hot-remove for CPU 3 is shown here. The bug affects any non-zero CPU cores.
Steps to reproduce:
- Enable cpu hotplug support for VM:
.\VBoxManage.exe modifyvm [UUID] --cpuhotplug on
- Turn on guest (with guest addition installed), and bring CPU offline:
echo '0' > /sys/devices/system/cpu/cpu3/online
- Attempt hot-remove CPU on host side:
.\VBoxManage.exe controlvm [UUID] unplugcpu 3
- Host command line idles for about 10 seconds, and then prints:
VBoxManage.exe: error: Hot-Remove was aborted because the CPU may still be used by the guest VBoxManage.exe: error: Details: code VBOX_E_VM_ERROR (0x80bb0003), component Console, interface IConsole, callee IUnknown VBoxManage.exe: error: Context: "HotUnplugCPU(n)" at line 135 of file VBoxManageControlVM.cpp
- At this point
VBoxServiceon Linux guest has already vanished.
When VBoxService is started with -f -v -v -v arguments, the console log is attached with this bug report. It seems to indicate VBoxService has iterated the sysfs tree but failed to find a matching CPU, and finally segfault.
Also note that no crash happens when VBoxService is started with --disable-cpuhotplug argument.
However, it is still possible to do CPU hot-remove manually afterwards. Following the sysfs path printed in attached log, one can do CPU eject manually in Linux guest:
echo '1' > /sys/devices/LNXSYSM\:00/LNXSYBUS\:00/ACPI0004\:03/LNXCPU\:03/eject
Path can differ a bit for various distro. After that. unplugcpu works fine on host:
[C:\Program Files\Oracle\VirtualBox].\VBoxManage.exe controlvm [UUID] unplugcpu 3 [C:\Program Files\Oracle\VirtualBox].\VBoxManage.exe controlvm [UUID] unplugcpu 3 VBoxManage.exe: error: CPU 3 is not attached VBoxManage.exe: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component SessionMachine, interface IMachine, callee IUnknown VBoxManage.exe: error: Context: "HotUnplugCPU(n)" at line 135 of file VBoxManageControlVM.cpp
Attachments (2)
Change History (3)
by , 10 years ago
| Attachment: | vboxservice-crash.log added |
|---|
by , 10 years ago
| Attachment: | VBox.log.1 added |
|---|
VBox.log of one of Linux guest where hot-remove CPU failed, starting from line 1182. Forget about discrepancy in drive letter, the one in bug report content has been manually edited, while this log hasn't been touched.
comment:1 by , 8 years ago
| Resolution: | → obsolete |
|---|---|
| Status: | new → closed |
Please reopen if still relevant with a recent VirtualBox release.


VBoxService crash log when executed with "-f -v -v -v"