Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 May 2009 00:38:52 +0200 (CEST)
From:      Juergen Lock <nox@jelal.kn-bremen.de>
To:        decke@bluelife.at
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: [Call For Testing] VirtualBox for FreeBSD!
Message-ID:  <200905152238.n4FMcqR0007682@triton.kn-bremen.de>
In-Reply-To: <06c77d8650448aa63d9ce8d4b1a9c3e0.squirrel@webmail.itac.at>
References:  <20090514191237.GD70242@bsdcrew.de> <ed91d4a80905141418w52a4dcc2yf38b68b1b99e2fb6@mail.gmail.com> <ed91d4a80905141451o2b9461d1o1f4661e32e997585@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <06c77d8650448aa63d9ce8d4b1a9c3e0.squirrel@webmail.itac.at> you write:
>On Thu, May 14, 2009 11:51 pm, Artem Belevich wrote:
>> Few more notes from -CURRENT/amd64
>>
>> [snip]
>>
>> * Attempt to boot new VM (64-bit FreeBSD) from -current snapshot DVD
>> ISO results in an error:
>>
>> Failed to start the virtual machine FreeBSD.
>> Failed to load VMMR0.r0 (VERR_SYMBOL_VALUE_TOO_BIG).
>> Unknown error creating VM (VERR_SYMBOL_VALUE_TOO_BIG).
>>
>> Result Code: NS_ERROR_FAILURE (0x80004005)
>> Component: Console
>> Interface: IConsole {a7f17a42-5b64-488d-977b-4b2c639ada27}
>
>
>I cannot reproduce that anymore (probably hit another problem). Could you
>please provide what the vbox-dev people asked for to solve that problem?
>
>VBox.log from ~/.VirtualBox/Machines/<VM name>/Logs/VBox.log
>
>and start with
>
>export VBOX_LOG=+rt_ldr.e.l2.f
>VirtualBox -startvm VM_NAME
>
Hi!

 You forgot to say this needs a debug build... :)

>the resulting .log file (created in the current directory!)
>
>http://vbox.innotek.de/pipermail/vbox-dev/2009-May/001411.html
>http://vbox.innotek.de/pipermail/vbox-dev/2009-May/001413.html
>
>Thanks!

 I tried to follow up to that thread on vbox-dev but it seems to be
subscribed-only, so I'll repost here: (-emulation only, I trimmed the
other lists)

>[...]

Hi!

 I just tried vbox here and saw the same problem, so I made a debug build
(diff for the wip FreeBSD port Makefile below) and got out the following
logs:

VBox.log:

00:00:03.661 VirtualBox 2.2.51_OSE r19662 freebsd.amd64 (May 15 2009 21:17:12) release log
00:00:03.661 Log opened 2009-05-15T19:25:52.579924000Z
00:00:03.661 OS Product: FreeBSD
00:00:03.661 OS Release: 7.2-STABLE
00:00:03.661 OS Version: FreeBSD 7.2-STABLE #0: Sun May 10 19:06:01 CEST 2009     nox@triton.kn-bremen.de:/usr/obj/usr/home/nox/src72s/src/sys/TRITON
00:00:03.661 Executable: /usr/local/lib/virtualbox/VirtualBox
00:00:03.661 Process ID: 4630
00:00:03.661 Package type: BSD_64BITS_GENERIC (OSE)
00:00:03.706 
00:00:03.706 !!Assertion Failed!!
00:00:03.706 Expression: (Elf_Addr)*(int32_t *)pAddrW == Value
00:00:03.706 Location  : /usr/home/nox/vbox/virtualbox/work/virtualbox-2.2.2r19673/src/VBox/Runtime/common/ldr/ldrELFRelocatable.cpp.h(367) int rtldrELF64RelocateSection(RTLDRMODELF64RT_NOTHING*, Elf64_Addr, int (*)(RTLDRMODINTERNAL*, const char*, const char*, unsigned int, RTUINTPTR*, void*), void*, Elf64_Addr, Elf64_Size, const uint8_t*, uint8_t*, const void*, Elf64_Size)
00:00:03.706 Value=fffffffe80ac87c0

2009-05-15-19-25-48.089-VirtualBox-4630.log:

