You are not logged in.

#1 2018-07-23 14:42:30

cornacchia
Member
Registered: 2018-07-23
Posts: 6

VirtualBox segmentation fault on Gnome with Qt5.11 [SOLVED]

Greetings,
I was able to run VirtualBox with no problems until a few weeks ago, but the GUI stopped working after a system update.

I am able to start a vm from command line with the command:

$ VBoxManage startvm “MyVm”

However trying to start the GUI results in a segmentation fault:

$ virtualbox
Segmentation fault

I tried this in wayland and xorg.
Dmesg output in wayland:

VirtualBox[9568]: segfault at 7fffc9f03fc8 ip 00007f3c82b265f4 sp 00007fffc9f03f90 error 6 in libQt5Gui.so.5.11.1[7f3c82931000+574000]

Dmesg output in xorg:

VirtualBox[10831]: segfault at 7ffecd67bff8 ip 00007fbf68e21ed4 sp 00007ffecd67c000 error 6 in libQt5Core.so.5.11.1[7fbf68d5c000+4f0000]

This is the list of installed packages and relative versions:

virtualbox 5.2.16-1
virtualbox-ext-oracle 5.2.16-1
virtualbox-guest-dkms 5.2.16-1
virtualbox-guest-iso 5.2.16-1
virtualbox-guest-utils 5.2.16-1
virtualbox-host-dkms 5.2.16-1
qt5-base 5.11.1-1
qt5-declarative 5.11.1-1
qt5-x11extras 5.11.1-1
qt5-xmlpatterns 5.11.1-1
wayland 1.15.0-1
wayland-protocols 1.14-1
xorg-server-xwayland 1.20.0-9
xorg-bdftopcf 1.1-1
xorg-font-util 1.3.1-2
xorg-font-utils 7.6-5
xorg-fonts-alias 1.0.3-2
xorg-fonts-encodings 1.0.4-5
xorg-fonts-misc 1.0.3-5
xorg-mkfontdir 1.0.7-9
xorg-mkfontscale 1.1.3-1
xorg-server 1.20.0-9
xorg-server-common 1.20.0-9
xorg-server-xwayland 1.20.0-9
xorg-setxkbmap 1.3.1-2
xorg-xhost 1.0.7-2
xorg-xkbcomp 1.4.2-1
xorg-xrandr 1.5.0-1
xorg-xrdb 1.1.1-1
xorg-xset 1.2.4-1
xorgproto 2018.4-1

This is my arch version:

$ uname -a
Linux myarchpc 4.17.8-1-ARCH #1 SMP PREEMPT Wed Jul 18 09:56:24 UTC 2018 x86_64 GNU/Linux

By googling around and looking into this forum I found some similar issues like this one but in all cases the users solved their problem by uninstalling the library “qt5-wayland” which, as you can see above, is not installed in my system.
Another solution I tried to no avail was trying to startup the Virtualbox GUI with the option “-platform xcb” (or doing the same by exporting the environment variable “QT_QPA_PLATFORM=xcb”).

A coworker of mine has the same virtualbox, qt, arch versions but their GUI works. We cannot figure out what the problem is and I’m very curious about it (plus having to start the vms from command line is a little annoying).

Anyone has any clue as to what the problem could be?
Many thanks

Last edited by cornacchia (2018-08-08 07:03:40)

Offline

#2 2018-07-23 15:15:57

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,098

Re: VirtualBox segmentation fault on Gnome with Qt5.11 [SOLVED]

please post a full backtrace

Offline

#3 2018-07-23 15:33:47

cornacchia
Member
Registered: 2018-07-23
Posts: 6

Re: VirtualBox segmentation fault on Gnome with Qt5.11 [SOLVED]

Ok, I ran virtualbox with gdb to get a backtrace but I could not get to the segmentation fault because I got a "Effective UID is not root" error:

$ gdb /usr/lib/virtualbox/VirtualBox
GNU gdb (GDB) 8.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib/virtualbox/VirtualBox...(no debugging symbols found)...done.

(gdb) run

Starting program: /usr/lib/virtualbox/VirtualBox
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/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 16092) exited with code 01]
(gdb) <html><b>Effective UID is not root (euid=1000 egid=1000 uid=1000 gid=1000) (rc=-10)</b><br/><br/>Please try reinstalling VirtualBox.<br><br><!--EOM-->where: SUPR3HardenedMain
what:  2
VERR_PERMISSION_DENIED (-10) - Permission denied.
</html>

Interestingly, if I try to run virtualbox as super user the GUI starts with no segmentation faults (I found out this just now).

Offline

#4 2018-07-24 08:21:12

cornacchia
Member
Registered: 2018-07-23
Posts: 6

Re: VirtualBox segmentation fault on Gnome with Qt5.11 [SOLVED]

Ok, I looked around some more and found out how to reproduce the segmentation fault with gdb.

Sadly it looks like I do not have the debug symbols for the qt shared library.
I wasn't able to find a "debug" package in the arch repositories.

I guess I should try and build the library from source with debugging information enabled?

Here's what gdb tells me:

