VirtualBox

Opened 9 years ago

Closed 7 years ago

#14481 closed defect (fixed)

std::bad_alloc when starting VBoxHeadless

Reported by: Pallieter Owned by:
Component: other Version: VirtualBox 5.0.2
Keywords: Cc:
Guest type: Linux Host type: Linux

Description

Exact same commands with the same OVA 2.0 import (exported from a 5.0.3 version on Windows 10) for a non-root user gives:

terminate called after throwing an instance of 'std::bad_alloc'

what(): std::bad_alloc

while some other OVA files do work properly under the non-root account on CentOS 7 (uname -a gives: Linux server1 3.10.0-229.7.2.el7.x86_64 #1 SMP Tue Jun 23 22:06:11 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux).

/etc/group (partially):

root:x:0: vboxusers:x:996:virtualbox virtualbox:x:1001:

I do not mind sharing the OVA, but only privately to a person individually (as the OVA does contain private details).

Attachments (2)

cli_log.txt (2.6 KB ) - added by Pallieter 9 years ago.
CLI Log
SERPTool.vbox (9.3 KB ) - added by Pallieter 9 years ago.
VBOX XML file

Download all attachments as: .zip

Change History (10)

by Pallieter, 9 years ago

Attachment: cli_log.txt added

CLI Log

by Pallieter, 9 years ago

Attachment: SERPTool.vbox added

VBOX XML file

comment:1 by Pallieter, 9 years ago

comment:2 by Frank Mehnert, 9 years ago

What's the reason for mentioning "non-root"? The normal way is to start VirtualBox as non-root user. As far as I understand you start a VM with VBoxHeadless and this process aborts with the mentioned exception. First, is this problem reproducible and second, is there any difference if you start the VM as root user?

comment:3 by Pallieter, 8 years ago

The name of the bug report should indeed be something like: 64 bit VMs give a "what(): std::bad_alloc" error when started with VBoxHeadless. Doing the same as root gives the same error.

Update: Oracle VM VirtualBox Headless Interface 5.0.14 gives the same error (on a completely different and freshly installed minimal CentOS 7.2.1511), so the problem is not yet solved and can be reproduced.

comment:4 by Frank Mehnert, 8 years ago

Summary: non-root user std::bad_allocstd::bad_alloc when starting VBoxHeadless

As VBoxHeadless aborts with std::bad_alloc() I would like to see a core dump. If you can provide one, please contact me via privat email at frank _dot_ mehnert _at_ oracle _dot_ com. I cannot provide you a server for uploading the file so if you could provide me an URL I would fetch it from there.

Which package are you using, is this the EL7 package from download.virtualbox.org/virtualbox/5.0.14?

comment:5 by Pallieter, 8 years ago

I've now upgraded the server (yum -y upgrade) to VirtualBox 5.0.20r106931 and get the same error (and the same workaround still works).

I have this enabled, so our core dumps are not local:

cat /proc/sys/kernel/core_pattern 
|/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e %P %I

Thus running "VBoxHeadless --startvm ”ADFS3” --vrde=off" still outputs:

Oracle VM VirtualBox Headless Interface 5.0.20
(C) 2008-2016 Oracle Corporation
All rights reserved.

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)

But doing "startx" and in the GUI right-clicking the VM and selecting "Start" and "Headless start", results in a running VM.

My repository is (cat /etc/yum.repos.d/virtualbox.repo):

[virtualbox]
name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc

comment:6 by Pallieter, 8 years ago

New situation that leads to the same bug:

  • yum upgrade
  • yum install gcc kernel-devel kernel-headers dkms wget
  • cd /etc/yum.repos.d/
  • wget http://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
  • yum install VirtualBox-5.0
  • useradd virtualbox
  • usermod -G vboxusers virtualbox
  • reboot
  • /sbin/rcvboxdrv setup
  • cd /home/virtualbox; mkdir iso; mkdir ova; mkdir vms
  • VBoxManage setproperty machinefolder /home/virtualbox/vms
  • VBoxManage createvm --name "CentOS7Test" --register
  • VBoxManage modifyvm "CentOS7Test" --memory 4096 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 em1 --ostype RedHat_64 --biosbootmenu menuonly regi--pagefusion on --groups /CentOS,/Templates --vrdeport 3214
  • VBoxManage modifyvm "CentOS7Test" --memory 4096 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 em1 --ostype RedHat_64 --biosbootmenu menuonly --pagefusion on --groups /CentOS,/Templates --vrdeport 3214
  • VBoxManage createvdi --filename /home/virtualbox/vms/CentOS7Test/disk.vdi --size 1000000 --format VDI --variant Standard
  • VBoxManage storagectl "CentOS7Test" --name "IDE Controller" --add ide
  • VBoxManage storageattach "CentOS7Test" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium /home/virtualbox/vms/CentOS7Test/disk.vdi
  • wget http://mirror/ftp/pub/os/Linux/distr/CentOS/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso
  • VBoxManage storageattach "CentOS7Test" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium /home/virtualbox/iso/CentOS-7-x86_64-Minimal-1511.iso
  • VBoxManage showvminfo “CentOS7Test” --details | grep IDE

All went well, except the last command:

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

comment:7 by Pallieter, 7 years ago

In the latest version it is working, so this bug has been resolved (I can not reproduce it anymore). Thanks!

comment:8 by Frank Mehnert, 7 years ago

Resolution: fixed
Status: newclosed

Thank you very much for the information!

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use