[vbox-dev] How to use GNU debugger on VBoxSVC ?

Alexey Eromenko al4321 at gmail.com
Mon May 11 12:00:10 GMT 2015


*Thanks for answer, Frank.*
*Still doesn't work.*

Compiler options: (hardened build + debug symbols)
'./configure --disable-libvpx --build-debug'

Then I built a package & installed it:
$ source $(pwd)/env.sh && kmk && kmk packing

Started debugger with user:
$ gdb /opt/VirtualBox/VirtualBox
...
(gdb) run
Starting program: /opt/VirtualBox/VirtualBox
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
VirtualBox: Error -10 in SUPR3HardenedMain!
VirtualBox: Effective UID is not root (euid=1000 egid=1000 uid=1000
gid=1000)

VirtualBox: Tip! It may help to reinstall VirtualBox.
[Inferior 1 (process 9763) exited with code 01]
(gdb) LOG_GROUP_MM='MM_HEAP' expects 'MM'
(gdb)



*1. Does it mean, that I cannot debug a Hardened VirtualBox with normal
user (non-root) ?2. I tried to start GDB with "root". It seems
"VBOX_ASSERT=none" doesn't work.*

root at debian7vm:~# export VBOX_ASSERT=none
root at debian7vm:~# gdb /opt/VirtualBox/VBoxSVC
(gdb) run
...
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff758674b in RTLogDefaultInit ()
    at
/home/user/VirtualBox-5.0.0_BETA2/src/VBox/Runtime/VBox/log-vbox.cpp:261
261         ASSERT_LOG_GROUP(MM);
(gdb)

Basically "VBOX_ASSERT=none" didn't help.
I did about 30 times "c".
So how to skip asserts again ?

*3. VBoxSVC exits no matter what:*

$ gdb /opt/VirtualBox/VBoxSVC

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff7586fa6 in RTLogDefaultInit ()
    at
/home/user/VirtualBox-5.0.0_BETA2/src/VBox/Runtime/VBox/log-vbox.cpp:292
292         ASSERT_LOG_GROUP(VRDP);
(gdb) c
Continuing.
Type Manifest File: /home/user/.config/VirtualBox/xpti.dat
###!!! ASSERTION: Factory creation failed: 'NS_SUCCEEDED(rv)', file
/home/user/VirtualBox-5.0.0_BETA2/src/libs/xpcom18a4/xpcom/components/nsNativeComponentLoader.cpp,
line 160
Break: at file
/home/user/VirtualBox-5.0.0_BETA2/src/libs/xpcom18a4/xpcom/components/nsNativeComponentLoader.cpp,
line 160
...
[New Thread 0x7ffff08d3700 (LWP 10905)]
###!!! ASSERTION: Factory creation failed: 'NS_SUCCEEDED(rv)', file
/home/user/VirtualBox-5.0.0_BETA2/src/libs/xpcom18a4/xpcom/components/nsNativeComponentLoader.cpp,
line 160
Break: at file
/home/user/VirtualBox-5.0.0_BETA2/src/libs/xpcom18a4/xpcom/components/nsNativeComponentLoader.cpp,
line 160
VBoxSVC: error: Failed to get IPC service!
(rc=NS_ERROR_FACTORY_NOT_REGISTERED)
[Thread 0x7ffff08d3700 (LWP 10905) exited]
XPCOM server has shutdown.
[Inferior 1 (process 10893) exited normally]
(gdb) c
The program is not being run.

*4. Running Debug build without a debugger fails instantly*

root at debian7vm:~# export VBOX_ASSERT=none
root at debian7vm:~# /opt/VirtualBox/VBoxSVC
LOG_GROUP_MM='MM_HEAP' expects 'MM'
Trace/breakpoint trap
root at debian7vm:~#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20150511/f0de1a63/attachment.html>


More information about the vbox-dev mailing list