VM crashes on built VirtualBox, but works on downloaded exe

Discussions related to using the OSE version of VirtualBox.
swguy
Posts: 20
Joined: 6. Sep 2012, 20:16

Re: VM crashes on built VirtualBox, but works on downloaded

Post by swguy »

Find attached file (compressed); this is the output of kmk build.
Attachments
kmk.log.zip
(58.68 KiB) Downloaded 26 times
swguy
Posts: 20
Joined: 6. Sep 2012, 20:16

Re: VM crashes on built VirtualBox, but works on downloaded

Post by swguy »

Any ideas...???
swguy
Posts: 20
Joined: 6. Sep 2012, 20:16

Re: VM crashes on built VirtualBox, but works on downloaded

Post by swguy »

I just noticed in GCCConfig.kmk; its using x86_64 for libgcc & also includes. Can this be a prob?

----------------- generated GCCConfig.kmk -----------------
VBOX_GCC_PATH_CC ?= /usr/bin/llvm-gcc-4.2
VBOX_GCC_PATH_CXX ?= /usr/bin/llvm-g++-4.2
VBOX_GCC_VERSION_CC ?= $(int-add $(int-mul 10000, 4), $(int-mul 100, 2), $(firstword 1 0))
VBOX_GCC_VERSION_CXX ?= $(int-add $(int-mul 10000, 4), $(int-mul 100, 2), $(firstword 1 0))
VBOX_GCC_LIBGCC ?= /usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin11/4.2.1/x86_64/libgcc.a
VBOX_GCC_Wno-pointer-sign ?= -Wno-pointer-sign
VBOX_GCC_Wno-array_bounds ?=
VBOX_GCC_Wextra ?= -Wextra
VBOX_GCC_Wlogical-op ?=
VBOX_GCC_Wno-address ?= -Wno-address
VBOX_GCC_Wno-delete-non-virtual-dtor ?=
VBOX_GCC_Wno-int-to-pointer-cast ?= -Wno-int-to-pointer-cast
VBOX_GCC_Wno-invalid-offsetof ?= -Wno-invalid-offsetof
VBOX_GCC_Wno-missing-field-initializers ?= -Wno-missing-field-initializers
VBOX_GCC_Wno-pointer-to-int-cast ?= -Wno-pointer-to-int-cast
VBOX_GCC_Wno-variadic-macros ?= -Wno-variadic-macros
VBOX_GCC_fno-stack-protector ?= -fno-stack-protector
VBOX_GCC_fno-dwarf2-cfi-asm ?=
VBOX_GCC_fdiagnostics-show-option ?= -fdiagnostics-show-option
VBOX_GCC_mtune-generic ?= -mtune=generic
VBOX_LD_as_needed ?=
VBOX_GCC_BUGGY_REGPARM ?= $(int-lt $(VBOX_GCC_VERSION_CC),30400)
ifneq ($(VBOX_GCC_VERSION_CC),)
ifneq ($(int-ge $(VBOX_GCC_VERSION_CC),40000),)
VBOX_GCC_fvisibility-hidden ?= -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT
endif
endif
ifneq ($(VBOX_GCC_VERSION_CXX),)
ifneq ($(int-ge $(VBOX_GCC_VERSION_CXX),40000),)
VBOX_GCC_fvisibility-inlines-hidden ?= -fvisibility-inlines-hidden
endif
endif
VBOX_GCC_pipe ?= -pipe
VBOX_PATH_GCC_INCS ?= /Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/include
VBOX_GCC32_PATH_CC ?= /usr/bin/llvm-gcc-4.2
VBOX_GCC32_PATH_CXX ?= /usr/bin/llvm-g++-4.2
VBOX_GCC32_VERSION_CC ?= $(int-add $(int-mul 10000, 4), $(int-mul 100, 2), $(firstword 1 0))
VBOX_GCC32_VERSION_CXX ?= $(int-add $(int-mul 10000, 4), $(int-mul 100, 2), $(firstword 1 0))
VBOX_GCC32_LIBGCC ?= /usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin11/4.2.1/x86_64/libgcc.a
VBOX_GCC32_Wno-variadic-macros ?= -Wno-variadic-macros
VBOX_LD_no_compact_linkedit ?=
-----------------------------------------
swguy
Posts: 20
Joined: 6. Sep 2012, 20:16

