Ticket #8838 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

Compiling Boost C++ libraries with 8 threads causes VM to reboot

Reported by: kenyee Owned by:
Priority: major Component: other
Version: VirtualBox 4.0.6 Keywords:
Cc: Guest type: other
Host type: Windows

Description (last modified by frank) (diff)

VM is 64-bit Debian Squeeze running in 32-bit Vista host. Give the VM 768MB-1.3GB of memory (tried varying it to see if it would help) and run the following command to build the Boost C++ libraries:

bjam --prefix=/usr/local -j 8 --without-mpi --without-python cxxflags=--no-strict-aliasing toolset=gcc variant=release --layout=tagged link=static,shared threading=single,multi -d 2

Doing -j 2 or using the default of 1 thread seems to work fine. The VM should give an out of memory error instead of what it does now. Eventually, the Boost build will lock up so the screen in the VM goes black and your cursor is sometimes visible. Other times, the VM will spontaneously reboot. One time, I saw VirtualBox totally crash.

I think this is happening because compiling w/ multiple gcc threads is very memory and it runs out of memory. Swap is set to 720MB but it doesn't seem to be used much.


debtest_6x64-2011-05-03-14-09-18.BoostCompileHang.log Download (171.9 KB) - added by kenyee 4 years ago.

Change History

Changed 4 years ago by kenyee

comment:1 Changed 4 years ago by alanbirtles

I have seen similar problems on a Mac OS X host with an Ubuntu guest when compiling complex c++ files in parallel and running out of memory, not sure that its a virtual box problem though, could be linux that is crashing

comment:2 Changed 4 years ago by frank

There were several SMP fixes in later VBox 4.0 versions and in VBox 4.1. Is the original problem still relevant with VBox 4.0.12 / 4.1.2?

comment:3 Changed 4 years ago by kenyee

Just confirmed a compile (just a straight make instead of make -j 2) with 4.1.2 (latest VirtualBox) and it still happens. The VM has only one processor allocated to it on a dual-processor host machine.

Alan: is there any way verify that Linux ran out of memory and caused the VM to reboot? I thought Linux would degrade more gracefully (killing off gcc instead of causing the machine to reboot)...

comment:4 Changed 3 years ago by frank

Could you attach a new VBox.log file for VBox 4.1.2? Thank you!

comment:5 Changed 3 years ago by kenyee

So I'm a bit surprised, but it looks like VBox 4.1.4 has fixed this problem.

I watched vmstat and "free -m" on the VM and it looks like it's not running out of memory (what Alan mentioned), but the VM doesn't reboot any more when I do a multithreaded compile... :-)

comment:6 Changed 3 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed
  • Description modified (diff)

The Guru Meditation you observed might be fixed in the upcoming 4.1.18 release (out soon).

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use