Opened 7 years ago
Closed 7 years ago
#16693 closed defect (fixed)
GL libraries not detected and none ending process.
Reported by: | Steve Moyes | Owned by: | |
---|---|---|---|
Component: | 3D support | Version: | VirtualBox 5.1.20 |
Keywords: | Cc: | ||
Guest type: | Windows | Host type: | Linux |
Description (last modified by )
Hi, Windows guest is unable to start with 3D acceleration enabled. Having only 2D enabled results in Windows booting to a black screen.
First symptom: Starting virtualbox on the cli gets:
$ virtualbox libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: failed to load driver: i965 libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: failed to load driver: i965 libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast
Second symptom: Closing the GUI window does not always end the process (also experienced on a Windows host). CTRL-C has to be used.
Third symptom: Trying to start a VM with 3D acceleration gets the error:
Failed to open a session for the virtual machine win10. The VM session was aborted. Result Code: NS_ERROR_FAILURE (0x80004005) Component: SessionMachine Interface: ISession {7844aa05-b02e-4cdd-a04f-ade4a762e6b7}
Downgrading to version 5.1.18 resolves all of the above.
Attachments (7)
Change History (36)
by , 7 years ago
Attachment: | win10-2017-04-25-04-40-21.log added |
---|
comment:1 by , 7 years ago
I get the same results with the r600
driver:
LIBGL_DEBUG=verbose VirtualBox libGL: pci id for fd 13: 1002:68b8, driver r600 libGL: OpenDriver: trying /usr/lib64/dri/tls/r600_dri.so libGL: OpenDriver: trying /usr/lib64/dri/r600_dri.so libGL: dlopen /usr/lib64/dri/r600_dri.so failed ((null)) libGL error: unable to load driver: r600_dri.so libGL error: driver pointer missing libGL error: failed to load driver: r600 libGL: pci id for fd 13: 1002:68b8, driver r600 libGL: OpenDriver: trying /usr/lib64/dri/tls/r600_dri.so libGL: OpenDriver: trying /usr/lib64/dri/r600_dri.so libGL: dlopen /usr/lib64/dri/r600_dri.so failed ((null)) libGL error: unable to load driver: r600_dri.so libGL error: driver pointer missing libGL error: failed to load driver: r600 libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so libGL: dlopen /usr/lib64/dri/swrast_dri.so failed ((null)) libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast Qt WARNING: libpng warning: iCCP: known incorrect sRGB profile
[18660.270984] ShCrOpenGL[18597]: segfault at 0 ip 00007f0eed57539b sp 00007f0eee0e4020 error 4 in VBoxOGLrenderspu.so[7f0eed568000+27000]
> glxinfo | grep string server glx vendor string: SGI server glx version string: 1.4 client glx vendor string: Mesa Project and SGI client glx version string: 1.4 OpenGL vendor string: X.Org OpenGL renderer string: Gallium 0.4 on AMD JUNIPER (DRM 2.49.0 / 4.10.12-gentoo, LLVM 4.0.0) OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.0.4 OpenGL core profile shading language version string: 3.30 OpenGL version string: 3.0 Mesa 17.0.4 OpenGL shading language version string: 1.30 OpenGL ES profile version string: OpenGL ES 3.0 Mesa 17.0.4 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
comment:2 by , 7 years ago
Same here. It is not dependent by the guest as I have the very same problem with a Linux guest. It is also happening with dry run using modesetting drivers and with optirun using nvidia drivers.
I am using gentoo multilib Linux version 4.10.11-gentoo-ck-dvd (root@gentoo-seitan) (gcc version 5.4.0 (Gentoo 5.4.0-r3 p1.3, pie-0.6.5) ) #1 SMP Sat Apr 22 18:29:30 CEST 2017
Installed packages with version
emerge --info
lshw
glxinfo
kernel .config
Xorg.0.log
comment:3 by , 7 years ago
Description: | modified (diff) |
---|
comment:4 by , 7 years ago
Could you also attach the output of
strace -s128 -o log -f VirtualBox
as root?
comment:5 by , 7 years ago
Thanks. /usr/lib64/dri/i965_dri.so is a regular file, is that correct? Is it also correct that this file has permissions 0777? In that case, that's the reason for your problem: The hardening code does not allow to load such libraries.
follow-up: 7 comment:6 by , 7 years ago
Actually that file is a symlink, correct? In that case, please download the latest 5.1.x test build from here. It should fix your problem.
comment:7 by , 7 years ago
Replying to frank:
Actually that file is a symlink, correct?
Yes
gentoo-seitan ~ # ls -al /usr/lib64/dri/i965_dri.so lrwxrwxrwx 1 root root 19 set 8 2015 /usr/lib64/dri/i965_dri.so -> ../mesa/i965_dri.so gentoo-seitan ~ # ls -al /usr/lib64/mesa/i965_dri.so -rwxr-xr-x 2 root root 6479000 apr 25 00:55 /usr/lib64/mesa/i965_dri.so gentoo-seitan ~ # file /usr/lib64/mesa/i965_dri.so /usr/lib64/mesa/i965_dri.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
In that case, please download the latest 5.1.x test build from here. It should fix your problem.
Thank you! I'm going to try that
comment:8 by , 7 years ago
Same problem as above in my gentoo distro.
Please, fix it ASAP.
Thanks in advance.
follow-up: 10 comment:9 by , 7 years ago
il_santo, please confirm that the most recent 5.1.x test builds fix your problem.
comment:10 by , 7 years ago
Replying to frank:
il_santo, please confirm that the most recent 5.1.x test builds fix your problem.
Yes, it works fine!
comment:12 by , 7 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The exact problem exists in 5.1.22.
comment:14 by , 7 years ago
This is with Intel driver, but same happens with modesetting and nouveau in another box. Downgrading to 5.1.18.
strace -s128 -o log -f VirtualBox libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: failed to load driver: i965 libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: failed to load driver: i965 libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast Qt WARNING: libpng warning: iCCP: known incorrect sRGB profile
comment:15 by , 7 years ago
Still GL error and 2d/3d acceleration doesn't work for me (gentoo, r600) with 5.1.22:
$ virtualbox libGL error: unable to load driver: r600_dri.so libGL error: driver pointer missing libGL error: failed to load driver: r600 libGL error: unable to load driver: r600_dri.so libGL error: driver pointer missing libGL error: failed to load driver: r600 libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast Qt WARNING: libpng warning: iCCP: known incorrect sRGB profile
But VBox.log is slightly different than with 5.1.20:
00:00:01.522299 OpenGL Info: Render SPU: Opening display :0 00:00:01.540514 OpenGL Info: Render SPU: Opening display :0 00:00:01.561573 OpenGL Warning: glXMakeCurrent(00007ff970150a70, 0x4400001, 00007ff970196040) failed! (winId 2147483646, ctxId 2147483646) 00:00:01.561598 OpenGL Info: Render SPU: GL_VENDOR: <NULL> 00:00:01.561600 OpenGL Info: Render SPU: GL_RENDERER: <NULL> 00:00:01.561601 OpenGL Info: Render SPU: GL_VERSION: <NULL> 00:00:01.561603 OpenGL Info: Render SPU: GL_EXTENSIONS: <NULL>
follow-up: 17 comment:16 by , 7 years ago
Segfault, I need the log file which was generated by the strace command. Please attach this file. il_santo, please read comment:4.
follow-up: 18 comment:17 by , 7 years ago
Replying to frank:
Segfault, I need the log file which was generated by the strace command. Please attach this file. il_santo, please read comment:4.
$ strace -s128 -o log -f VirtualBox VirtualBox: Error -10 in SUPR3HardenedMain! VirtualBox: Effective UID is not root (euid=1000 egid=100 uid=1000 gid=100) VirtualBox: Tip! It may help to reinstall VirtualBox. qt5ct: using qt5ct plugin <html><b>Effective UID is not root (euid=1000 egid=100 uid=1000 gid=100) (rc=-10)</b><br/><br/>Please try reinstalling VirtualBox.<br><br><!--EOM-->where: SUPR3HardenedMain what: 2 VERR_PERMISSION_DENIED (-10) - Permission denied. </html>
Please, note that I never run virtualbox as root.
follow-up: 19 comment:18 by , 7 years ago
Replying to il_santo:
Please, note that I never run virtualbox as root.
If I run 'strace -s128 -o log -f VirtualBox' as root I get the ssame output as the one reported in comment:15 :
# strace -s128 -o log -f VirtualBox libGL error: unable to load driver: r600_dri.so libGL error: driver pointer missing libGL error: failed to load driver: r600 libGL error: unable to load driver: r600_dri.so libGL error: driver pointer missing libGL error: failed to load driver: r600 libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast Qt WARNING: inotify_add_watch("/root/.config/qt5ct/") failed: "No such file or directory" Qt WARNING: libpng warning: iCCP: known incorrect sRGB profile
So no news from strace.
comment:19 by , 7 years ago
Replying to il_santo:
So no news from strace.
Please attach the resulting file 'log' (created by strace)!
by , 7 years ago
comment:20 by , 7 years ago
Attached. Sorry, I was in the hurry leaving and didn't pay attention to what I was doing.
Hmmm. As root I have no virtual machines to run.
comment:21 by , 7 years ago
Just for completeness on version 5.1.22.
# strace -s128 -o vbox_5.1.22.log -f su - cdstealer -c "VirtualBox" libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: failed to load driver: i965 libGL error: unable to load driver: i965_dri.so libGL error: driver pointer missing libGL error: failed to load driver: i965 libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast Qt WARNING: libpng warning: iCCP: known incorrect sRGB profile
I generated via
strace -s128 -o vbox_5.1.22.log -f su - cdstealer -c "VirtualBox"
so that vbox is running as the correct user.
comment:22 by , 7 years ago
Hi Frank, I'm sorry to report the same here, I am attaching my strace log
by , 7 years ago
Attachment: | vbox-5.22-strace.gz added |
---|
by , 7 years ago
Attachment: | vbox-5.1.22.log.gz added |
---|
Strace log for vbox-5.1.22 with r600 on gentoo
comment:23 by , 7 years ago
Paolo Pedroni wrote (https://bugs.gentoo.org/show_bug.cgi?id=616238#c13):
Seeing https://www.virtualbox.org/ticket/16693 it looks like VirtualBox refuses to load shared libraries with 777 permissions. On gentoo the dri libraries in /usr/lib64/dri are symlinks to libraries in /usr/lib64/mesa (thus 777) and VirtualBox is not smart enough to determine that they are symlinks and not actually world writable libraries, thus denying loading.
follow-up: 25 comment:24 by , 7 years ago
It's not the 0777 symlink but it's the path the symlink points to containing '../'. We are working on a patch.
comment:25 by , 7 years ago
Replying to frank:
It's not the 0777 symlink but it's the path the symlink points to containing '../'. We are working on a patch.
Thank you!
follow-up: 27 comment:26 by , 7 years ago
Will the fix be released in the next version of vbox or as a patch prior to a release?
by , 7 years ago
Attachment: | diff_5.1.22_dlopen_fix added |
---|
Patch against 5.1.22 for resolving the symlink problems
comment:27 by , 7 years ago
Replying to MikeGreene:
Will the fix be released in the next version of vbox or as a patch prior to a release?
I've just attached a patch which should resolve the problem. And the most recent 5.1.x test builds (>= 115307) contain these changes. Please verify!
Log viewer