Sep 16, 2011

VirtualBox in OpenIndiana suddenly doesn't start -> VBoxSVC core dumps

I upgraded to the latest version and switched also the sfe repository to

sfe                                   origin   online   http://pkg.openindiana.org/sfe/
sfe-encumbered                        origin   online   http://pkg.openindiana.org/sfe-encumbered/


After some digging ( execsnoop of DTraceToolkit ) I saw, that
VirtualBox starts VBoxSVC.

I started VBoxSVC manually and after launching VirtualBox the VBoxSVC process terminates.

Here is the pstack of the core showing the relevant thread:


-----------------  lwp# 3 / thread# 3  --------------------
 00000000003c9cc5 ???????? ()
 fffffd7fff1febc5 _SUNW_Unwind_RaiseException () + 55
 fffffd7ffdda3b69 __cxa_throw () + 59
 fffffd7ff7ae2c99 _ZN3xml4FileC1ENS0_4ModeEPKcb () + 2c9
 fffffd7ff7ae8531 _ZN3xml13XmlFileParser4readERK9RTCStringRNS_8DocumentE () + b1
 00000000006acade _ZN8settings14ConfigFileBaseC2EPKN3com7Utf8StrE () + 13e
 00000000006bcdc5 _ZN8settings14MainConfigFileC1EPKN3com7Utf8StrE () + 35
 00000000006954bd _ZN10VirtualBox4initEv () + 2dd
 0000000000696a49 _ZN10VirtualBox14FinalConstructEv () + 9
 00000000006efe9d _Z21VirtualBoxConstructorP11nsISupportsRK4nsIDPPv () + 12d
 fffffd7ff6e963ce _ZN16nsGenericFactory14CreateInstanceEP11nsISupportsRK4nsIDPPv () + 24
 fffffd7ff6e57373 _ZN22nsComponentManagerImpl14CreateInstanceERK4nsIDP11nsISupportsS2_PPv () + 175
 fffffd7ff5d9a9e1 _ZN18ipcDConnectService7OnSetupEjPK13DConnectSetupj () + af
 fffffd7ff5d9a917 _ZN18ipcDConnectService17OnIncomingRequestEjPK10DConnectOpj () + 2d
 fffffd7ff5d99071 _ZN14DConnectWorker3RunEv () + 211
 fffffd7ff6e638de _ZN8nsThread4MainEPv () + 2e
 fffffd7ff6e9487a _pt_root () + 90
 fffffd7ff6e9493f _pt_iprt_root () + c
 fffffd7ff7b1374c rtThreadMain () + 2c
 fffffd7ff7b60321 _Z18rtThreadNativeMainPv () + 81
 fffffd7fff1f6e44 _thrp_setup () + bc
 fffffd7fff1f7110 _lwp_start ()
The function where the Exception is thrown is:

[ewer@solewer:~]$echo "_ZN3xml4FileC1ENS0_4ModeEPKcb" | c++filt
xml::File::File(xml::File::Mode, char const*, bool)
A truss showed that VirtualBox.xml in $HOME/.VirtualBox is attempted to open.

Before I removed the whole .VirtualBox directory, because of starting problems. Also the backup from zfs snapshot didn't solve the problem.

I found the hint for solving the problem in a Bug for VirtualBox.

Setting the Environment LD_NODIRECT=1 sovled the problem and let
VirtualBox start.

After the first start some time it also starts without the LD_NODIRECT Variable, but anytime later it fails again.