Log created: 2009-05-15T19:25:48.898420000Z
Executable: /usr/local/lib/virtualbox/VirtualBox
Arg[0]: VirtualBox
Arg[1]: -startvm
Arg[2]: fbsd72cd
RTLdrOpen: pszFilename=000000080810a040:{/usr/local/lib/virtualbox/VMMR0.r0} fFlags=0x0 enmArch=2 phLdrMod=00007fffffa99b48
rtldrELF64Open: /usr/local/lib/virtualbox/VMMR0.r0: returns VINF_SUCCESS *phLdrMod=000000080810d080
rtldrOpenWithReader: /usr/local/lib/virtualbox/VMMR0.r0: returns VINF_SUCCESS *phMod=000000080810d080
RTLdrOpen: return VINF_SUCCESS *phLdrMod
RTLdrSize: hLdrMod=000000080810d080
RTLdrSize: returns 1201440
RTLdrEnumSymbols: hLdrMod=000000080810d080 fFlags=0x0 pvBit=0000000000000000 BaseAddress=0000000000000000 pfnCallback=0000000800f961f0 pvUser=00007fffffa99b30
RTLdrEnumSymbols: returns VINF_SUCCESS
RTLdrGetBits: hLdrMod=000000080810d080 pvBits=0000000808700068 BaseAddress=fffffffe809df080 pfnGetImport=0000000800f99280 pvUser=00000008020de958
fffffffe809df4a4: R_X86_64_32S  Value=fffffffe80ac87c0 SymValue=fffffffe80ac84c0

!!Assertion Failed!!
Expression: (Elf_Addr)*(int32_t *)pAddrW == Value
Location  : /usr/home/nox/vbox/virtualbox/work/virtualbox-2.2.2r19673/src/VBox/Runtime/common/ldr/ldrELFRelocatable.cpp.h(367) int rtldrELF64RelocateSection(RTLDRMODELF64RT_NOTHING*, Elf64_Addr, int (*)(RTLDRMODINTERNAL*, const char*, const char*, unsigned int, RTUINTPTR*, void*), void*, Elf64_Addr, Elf64_Size, const uint8_t*, uint8_t*, const void*, Elf64_Size)
Value=fffffffe80ac87c0

 I suspect BaseAddress=fffffffe809df080 is the problem?

 Here comes the port diff:

Index: Makefile
===================================================================
--- Makefile	(revision 372)
+++ Makefile	(working copy)
@@ -95,10 +95,26 @@
 		${WRKSRC}/env.sh
 
 do-build:
+.if defined(WITH_DEBUG)
+	cd ${WRKSRC} && ${SH} env.sh && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk BUILD_TYPE=debug
+.else
 	cd ${WRKSRC} && ${SH} env.sh && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk
+.endif
 
 do-install:
 	${MKDIR} ${KMODDIR}
+.if defined(WITH_DEBUG)
+	${INSTALL_KLD} ${WRKSRC}/out/${KMK_ARCH}/debug/bin/vboxdrv.ko ${KMODDIR}
+
+	${MKDIR} ${PREFIX}/lib/virtualbox && \
+	(cd ${WRKSRC}/out/${KMK_ARCH}/debug/bin && ${COPYTREE_SHARE} "*.so *.gc *.r0 components" ${PREFIX}/lib/virtualbox)
+
+	${MKDIR} ${PREFIX}/bin; \
+	for f in VBoxBFE VBoxHeadless VBoxManage VBoxNetDHCP VBoxSDL VBoxSVC VBoxXPCOMIPCD VirtualBox; do \
+		${INSTALL_PROGRAM} ${WRKSRC}/out/${KMK_ARCH}/debug/bin/$$f ${PREFIX}/lib/virtualbox/$${f##*/}; \
+		${LN} -sf ${PREFIX}/lib/virtualbox/$${f##*/} ${PREFIX}/bin/$${f##*/}; \
+	done
+.else
 	${INSTALL_KLD} ${WRKSRC}/out/${KMK_ARCH}/release/bin/vboxdrv.ko ${KMODDIR}
 
 	${MKDIR} ${PREFIX}/lib/virtualbox && \
@@ -109,6 +125,7 @@
 		${INSTALL_PROGRAM} ${WRKSRC}/out/${KMK_ARCH}/release/bin/$$f ${PREFIX}/lib/virtualbox/$${f##*/}; \
 		${LN} -sf ${PREFIX}/lib/virtualbox/$${f##*/} ${PREFIX}/bin/$${f##*/}; \
 	done
+.endif
 
 	for f in VBoxBFE VBoxHeadless VBoxNetDHCP VBoxSDL VirtualBox; do \
 		${CHMOD} 4511 ${PREFIX}/lib/virtualbox/$${f##*/}; \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905152238.n4FMcqR0007682>