Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 04-30-09, 08:39 PM   #1
drc
Registered User
 
Join Date: Oct 2005
Posts: 7
Default Problem with 180.xx NVidia drivers and OpenGL interposers

Hi. I develop a project called VirtualGL which interposes on OpenGL and GLX to provide hardware accelerated remote 3D display capabilities for VNC servers and such. VirtualGL users have discovered that, after upgrading their nVidia drivers to 180.xx, VirtualGL stops working. I have tracked this down to a somewhat odd problem that is probably easier to demonstrate than to explain. To that end, I am attaching code for a very rudimentary OpenGL interposer library that exhibits the problem.

On a Linux/x86-64 box (may be reproducible on x86 boxes as well-- haven't tested that) with nVidia 180.xx (tried with 180.29, 180.44, and 180.51), compile the simple interposer library as follows:
cc -D_GNU_SOURCE -dPIC -shared -o libsimpleglfaker.so simpleglfaker.c

Now attempt to load it into a GLX application:
LD_PRELOAD=./libsimpleglfaker.so glxgears
This works. However,
LD_PRELOAD=./libsimpleglfaker.so /usr/X11R6/bin/glxgears
fails with "Cannot load glXSwapBuffers symbol!"

This is essentially the same symptom we see with VirtualGL. When an OpenGL app is loaded using its full pathname, suddenly trying to use dlsym(RTLD_NEXT, ...) to load OpenGL symbols stops working.

This issue occurs only with the 180.xx nVidia drivers. Try the same thing with the 177.xx drivers, and both cases (with and without the fully-qualified pathname) work fine.

DRC
Attached Files
File Type: zip simpleglfaker.zip (423 Bytes, 149 views)
drc is offline   Reply With Quote
Old 05-01-09, 07:09 AM   #2
Thunderbird
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 2,105
Default Re: Problem with 180.xx NVidia drivers and OpenGL interposers

I believe that starting from 180.xx the Nvidia drivers offer their own dlsym / dlopen functionality or so, this might be causing issues.
Thunderbird is offline   Reply With Quote
Old 05-01-09, 03:51 PM   #3
drc
Registered User
 
Join Date: Oct 2005
Posts: 7
Default Re: Problem with 180.xx NVidia drivers and OpenGL interposers

That makes sense. I did some further testing, and the problem only seems to occur after libGL is loaded into the process, which jives with the hypothesis that nVidia is using their own interposed version of dlopen()/dlsym().

For instance, if I create a simple X11 faker that interposes on XOpenDisplay(), I can successfully use that interposer with a plain X11 app such as xclock, but when using it with an OpenGL application, it exhibits the same problem described above.

So I guess the real problem is that nVidia's interposed implementation of dlsym() seems to be broken somehow.
drc is offline   Reply With Quote
Old 05-02-09, 07:26 AM   #4
Mike Playle
Registered User
 
Join Date: Sep 2005
Posts: 26
Default Re: Problem with 180.xx NVidia drivers and OpenGL interposers

Quote:
Originally Posted by drc View Post
nVidia is using their own interposed version of dlopen()/dlsym()
So my plugin loader code needs to be tested both with and without the Nvidia driver...

Why does the driver need to do this? What problem does it solve?

Does it also replace any other OS/libc functions?
Mike Playle is offline   Reply With Quote
Old 05-02-09, 03:53 PM   #5
drc
Registered User
 
Join Date: Oct 2005
Posts: 7
Default Re: Problem with 180.xx NVidia drivers and OpenGL interposers

I can't fathom why, and I'm hoping an nVidia developer can answer that. My best guess is that perhaps they need to monitor one of the X11 functions or something else that's not part of their OpenGL library.
drc is offline   Reply With Quote
Old 05-12-09, 04:36 AM   #6
drc
Registered User
 
Join Date: Oct 2005
Posts: 7
Default Re: Problem with 180.xx NVidia drivers and OpenGL interposers

I have verified that this is still a problem with 185.18.08 beta.
drc is offline   Reply With Quote
Old 08-20-09, 03:50 PM   #7
drc
Registered User
 
Join Date: Oct 2005
Posts: 7
Default Re: Problem with 180.xx NVidia drivers and OpenGL interposers

This problem is more severe than previously thought. In fact, if an application tries to use dlsym() but libGL.so.1 from NV 18x.xx is loaded into memory ahead of libdl, then the application will often seg fault. This can be easily reproduced on some recent Linux versions (specifically, I've reproduced it on SuSE Linux Enterprise 11) by running

LD_PRELOAD=/usr/lib/libGL.so.1 /bin/sh

This may seem an unrealistic test case, but this problem is being encountered by many VirtualGL users when they try to use VirtualGL to launch a 3D application via a script. Invoking 'vglrun {script}' causes librrfaker.so, and subsequently libGL.so.1, to be preloaded, and since libGL.so.1 overrides dlsym(), this causes /bin/sh to use the overridden version of dlsym(), which is buggy.

NVIDIA, FIX THIS!
drc is offline   Reply With Quote
Old 09-09-09, 07:21 AM   #8
lostdistance
Registered User
 
Join Date: Sep 2009
Posts: 2
Default Re: Problem with 180.xx NVidia drivers and OpenGL interposers

This dlsym() problem seems to have hit Google's chromium browser too:

http://code.google.com/p/chromium/is...etail?id=16800
lostdistance is offline   Reply With Quote

Old 09-09-09, 02:03 PM   #9
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: Problem with 180.xx NVidia drivers and OpenGL interposers

The problem with RTLD_NEXT (which is also what appears to be affecting Chromium) should be fixed in the next 190.* driver release.
AaronP is offline   Reply With Quote
Old 10-20-09, 02:49 PM   #10
drc
Registered User
 
Join Date: Oct 2005
Posts: 7
Default Re: Problem with 180.xx NVidia drivers and OpenGL interposers

Verified fix in 190.32. Thanks!
drc is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenGL apps crashing in NVIDIA driver when switching desktop dinosaur NVIDIA Linux 0 06-01-12 08:09 PM
Radeon 9700 not all that? sancheuz Other Desktop Graphics Cards 200 10-12-02 10:31 PM
Major WineX prob... I think it has to do with the vidcard... Linewbie NVIDIA Linux 20 10-09-02 10:58 PM
Nvidia 2960 OpenGL too dark? godxzilla NVIDIA Linux 3 09-08-02 10:55 PM
NVIDIA Drivers Kevin NVIDIA Linux 5 08-03-02 08:36 PM

All times are GMT -5. The time now is 11:35 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.