Re: VM crashes on built VirtualBox, but works on downloaded

Post by swguy »

Also noticed one thing...If I launch locally built virtual box; "virtual box" shows up in the Activity Manager once we launch VirtualBox.app. But if am running prebuilt binary, "virtual box" does not show up in Activity Manager. Other 2 processes are shown for both cases (2 processes - VBoxSVC & VBoxXCOMIPCD)
swguy
Posts: 20
Joined: 6. Sep 2012, 20:16

Re: VM crashes on built VirtualBox, but works on downloaded

Post by swguy »

made change in config so instead of
VBOX_GCC_LIBGCC ?= /usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin11/4.2.1/x86_64/libgcc.a
it will take regular version file...i.e.
VBOX_GCC_LIBGCC ?= /usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin11/4.2.1/libgcc.a

Unfortunately its still not working...!!
swguy
Posts: 20
Joined: 6. Sep 2012, 20:16

Re: VM crashes on built VirtualBox, but works on downloaded

Post by swguy »

Okay...so it seems loading VMMR0.r0 module is failing and thats the root cause for VM crash.

On successful launch (thru pre-built binaries), we see following line in the VBox.Log; but it does not appear when we get VM crash. So essentially, loading VMMR0.r0 is failing. ANY IDEAS????

00:00:01.370221 SUP: Loaded VMMR0.r0 (/Applications/VirtualBox.app/Contents/MacOS/VMMR0.r0) at 0x13ed020 - ModuleInit at 0000000001405850 and ModuleTerm at 0000000001405810
swguy
Posts: 20
Joined: 6. Sep 2012, 20:16

Re: VM crashes on built VirtualBox, but works on downloaded

Post by swguy »

So basically PDMR3LdrLoadVMMR0U is failing; this internally calls pdmR3LoadROU() which loads a module into the ring-0 context.

Am stuck here....any ideas are welcome!
swguy
Posts: 20
Joined: 6. Sep 2012, 20:16

Re: VM crashes on built VirtualBox, but works on downloaded

Post by swguy »

Analyzing crash dump gives me following detail for the crashing thread; but can't fig out problem here.

