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

Newegg Daily Deals

Reply
 
Thread Tools
Old 10-19-10, 08:37 PM   #1
ariekenb
Registered User
 
Join Date: Oct 2010
Posts: 10
Default 260.xx drivers break Java2D OpenGL pipeline

I have been using the Java2D OpenGL pipeline for some time with Java 1.6 on 64-bit linux on several machines with 173.xx, 180.xx, and 195.xx versions of NVIDIA drivers. I haven't had any problems until now.

A few days ago I began trying the new 260 series of drivers. I have tried 260.19.06 and 260.19.12 on 2 machines running Debian 5.0 and Ubuntu 10.10. One machine has an 8400 GS, the other has a Quadro FX 550. The Java2D OpenGL pipeline worked flawlessly on both machines with older 173/180/195 drivers. I am using Sun Java 1.6.0_22 64-bit. Both machines are running 64-bit kernels.

With the 260.xx drivers, on both machines I see the following problems:

1. If I just set -Dsun.java2d.opengl=true, I see all swing frames are empty - no widgets are drawn (see empty_java2d_opengl_window).

2. If I set -Dsun.java2d.opengl=true and -Dsun.java2d.opengl.fbobject=false (disable frame buffer objects) this works around problem #1 and widgets are displayed (although this has known performance impacts)

3. In either case #1 or #2 (sun.java2d.opengl=true and sun.java2d.opengl.fbobject is true or false), when I close the Java GUI application the X server almost always (but not 100% of the time) crashes with a segmentation fault that involves nvidia_drv.so (captured from /var/log/Xorg.0.log):

Backtrace:
[ 770.382] 0: /usr/bin/X (xorg_backtrace+0x28) [0x4a0fa8]
[ 770.382] 1: /usr/bin/X (0x400000+0x60fcd) [0x460fcd]
[ 770.382] 2: /lib/libpthread.so.0 (0x7f7d47901000+0xfb40) [0x7f7d47910b40]
[ 770.382] 3: /usr/lib/xorg/extra-modules/nvidia_drv.so (0x7f7d42279000+0x3a3a7c) [0x7f7d4261ca7c]
[ 770.382] 4: /usr/bin/X (FreeClientResources+0xef) [0x44bc5f]
[ 770.382] 5: /usr/bin/X (CloseDownClient+0x5c) [0x427c0c]
[ 770.382] 6: /usr/bin/X (0x400000+0x2c3a6) [0x42c3a6]
[ 770.382] 7: /usr/bin/X (0x400000+0x2184b) [0x42184b]
[ 770.382] 8: /lib/libc.so.6 (__libc_start_main+0xfe) [0x7f7d4686cd8e]
[ 770.382] 9: /usr/bin/X (0x400000+0x213d9) [0x4213d9]
[ 770.382] Segmentation fault at address (nil)
[ 770.382]
Caught signal 11 (Segmentation fault). Server aborting



I have a workaround for now in using an older 173/180/195 series of drivers, but I am concerned about the future of the Java2D OpenGL pipeline if it is broken in the current release.
Attached Thumbnails
Click image for larger version

Name:	empty_java2d_opengl_window.png
Views:	201
Size:	4.7 KB
ID:	41322  Click image for larger version

Name:	normal_java2d_window.png
Views:	191
Size:	6.1 KB
ID:	41323  
ariekenb is offline   Reply With Quote
Old 10-20-10, 03:28 PM   #2
KDE
Registered User
 
Join Date: Nov 2007
Posts: 50
Default Re: 260.xx drivers break Java2D OpenGL pipeline

I can confirm this bug.
256.53 - works
260.xx - Xserver crashing
KDE is offline   Reply With Quote
Old 10-20-10, 04:26 PM   #3
oyvind
Registered User
 
Join Date: May 2004
Location: Norway
Posts: 117
Default Re: 260.xx drivers break Java2D OpenGL pipeline

I can also confirm that the Java2D OpenGL pipeline doesn't work correctly. Tested Swing-based Java-app with JDK6u22 (Oracle), Ubuntu 10.04 x86-64 (Xserver 1.7, kernel 2.6.32) and Nvidia driver 260.19.12 (NVS 3100M).
oyvind is offline   Reply With Quote
Old 10-21-10, 08:15 AM   #4
ariekenb
Registered User
 
Join Date: Oct 2010
Posts: 10
Default Re: 260.xx drivers break Java2D OpenGL pipeline

KDE, oyvind - thanks for confirming this bug.

NVIDIA folks (AaronP, others) - it seems this bug is repeatable by multiple people. Can a bug be opened against the NVIDIA 260 drivers for this? What is the timeframe for getting something like this fixed?
ariekenb is offline   Reply With Quote
Old 10-21-10, 12:38 PM   #5
danix
NVIDIA Corporation
 
danix's Avatar
 
Join Date: Feb 2010
Location: Santa Clara, CA
Posts: 237
Default Re: 260.xx drivers break Java2D OpenGL pipeline

Thanks for reporting this.

