VirtualBox

Ticket #16693 (closed defect: fixed)

Opened 7 months ago

Last modified 4 months ago

GL libraries not detected and none ending process.

Reported by: cdstealer Owned by:
Priority: major Component: 3D support
Version: VirtualBox 5.1.20 Keywords:
Cc: Guest type: Windows
Host type: Linux

Description (last modified by frank) (diff)

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

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

Change History

Changed 7 months ago by cdstealer

Log viewer

comment:1 Changed 7 months ago by eczeek

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 Changed 7 months ago by -DvD-

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 Changed 7 months ago by frank

  • Description modified (diff)

comment:4 Changed 7 months ago by frank

Could you also attach the output of

strace -s128 -o log -f VirtualBox

as root?

Changed 7 months ago by -DvD-

strace -s128 -o strace-vbox -f VirtualBox

comment:5 Changed 7 months ago by frank

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 follow-up: ↓ 7 Changed 7 months ago by frank

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 in reply to: ↑ 6 Changed 7 months ago by -DvD-

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 Changed 7 months ago by il_santo

Same problem as above in my gentoo distro.

Please, fix it ASAP.

Thanks in advance.

comment:9 follow-up: ↓ 10 Changed 7 months ago by frank

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

comment:10 in reply to: ↑ 9 Changed 7 months ago by il_santo

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 Changed 7 months ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fix is part of 5.1.22.

comment:12 Changed 7 months ago by Segfault

  • Status changed from closed to reopened
  • Resolution fixed deleted

The exact problem exists in 5.1.22.

comment:13 Changed 7 months ago by frank

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

comment:14 Changed 7 months ago by Segfault

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 Changed 7 months ago by il_santo

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 months ago by il_santo (previous) (diff)

comment:16 follow-up: ↓ 17 Changed 7 months ago by frank

Segfault, I need the log file which was generated by the strace command. Please attach this file. il_santo, please read comment:4.

comment:17 in reply to: ↑ 16 ; follow-up: ↓ 18 Changed 7 months ago by il_santo

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.

comment:18 in reply to: ↑ 17 ; follow-up: ↓ 19 Changed 7 months ago by il_santo

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 in reply to: ↑ 18 Changed 7 months ago by frank

Replying to il_santo:

So no news from strace.

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

Changed 7 months ago by Segfault

comment:20 Changed 7 months ago by Segfault

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 months ago by Segfault (previous) (diff)

comment:21 Changed 7 months ago by cdstealer

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 months ago by cdstealer (previous) (diff)

Changed 7 months ago by cdstealer

strace of version 5.1.22

comment:22 Changed 7 months ago by -DvD-

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

Changed 7 months ago by -DvD-

Changed 7 months ago by il_santo

Strace log for vbox-5.1.22 with r600 on gentoo

comment:23 Changed 7 months ago by -DvD-

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 follow-up: ↓ 25 Changed 7 months ago by frank

It's not the 0777 symlink but it's the path the symlink points to containing '../'. We are working on a patch.

comment:25 in reply to: ↑ 24 Changed 7 months ago by -DvD-

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 follow-up: ↓ 27 Changed 7 months ago by MikeGreene

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

Changed 7 months ago by frank

Patch against 5.1.22 for resolving the symlink problems

comment:27 in reply to: ↑ 26 Changed 7 months ago by frank

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 Changed 7 months ago by MikeGreene

Thanks Frank, patched Gentoo VirtualBox 5.1.22 working correctly.

comment:29 Changed 4 months ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed

Fix is part of 5.1.24.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use