gdb) bt
#0 0x96b62140 in memcmp ()
#1 0x019ca2b1 in kldrModMachOQueryLinkerSymbol (pModMachO=0xb044fc98, pMod=0xb044fc98, pchSymbol=0x24b6ace "section$end$__VTG$__VTGPrLc", cchSymbol=27, puValue=0xb044fd70, BaseAddress=18894880) at kLdrModMachO.c:1659
#2 0x019ca943 in kldrModMachOObjDoImports [inlined] () at /Users/USER/Downloads/VirtualBox-4.2.0/src/libs/kStuff/kStuff/kLdr/kLdrModMachO.c:2628
#3 0x019ca943 in kldrModMachORelocateBits (pMod=0x2423670, pvBits=0x7532050, OldBaseAddress=0, pfnGetImport=0x19ab430 <rtkldrGetImportWrapper>, pvUser=0xb044fdf0, NewBaseAddress=18894880) at kLdrModMachO.c:3537
#4 0x019cbcc5 in kldrModMachOGetBits (pMod=0x2423670, pvBits=0x7532050, pfnGetImport=0x19ab430 <rtkldrGetImportWrapper>, pvUser=0xb044fdf0, BaseAddress=18894880) at kLdrModMachO.c:3521
#5 0x019aa98a in rtkldr_GetBits (pMod=0x1d73690, pvBits=0x7532050, pfnGetImport=0x19c18d0 <supLoadModuleResolveImport>, pvUser=0x18bc498) at ldrkStuff.cpp:531
#6 0x019c11d5 in supLoadModule (pszModule=0xb0450118 "H\001E?o\034?\001", pszSrvReqHandler=0x0, ppvImageBase=0xb0450da8) at SUPLib.cpp:1882
#7 0x019c1c6f in SUPR3LoadModule (pszFilename=0x1d78f00 "/Users/USER/Downloads/VirtualBox-4.2.0/out/darwin.x86/release/dist/VirtualBox.app/Contents/MacOS/../Resources/VirtualBoxVM.app/Contents/MacOS/VMMR0.r0", pszModule=0x18bc498 "VMMR0.r0", ppvImageBase=0xb0450da8, pErrInfo=0xb0450190) at SUPLib.cpp:1579
#8 0x0175d65f in pdmR3FileR3 ()
#9 0x0175cf31 in PDMR3LdrLoadVMMR0U (pUVM=0x8467000) at PDMLdr.cpp:82
#10 0x017aa060 in vmR3CreateU (pUVM=0x8467000, cCpus=1, pfnCFGMConstructor=0x7b9f638 <Console::configConstructor(VM*, void*)>, pvUserCFGM=0x241f000) at VM.cpp:595
#11 0x017ad388 in vmR3ReqProcessOneU (pUVM=0x9, pReq=0x47) at VMReq.cpp:1209
#12 0x017ad4de in VMR3ReqProcessU (pUVM=0x8467000, idDstCpu=4294967284, fPriorityOnly=false) at VMReq.cpp:1090
#13 0x017acd55 in vmR3EmulationThreadWithId (ThreadSelf=0x2422e00, pUVCpu=0x8468ca0, idCpu=0) at VMEmt.cpp:123
#14 0x017ab1df in vmR3EmulationThread (ThreadSelf=0x2422e00, pvArgs=0x8468ca0) at VMEmt.cpp:62
#15 0x0196e40e in rtThreadMain (pThread=0x2422e00, NativeThread=2957316096, pszThreadName=0x2423388 "EMT") at thread.cpp:698
#16 0x019bd06a in rtThreadNativeMain (pvArgs=0x2422e00) at thread-posix.cpp:301
#17 0x96b12ed9 in _pthread_start ()
#18 0x96b166de in thread_start ()
swguy
Posts: 20
Joined: 6. Sep 2012, 20:16

Re: VM crashes on built VirtualBox, but works on downloaded

Post by swguy »

Is this "optimization" shown below from core dump creating problem? If yes, how can I disable it??

