You are not logged in.

#1 2012-09-10 06:13:18

dkg
Member
Registered: 2012-09-05
Posts: 31

[SOLVED] Segmentation fault in VirtualBox

Hi,

I have a funtoo-stable system that is getting a segmentation fault in VirutalBox (the Qt interface) when run as a normal user.  Note that VBoxHeadless and VBoxSDL work fine, and so does VirtualBox from virtualbox-bin.  When I did an strace, the critical bit seems to be:

write(2, process_vm_readv: Operation not permitted
"Effective UID is not root (euid="..., 65Effective UID is not root (euid=1000 egid=1000 uid=1000 gid=1000)) = 65

or maybe this:

write(2, process_vm_readv: Operation not permitted
"VirtualBox: Error -10 in SUPR3Ha"..., 44VirtualBox: Error -10 in SUPR3HardenedMain!

I can provide the full strace if someone wants to see it.  But it all seems to come to setuid not working.  My user is in the vboxusers group.  The permission bits seem to be set correctly, as you can see here:

[root@satyr 52% ~]# ls -l /usr/lib64/virtualbox
total 24116
drwxr-xr-x  5 root root         4096 Sep  8 18:18 ./
drwxr-xr-x 94 root root        69632 Sep  9 15:44 ../
drwxr-xr-x  3 root root         4096 Sep  8 18:18 ExtensionPacks/
drwxr-xr-x  2 root root         4096 Sep  8 18:18 components/
drwxr-xr-x  4 root root         4096 Sep  8 18:18 sdk/
-rwxr-x---  1 root vboxusers   26752 Sep  8 18:18 DBGCPlugInDiggers.so*
-rwsr-x---  1 root vboxusers    2931 Sep  8 18:17 VBox*
-rwxr-x---  1 root vboxusers   10208 Sep  8 18:18 VBoxAuth.so*
-rwxr-x---  1 root vboxusers   22824 Sep  8 18:18 VBoxAuthSimple.so*
-rwxr-x---  1 root vboxusers 1386944 Sep  8 18:18 VBoxDD.so*
-rwxr-x---  1 root vboxusers  166320 Sep  8 18:18 VBoxDD2.so*
-rwxr-x---  1 root vboxusers   16968 Sep  8 18:18 VBoxDD2GC.gc*
-rwxr-x---  1 root vboxusers   24536 Sep  8 18:18 VBoxDD2R0.r0*
-rwxr-x---  1 root vboxusers  126520 Sep  8 18:18 VBoxDDGC.gc*
-rwxr-x---  1 root vboxusers  168448 Sep  8 18:18 VBoxDDR0.r0*
-rwxr-x---  1 root vboxusers  280936 Sep  8 18:18 VBoxDDU.so*
-rwxr-x---  1 root vboxusers  122280 Sep  8 18:18 VBoxDbg.so*
-rw-r--r--  1 root vboxusers 2031616 Sep  8 18:17 VBoxEFI32.fd
-rw-r--r--  1 root vboxusers 2031616 Sep  8 18:17 VBoxEFI64.fd
-rwxr-x---  1 root vboxusers   56464 Sep  8 18:18 VBoxExtPackHelperApp*
-rwxr-x---  1 root vboxusers   18480 Sep  8 18:18 VBoxGuestControlSvc.so*
-rwxr-x---  1 root vboxusers   30856 Sep  8 18:18 VBoxGuestPropSvc.so*
-rws--x---  1 root vboxusers   30976 Sep  8 18:18 VBoxHeadless*
-rwxr-x---  1 root vboxusers  109328 Sep  8 18:18 VBoxHeadless.so*
-rwxr-x---  1 root vboxusers   67168 Sep  8 18:18 VBoxKeyboard.so*
-rwxr-x---  1 root vboxusers  704208 Sep  8 18:18 VBoxManage*
-rws--x---  1 root vboxusers   10352 Sep  8 18:18 VBoxNetAdpCtl*
-rws--x---  1 root vboxusers   30976 Sep  8 18:18 VBoxNetDHCP*
-rwxr-x---  1 root vboxusers   35048 Sep  8 18:18 VBoxNetDHCP.so*
-rwxr-x---  1 root vboxusers  138288 Sep  8 18:18 VBoxOGLhostcrutil.so*
-rwxr-x---  1 root vboxusers  152264 Sep  8 18:18 VBoxOGLhosterrorspu.so*
-rwxr-x---  1 root vboxusers  151688 Sep  8 18:18 VBoxOGLrenderspu.so*
-rwxr-x---  1 root vboxusers  217576 Sep  8 18:18 VBoxPython.so*
-rwxr-x---  1 root vboxusers  217576 Sep  8 18:18 VBoxPython2_7.so*
-rwxr-x---  1 root vboxusers  706640 Sep  8 18:18 VBoxREM.so*
-rwxr-x---  1 root vboxusers 1209840 Sep  8 18:18 VBoxRT.so*
-rws--x---  1 root vboxusers   30976 Sep  8 18:18 VBoxSDL*
-rwxr-x---  1 root vboxusers  154808 Sep  8 18:18 VBoxSDL.so*
-rwxr-x---  1 root vboxusers 2378680 Sep  8 18:18 VBoxSVC*
-rwxr-x---  1 root vboxusers   43384 Sep  8 18:18 VBoxSharedClipboard.so*
-rwxr-x---  1 root vboxusers  812832 Sep  8 18:18 VBoxSharedCrOpenGL.so*
-rwxr-x---  1 root vboxusers   35080 Sep  8 18:18 VBoxSharedFolders.so*
-rwxr-x---  1 root vboxusers   92728 Sep  8 18:18 VBoxTestOGL*
-rwxr-x---  1 root vboxusers   10256 Sep  8 18:18 VBoxTunctl*
-rwxr-x---  1 root vboxusers 1821024 Sep  8 18:18 VBoxVMM.so*
-rwxr-x---  1 root vboxusers 1130496 Sep  8 18:18 VBoxXPCOM.so*
-rwxr-x---  1 root vboxusers   39312 Sep  8 18:18 VBoxXPCOMC.so*
-rwxr-x---  1 root vboxusers   27200 Sep  8 18:18 VBoxXPCOMIPCD*
-rwxr-x---  1 root vboxusers  466228 Sep  8 18:18 VMMGC.gc*
-rwxr-x---  1 root vboxusers  674160 Sep  8 18:18 VMMR0.r0*
lrwxrwxrwx  1 root root           11 Sep  8 18:18 VRDPAuth.so -> VBoxAuth.so*
-rws--x---  1 root vboxusers   30976 Sep  8 18:18 VirtualBox*
-rwxr-x---  1 root vboxusers 6467896 Sep  8 18:18 VirtualBox.so*

I've tried masking 4.1.18 so that 4.1.12 would install (the same version as virtualbox-bin).  Some things I've read suggested specific kernels may be at fault, so I've tried a raft of 3.2/3.3/3.4 gentoo/vanilla kernels.  I even tried unmasking virtualbox-4.1.22 and gentoo-sources-3.5.3 - still didn't work, even though that's what funtoo-current folks would be running right now.  There's something else in play, but I'm stumped what it could be.  Any ideas?

Last edited by dkg (2013-01-04 07:54:46)

Offline

#2 2012-09-10 07:44:02

angry_vincent
Staff
From: Ukraine
Registered: 2010-10-07
Posts: 687

Re: [SOLVED] Segmentation fault in VirtualBox

make sure your users are within vboxusers group

Offline

#3 2012-09-10 23:28:00

dkg
Member
Registered: 2012-09-05
Posts: 31

Re: [SOLVED] Segmentation fault in VirtualBox

The user is in the vboxusers group.

Offline

#4 2012-09-22 22:48:14

dkg
Member
Registered: 2012-09-05
Posts: 31

Re: [SOLVED] Segmentation fault in VirtualBox

It seems that all ebuilds of virtualbox-bin are masked now, and I still can't get a source build of virtualbox to work (not even by keywording 4.2.0).  Is there anyone out there who has virtualbox working on funtoo-stable?

Offline

#5 2012-09-23 15:24:32

overkill
Member
Registered: 2011-09-13
Posts: 243

Re: [SOLVED] Segmentation fault in VirtualBox

I'm using virtualbox-bin 4.1.18 with funtoo-current right now with no issues, however, I haven't updated my system in about 2 weeks.  gnome-3.4.1 came out and I stopped updating until I had the time to fix anything that might break due to the updates.  I had to unmask 4.1.18 otherwise I would have been downgraded to 4.1.12.  I started a thread awhile back about it.

http://forums.funtoo.org/viewtopic.php?id=1550

IIRC, bin versions above 4.1.16 require newer toolchain components than what funtoo-current is using.  I guess oracle started using a newer toolchain to compile the bin version?

This info probably doesn't help your compilation failure sad

Offline

#6 2012-09-23 23:37:33

dkg
Member
Registered: 2012-09-05
Posts: 31

Re: [SOLVED] Segmentation fault in VirtualBox

Hmm.  I'm using vitualbox-bin-4.2.0 right now.  I didn't have to do anything special with the toolchain to get it to work that I remember, just keyword it.  Are you able to get virtualbox (not -bin) to work on funtoo-current?  I know it works on a gentoo system I tested on.  BTW, it's not a compile failure, if I didn't make that clear.  It emerges just fine.  The error happens when I try to run it.

Correction: I also had to add =app-emulation/virtualbox-bin-4.2.0 to package.unmask.

Last edited by dkg (2012-09-23 23:39:55)

Offline

#7 2012-10-15 20:53:11

dkg
Member
Registered: 2012-09-05
Posts: 31

Re: [SOLVED] Segmentation fault in VirtualBox

I had a chance to try with a clean, minimal install (basically just xorg and lxde), with the same result.  If anyone else is interested in this topic, here is a ticket I just made for this: http://bugs.funtoo.org/browse/FL-141

Offline

#8 2012-10-16 00:12:33

overkill
Member
Registered: 2011-09-13
Posts: 243

Re: [SOLVED] Segmentation fault in VirtualBox

Using virtualbox-bin-4.2.0 and it works fine.  I know you already stated that the user is in the vboxusers group, but I'd double check if I were you.  Maybe you fat-fingered it?

 # grep vboxusers /etc/group

Are you loading all the necessary modules?  Have you unloaded/reloaded the modules after the upgrade?
I've added this line to my /etc/conf.d/modules file:

modules="vboxdrv vboxnetflt vboxnetadp"

Offline

#9 2012-10-16 00:48:42

dkg
Member
Registered: 2012-09-05
Posts: 31

Re: [SOLVED] Segmentation fault in VirtualBox

Group is there and working:

[dave@satyr ~]$ grep vboxusers /etc/group
vboxusers:x:104:dave
[dave@satyr ~]$ groups
disk wheel audio cdrom video games cdrw usb users vboxusers lpadmin dave

Modules are loaded:

[root@satyr 54% ~]# lsmod | grep vbox
vboxnetadp             17030  0
vboxnetflt             13133  1
vboxdrv              1786996  4 vboxnetadp,vboxnetflt

Besides, I don't think the modules would come into play until I actually tried to start a guest VM.  I'm just trying to launch the manager UI.  VBoxHeadless and VBoxSDL work, also suggesting it's not a kernel module issue.

Offline

#10 2012-10-20 14:18:21

404_Error
Core Team Member
From: Quebec city, Quebec, Canada
Registered: 2010-10-08
Posts: 511

Re: [SOLVED] Segmentation fault in VirtualBox

May sound stupid but... are you using some security mecanisms like ACLs or SELinux?

Offline

#11 2012-10-20 21:55:24

dkg
Member
Registered: 2012-09-05
Posts: 31

Re: [SOLVED] Segmentation fault in VirtualBox

I am not.

Offline

#12 2013-01-04 07:59:05

dkg
Member
Registered: 2012-09-05
Posts: 31

Re: [SOLVED] Segmentation fault in VirtualBox

Just to close the book on this: It works with current portage. Thanks to toolchain updates, I guess?  Anyway, all's good.

Offline

Board footer

Powered by FluxBB