$ gdb /usr/lib/virtualbox/VirtualBox.so
GNU gdb (GDB) 8.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib/virtualbox/VirtualBox.so...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/lib/virtualbox/VirtualBox.so

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff73a4ad0 in ?? ()
(gdb) backtrace full
#0  0x00007ffff73a4ad0 in ?? ()
No symbol table info available.
#1  0x00007fffffffea68 in ?? ()
No symbol table info available.
#2  0x00007fffffffea7f in ?? ()
No symbol table info available.
#3  0x00007fffffffea8e in ?? ()

..... and so on

Offline

#5 2018-07-30 12:13:02

petruknisme
Member
Registered: 2015-11-24
Posts: 12

Re: VirtualBox segmentation fault on Gnome with Qt5.11 [SOLVED]

I have same problem with virtualbox 5.2.16 and KDE

[  209.379601] VirtualBox[11296]: segfault at 7ffc43f37fb8 ip 00007f19248a55f4 sp 00007ffc43f37f80 error 6 in libQt5Gui.so.5.11.1[7f19246b0000+574000]

Downgrading virtualbox not fixing the issue. Please help smile

Offline

#6 2018-07-30 13:11:56

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: VirtualBox segmentation fault on Gnome with Qt5.11 [SOLVED]

If it doesn't segfault as root, most likely there's something in your user configuration that causes this. You can confirm by testing with a newly created user with empty configuration.

Offline

#7 2018-07-30 13:48:12

cornacchia
Member
Registered: 2018-07-23
Posts: 6

Re: VirtualBox segmentation fault on Gnome with Qt5.11 [SOLVED]

ooo wrote:

If it doesn't segfault as root, most likely there's something in your user configuration that causes this. You can confirm by testing with a newly created user with empty configuration.

You are correct! Virtualbox actually starts without problems with a newly created user. Thank you for pointing that out.
Any suggestions as to which config files I should check to track down the problem?

Offline

#8 2018-07-30 14:04:22

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: VirtualBox segmentation fault on Gnome with Qt5.11 [SOLVED]

Start with any qt5 configuration obviously, I think I've seen broken/outdated theme engines cause similar issues.

You can rename entire directories to narrow down the location of the culprit configuration, and easily revert back.

Offline

#9 2018-07-30 14:37:47

cornacchia
Member
Registered: 2018-07-23
Posts: 6

Re: VirtualBox segmentation fault on Gnome with Qt5.11 [SOLVED]

ooo wrote:

Start with any qt5 configuration obviously, I think I've seen broken/outdated theme engines cause similar issues.

You can rename entire directories to narrow down the location of the culprit configuration, and easily revert back.

Thank you again. In the end I managed to make it work by tampering with the config located in

~/.config/VirtualBox/VirtualBox.xml

I replaced it with the one from the new user config folder and Virtualbox started without problems, then I took from the old config the "MachineRegistry" options to get my vms to show on the GUI.
It all works fine now.

Last edited by cornacchia (2018-07-30 14:38:19)

Offline

#10 2018-07-31 02:25:19

petruknisme
Member
Registered: 2015-11-24
Posts: 12

Re: VirtualBox segmentation fault on Gnome with Qt5.11 [SOLVED]

cornacchia wrote:
ooo wrote:

Start with any qt5 configuration obviously, I think I've seen broken/outdated theme engines cause similar issues.

You can rename entire directories to narrow down the location of the culprit configuration, and easily revert back.

Thank you again. In the end I managed to make it work by tampering with the config located in

~/.config/VirtualBox/VirtualBox.xml

I replaced it with the one from the new user config folder and Virtualbox started without problems, then I took from the old config the "MachineRegistry" options to get my vms to show on the GUI.
It all works fine now.

Thanks for your information. I will check this later.

Offline

#11 2018-08-02 07:22:22

petruknisme
Member
Registered: 2015-11-24
Posts: 12

Re: VirtualBox segmentation fault on Gnome with Qt5.11 [SOLVED]

I can confirm this is because of <ExtraData> element and not <MachineRegistry> element in my virtualbox

You can comment extradata element items like this:

<ExtraData>
<!--
      <ExtraDataItem name="GUI/LastWindowPosition" value="341,192,683,384"/>
      <ExtraDataItem name="GUI/SplitterSizes" value="227,455"/>
      <ExtraDataItem name="GUI/Statusbar" value="false"/>
      <ExtraDataItem name="GUI/Toolbar" value="false"/>
      <ExtraDataItem name="GUI/Toolbar/MachineTools/Order" value="None"/>
      <ExtraDataItem name="GUI/UpdateCheckCount" value="2"/>
      <ExtraDataItem name="GUI/UpdateDate" value="1 d, 2018-08-03, stable, 5.2.16"/>
-->
    </ExtraData>

After that, virtualbox will reset your <ExtraData> elements items and will running perfectly.

Last edited by petruknisme (2018-08-02 07:39:38)

Offline

#12 2018-08-02 07:46:24

petruknisme
Member
Registered: 2015-11-24
Posts: 12

Re: VirtualBox segmentation fault on Gnome with Qt5.11 [SOLVED]

After some diff, i can see the difference when virtualbox crash:

      <ExtraDataItem name="GUI/LastWindowPosition" value="131,164,902,467,max"/>

Removing last variable "max" will make virtualbox running again:

<ExtraDataItem name="GUI/LastWindowPosition" value="341,192,684,384"/>

CMIIW

Offline

Board footer

Powered by FluxBB