#1 0x019ca2b1 in kldrModMachOQueryLinkerSymbol (pModMachO=0xb044fc98, pMod=0xb044fc98, pchSymbol=0x24b6ace "section$end$__VTG$__VTGPrLc", cchSymbol=27, puValue=0xb044fd70, BaseAddress=18894880) at kLdrModMachO.c:1659
1659 if ( cchSectName <= sizeof(pSect->sectname)
(gdb) p pSect->sectname
Unable to access variable "pSect"
$1 = <variable optimized away by compiler>
swguy
Posts: 20
Joined: 6. Sep 2012, 20:16

Re: VM crashes on built VirtualBox, but works on downloaded

Post by swguy »

Any ideas...????
swguy
Posts: 20
Joined: 6. Sep 2012, 20:16

Re: VM crashes on built VirtualBox, but works on downloaded

Post by swguy »

How do you create log (or debug VM)?

Tried http://www.virtualbox.org/manual/ch12.html#idp18591280 but I don't see 'Debug' menu option as doc says.

Also, tried setting VBOX_LOG along with dest dir as in https://www.virtualbox.org/wiki/VBoxLogging; but its not creating any log.

What am I missing here? am just trying to look into the crash mentioned in the thread...
swguy
Posts: 20
Joined: 6. Sep 2012, 20:16

Re: VM crashes on built VirtualBox, but works on downloaded

Post by swguy »

Got more info... But still no clue on what can be failing/changed.

----------------------------------------
VirtualBox XPCOM Server 4.2.0_OSE r43316 darwin.x86 (Sep 25 2012 12:13:23) release log
00:00:00.001679 main Log opened 2012-09-25T23:06:44.238475000Z
00:00:00.001718 main OS Product: Darwin
00:00:00.001735 main OS Release: 11.3.0
00:00:00.001752 main OS Version: Darwin Kernel Version 11.3.0: Thu Jan 12 18:48:32 PST 2012; root:xnu-1699.24.23~1/RELEASE_I386
00:00:00.003034 main DMI Product Name: Macmini2,1
00:00:00.003990 main DMI Product Version: 1.0
00:00:00.004005 main Executable: /Users/User/Downloads/VirtualBox-4.2.0/out/darwin.x86/release/dist/VirtualBox.app/Contents/MacOS/VBoxSVC
00:00:00.004006 main Process ID: 60379
00:00:00.004008 main Package type: DARWIN_32BITS_GENERIC (OSE)
00:00:00.144515 nspr-2 Loading settings file "/Users/User/Library/VirtualBox/VirtualBox.xml" with version "1.12-macosx"
00:00:00.166571 nspr-2 VDInit finished
00:00:00.166799 nspr-2 ERROR [COM]: aRC=NS_ERROR_FAILURE (0x80004005) aIID={1d7aca29-97f0-4287-9874-a60ec4f80ea6} aComponent={SystemProperties} aText={Cannot determine default Guest Additions ISO location. Most likely they are not available}, preserve=false
00:00:00.168842 nspr-2 Loading settings file "/Users/User/VirtualBox VMs/Tinycore/Tinycore.vbox" with version "1.12-macosx"
00:00:00.172973 nspr-2 Loading settings file "/Users/User/VirtualBox VMs/Test/Test.vbox" with version "1.12-macosx"
00:00:00.175244 nspr-2 Loading settings file "/Users/User/VirtualBox VMs/Empty/Empty.vbox" with version "1.12-macosx"
00:00:01.261484 nspr-3 ERROR [COM]: aRC=VBOX_E_IPRT_ERROR (0x80bb0005) aIID={22781af3-1c96-4126-9edf-67a020e0e858} aComponent={SessionMachine} aText={Saved screenshot data is not available (VERR_NOT_SUPPORTED)}, preserve=false
00:00:36.275040 main ERROR [COM]: aRC=VBOX_E_OBJECT_IN_USE (0x80bb000c) aIID={29989373-b111-4654-8493-2e1176cba890} aComponent={Medium} aText={Medium '/Users/User/VirtualBox VMs/Tinycore/Tinycore.vdi' cannot be closed because it is still attached to 1 virtual machines}, preserve=false
00:00:36.290023 main ERROR [COM]: aRC=VBOX_E_OBJECT_IN_USE (0x80bb000c) aIID={29989373-b111-4654-8493-2e1176cba890} aComponent={Medium} aText={Medium '/Users/User/VirtualBox VMs/Test/Test.vdi' cannot be closed because it is still attached to 1 virtual machines}, preserve=false
00:00:36.290280 main ERROR [COM]: aRC=VBOX_E_OBJECT_IN_USE (0x80bb000c) aIID={29989373-b111-4654-8493-2e1176cba890} aComponent={Medium} aText={Medium '/Users/User/VirtualBox VMs/Empty/Empty.vdi' cannot be closed because it is still attached to 1 virtual machines}, preserve=false
00:00:36.294058 Watcher ERROR [COM]: aRC=E_ACCESSDENIED (0x80070005) aIID={3b2f08eb-b810-4715-bee0-bb06b9880ad2} aComponent={VirtualBox} aText={The object is not ready}, preserve=false
Post Reply