Can you please attach a sample app that demonstrates this?
danix is offline   Reply With Quote
Old 10-21-10, 12:46 PM   #6
ariekenb
Registered User
 
Join Date: Oct 2010
Posts: 10
Default Re: 260.xx drivers break Java2D OpenGL pipeline

I believe any Java2D application that tries to use the OpenGL pipeline will show the problems in my original post.

I am attaching the small example I used to take the screenshots in the original post. The code and compiled .class files are in java-test.zip.
Attached Files
File Type: zip java-test.zip (1.6 KB, 123 views)
ariekenb is offline   Reply With Quote
Old 10-21-10, 12:58 PM   #7
danix
NVIDIA Corporation
 
danix's Avatar
 
Join Date: Feb 2010
Location: Santa Clara, CA
Posts: 237
Default Re: 260.xx drivers break Java2D OpenGL pipeline

Thanks. I've confirmed the missing widget problem when setting -Dsun.java2d.opengl=true, but haven't seen the X crash yet.

Can you attach an nvidia-bug-report.log from a system after an X crash, so I can try matching your hardware/software configuration more closely?
danix is offline   Reply With Quote
Old 10-21-10, 02:09 PM   #8
ariekenb
Registered User
 
Join Date: Oct 2010
Posts: 10
Default Re: 260.xx drivers break Java2D OpenGL pipeline

Attaching nvidia-bug-report.log.gz. This is from the Debian 5 machine with a Quadro FX 550.

If it's helpful I also have access to an Ubuntu 10.10 machine with a GeForce 8400 GS where I have seen the same problem - let me know if you'd like data from that box also.

Thanks,
Aaron
Attached Files
File Type: gz nvidia-bug-report.log.gz (34.6 KB, 106 views)
ariekenb is offline   Reply With Quote

Old 10-24-10, 07:58 PM   #9
ariekenb
Registered User
 
Join Date: Oct 2010
Posts: 10
Default Re: 260.xx drivers break Java2D OpenGL pipeline

danix - Just wondering what the next step is for this. Can a bug/bugs be opened against the Nvidia drivers for these problems? If you need any more data from me please let me know. Thanks.
ariekenb is offline   Reply With Quote
Old 10-26-10, 03:48 AM   #10
oyvind
Registered User
 
Join Date: May 2004
Location: Norway
Posts: 117
Default Re: 260.xx drivers break Java2D OpenGL pipeline

Quote:
Originally Posted by danix View Post
Thanks. I've confirmed the missing widget problem when setting -Dsun.java2d.opengl=true, but haven't seen the X crash yet.
[...]
I did not get any X crashes either. Tested the Netbeans IDE with OpenGL pipline. But all widgets were gone (only the splash window was drawn correctly). [Specs at http://www.nvnews.net/vbulletin/show...9&postcount=3]
oyvind is offline   Reply With Quote
Old 10-26-10, 04:40 AM   #11
bearoso
Registered User
 
Join Date: Sep 2003
Posts: 57
Default Re: 260.xx drivers break Java2D OpenGL pipeline

I've noticed that setting __GL_SINGLE_THREADED=1 causes a segfault in libGL instead of just missing widgets.
bearoso is offline   Reply With Quote
Old 10-30-10, 12:24 PM   #12
ariekenb
Registered User
 
Join Date: Oct 2010
Posts: 10
Default Re: 260.xx drivers break Java2D OpenGL pipeline

I have found a reliable way to reproduce the X server crash.

I downloaded the source for OpenJDK 6 and found that whenever -Dsun.java2d.opengl=true, java creates at least one pbuffer at startup in jdk/src/solaris/native/sun/java2d/opengl/GLXGraphicsConfig.c in the GLXGC_InitScratchPbuffer function. If -Dsun.java2d.opengl.fbobject=false, java will create additional pbuffers for rendering all 2D widgets.

After some experiments I have come to the conclusion that if a program has an existing pbuffer created with glXCreatePbuffer and the program exits while the pbuffer exists, there is a chance the X server will crash with the segmentation fault in my original post.

I made a small C program to demonstrate this and am attaching it. This C program creates a pbuffer with the same attributes Java uses in GLXGC_InitScratchPbuffer.

To reproduce the crash do the following:

1. Extract crash-test-program.zip.
2. Compile offscreen-gl.c (gcc -Wall offscreen-gl.c -lX11 -lGL -o offscreen-gl)
3. Run run_offscreen_gl.sh This script runs offscreen-gl, sleeps for 1 second, then kills it. It does this in a forever loop.

With the 260.19.06 and 260.19.12 drivers, running run_offscreen_gl.sh will eventually cause X to crash with the same segmentation fault that was in my original post. It varies how many iterations of running offscreen-gl this takes - sometimes X crashes the first time offscreen-gl is killed, sometimes it takes several iterations.

I tried this program with version 173.14.28 of the drivers also - I let it run for about 30 minutes with no X server crashes.
Attached Files
File Type: zip crash-test-program.zip (1.4 KB, 113 views)
ariekenb 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


All times are GMT -5. The time now is 02:39 AM.


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