VirtualBox

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 Frank Mehnert)

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)

win10-2017-04-25-04-40-21.log (2.7 KB ) - added by Steve Moyes 7 years ago.
Log viewer
strace-vbox.gz (311.2 KB ) - added by -DvD- 7 years ago.
strace -s128 -o strace-vbox -f VirtualBox
log.xz (186.1 KB ) - added by Segfault 7 years ago.
vbox_5.1.22.log.gz (203.3 KB ) - added by Steve Moyes 7 years ago.
strace of version 5.1.22
vbox-5.22-strace.gz (310.0 KB ) - added by -DvD- 7 years ago.
vbox-5.1.22.log.gz (318.3 KB ) - added by il_santo 7 years ago.
Strace log for vbox-5.1.22 with r600 on gentoo
diff_5.1.22_dlopen_fix (6.9 KB ) - added by Frank Mehnert 7 years ago.
Patch against 5.1.22 for resolving the symlink problems

Download all attachments as: .zip

Change History (36)

by Steve Moyes, 7 years ago

Log viewer

comment:1 by Erik Zeek, 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 -DvD-, 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 Frank Mehnert, 7 years ago

Description: modified (diff)

comment:4 by Frank Mehnert, 7 years ago

Could you also attach the output of

strace -s128 -o log -f VirtualBox

as root?

by -DvD-, 7 years ago

Attachment: strace-vbox.gz added

strace -s128 -o strace-vbox -f VirtualBox

comment:5 by Frank Mehnert, 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.

comment:6 by Frank Mehnert, 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.

in reply to:  6 comment:7 by -DvD-, 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 il_santo, 7 years ago

Same problem as above in my gentoo distro.

Please, fix it ASAP.

Thanks in advance.

comment:9 by Frank Mehnert, 7 years ago

il_santo, please confirm that the most recent 5.1.x test builds fix your problem.

in reply to:  9 comment:10 by il_santo, 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:11 by Frank Mehnert, 7 years ago

Resolution: fixed
Status: newclosed

Fix is part of 5.1.22.

comment:12 by Segfault, 7 years ago

Resolution: fixed
Status: closedreopened

The exact problem exists in 5.1.22.

comment:13 by Frank Mehnert, 7 years ago

Segfault, please provide the output I was asking in comment:4.

comment:14 by Segfault, 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 il_santo, 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>
Last edited 7 years ago by il_santo (previous) (diff)

comment:16 by Frank Mehnert, 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.

in reply to:  16 ; comment:17 by il_santo, 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.

in reply to:  17 ; comment:18 by il_santo, 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.

in reply to:  18 comment:19 by Frank Mehnert, 7 years ago

Replying to il_santo:

So no news from strace.

Please attach the resulting file 'log' (created by strace)!

by Segfault, 7 years ago

Attachment: log.xz added

comment:20 by Segfault, 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.

Last edited 7 years ago by Segfault (previous) (diff)

comment:21 by Steve Moyes, 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.

Last edited 7 years ago by Steve Moyes (previous) (diff)

by Steve Moyes, 7 years ago

Attachment: vbox_5.1.22.log.gz added

strace of version 5.1.22

comment:22 by -DvD-, 7 years ago

Hi Frank, I'm sorry to report the same here, I am attaching my strace log

by -DvD-, 7 years ago

Attachment: vbox-5.22-strace.gz added

by il_santo, 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 -DvD-, 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.

comment:24 by Frank Mehnert, 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.

in reply to:  24 comment:25 by -DvD-, 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!

comment:26 by Michael Greene, 7 years ago

Will the fix be released in the next version of vbox or as a patch prior to a release?

by Frank Mehnert, 7 years ago

Attachment: diff_5.1.22_dlopen_fix added

Patch against 5.1.22 for resolving the symlink problems

in reply to:  26 comment:27 by Frank Mehnert, 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!

comment:28 by Michael Greene, 7 years ago

Thanks Frank, patched Gentoo VirtualBox 5.1.22 working correctly.

comment:29 by Frank Mehnert, 7 years ago

Resolution: fixed
Status: reopenedclosed

Fix is part of 5.1.24.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use