Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 343639 - app-emulation/virtualbox-bin-3.1.8 fails when started as user
Summary: app-emulation/virtualbox-bin-3.1.8 fails when started as user
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on: 336465
Blocks:
  Show dependency tree
 
Reported: 2010-11-01 08:33 UTC by Peter Sliepenbeek
Modified: 2011-02-03 08:09 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sliepenbeek 2010-11-01 08:33:59 UTC
VirtualBox 3.1.8 fails when started as user. When started as root the command (VirtualBox) succeeds.

Reproducible: Always

Steps to Reproduce:
1. VirtualBox
2.
3.

Actual Results:  
peter@Phenom_X4_9950 ~ $ VirtualBox
VirtualBox: supR3HardenedMainGetTrustedMain: dlopen("/opt/VirtualBox/VirtualBox.so",) failed: VBoxVMM.so: cannot open shared object file: No such file or directory

Expected Results:  
The VirtualBox application.

peter@Phenom_X4_9950 ~ $ id
uid=1000(peter) gid=100(users) groups=100(users),7(lp),10(wheel),11(floppy),16(cron),18(audio),19(cdrom),27(video),35(games),85(usb),250(portage),1004(plugdev),1007(peter),1008(vboxusers),1010(svnusers)
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2010-11-01 09:02:39 UTC
Any chance you have /opt on a separate partition being mounted with nosuid?
Comment 2 Peter Sliepenbeek 2010-11-01 09:19:11 UTC
(In reply to comment #1)
> Any chance you have /opt on a separate partition being mounted with nosuid?
> 
No, the entry in fstab is:
/dev/mapper/vg-lv--opt /opt ext3 noatime 1 2
Comment 3 Peter Sliepenbeek 2010-11-01 15:20:04 UTC
Enabling the keyword '~amd64' and the successive emerge of 'virtualbox-bin' resulted in the installation of 'virtualbox-bin-3.2.10-r1' and 'virtualbox-modules-3.2.10' which could be started in a normal fashion as an user.

Disabling the keyword '~amd64' and the successive emerge of 'virtualbox-bin' resulted in the installation of 'virtualbox-bin-3.1.8' and 'virtualbox-modules-3.1.8' which could NOT be started in a normal fashion as an user.
Comment 4 Alexander Ost 2010-11-02 14:20:07 UTC
Same problem here. VirtualBox was running fine - until since I upgraded glibc.

Root cause seems to be a mismatch between  glibc 2.11.2-r3(2.2) and VirtualBox.

See also
http://aur.archlinux.org/packages.php?ID=9753

Comment 5 Marko Steinberger 2010-11-02 17:59:59 UTC
Same issue. Worked until glibc update. Haven't tried as root. 3.2.10-r1 works.

System is mostly stable amd64.
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2010-11-02 18:36:45 UTC
virtualbox-3.2.10 is our next stable candidate. I suggest you add that version to package.keywords for the time being.
Comment 7 Kamen Dokov 2010-11-06 08:04:17 UTC
app-emulation/virtualbox-bin-3.2.10-r1 here 
 As user i get : 
[code]
which: no VirtualBox in (/opt/bin)
basename: missing operand
Try `basename --help' for more information.
Unknown application - 
[/code]

as root it works !
My user is in vboxusers group!

[code]
groupmems -g vboxusers --list
root  kollin
[/code]
Comment 8 Leho Kraav (:macmaN @lkraav) 2010-11-10 14:04:52 UTC
upgrading to 3.2.10-r1 seems to have fixed it for me.
Comment 9 Nigel Stepp 2010-11-10 19:03:59 UTC
Upstream bug is here: http://www.virtualbox.org/ticket/7623
Comment 10 Gian 2010-11-11 19:32:47 UTC
This forum post has a workaround: http://forums.gentoo.org/viewtopic-t-851870-highlight-vboxvmm.html. 
Comment 11 Israel G. Lugo 2010-11-27 13:54:24 UTC
(In reply to comment #5)
> Same issue. Worked until glibc update. Haven't tried as root. 3.2.10-r1 works.
> 
> System is mostly stable amd64.
> 
The VirtualBox problem was apparently exposed by the recent glibc fix to how shared libraries are searched for when executing suid binaries. VirtualBox was relying on the old insecure behavior and now it needs to be updated upstream; this seems to have already been done in version 3.2.10.

Incidentally, there is another workaround suggested by upstream, which doesn't involve having to clutter your /lib with a bunch of VBox-related symlinks -- just edit the .so libraries themselves so that they look for other libraries in the appropriate directory:
http://www.virtualbox.org/ticket/7623#comment:8
Comment 12 Israel G. Lugo 2010-11-27 14:02:42 UTC
(In reply to comment #11)
> Incidentally, there is another workaround suggested by upstream, which doesn't
> involve having to clutter your /lib with a bunch of VBox-related symlinks --
> just edit the .so libraries themselves so that they look for other libraries in
> the appropriate directory:
> http://www.virtualbox.org/ticket/7623#comment:8
> 

There is a problem with the above workaround: the original RPATH on the .so files is 7 characters long ($ORIGIN), so we are limited to 7 characters for the new path. This is too short to fit "/opt/VirtualBox". The workaround for the workaround is to create a symlink in / (with a short name), pointing to /opt/VirtualBox, then using chrpath to point to that.

The following *will* work for app-emulation/virtualbox-bin-3.1.8:

# emerge -va app-admin/chrpath
# ln -s /opt/VirtualBox /vbox
# chrpath --replace /vbox /opt/VirtualBox/*.so

I suggest creating a virtualbox-bin-3.1.8-r1 ebuild that implements the above.
Comment 13 mephinet 2010-12-12 09:26:22 UTC
Another (maybe obvious to some) work-around here, especially for users where upgrading to 3.2 is not an option (e.g. palm-sdk 1.4 users), switching from app-emulation/virtualbox-bin-3.1.8 to app-emulation/virtualbox-ose-3.1.8 also solves the issue. 
I had to remove by ~/.VirtualBox, though, to solve VERR_CFGM_VALUE_NOT_FOUND errors.
Comment 14 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-02-03 08:09:21 UTC
virtualbox-3.2.12 is now stable. Closing this bug.