United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6755274 6u10b33 2d tests fails on sles10x64 with jvm crash
JDK-6755274 : 6u10b33 2d tests fails on sles10x64 with jvm crash

Details
Type:
Bug
Submit Date:
2008-10-02
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
client-libs
OS:
linux_suse_sles_10
Sub-Component:
2d
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

Description
I open this CR for tracking. If this is setup issue it will be close asap.

Tested on JDK 6u10b33

Tested on x64-sles10-jvm64

Regression. 
Test passed on 6u10b08 and failed 6u10b09.

results:
http://stt-13.russia/gtee/1.6.0_10/b33/2d/02/x64-sles10-jvm64/2d_stt_suites_sles10-amd64/

                                    

Comments
WORK AROUND

Since the bug apparently manifests in the case that a driver
can't support on OpenGL, the workaround which loses nothing is not to
specify the opengl property.
                                     
2008-10-02
EVALUATION

The output from 6u08 with J2D_TRACE_LEVEL:
jdk1.6.0_08/bin/java  -Dsun.java2d.opengl=true -jar jdk1.6.0_08/demo/jfc/Font2DTest/Font2DTest.jar
[I] GLXGC_FindBestVisual: scn=0
[I] GLXGC_InitGLX
[I] OGLFuncs_OpenLibrary
[I] OGLFuncs_InitPlatformFuncs
[I] OGLFuncs_InitBaseFuncs
[I] OGLFuncs_InitExtFuncs
[I] GLXGC_InitGLX: client GLX version=1.4
[I] GLXGC_InitFBConfig: scn=0 vis=0x0
[V]   candidate fbconfigs:
[V]     id=0x23 db=1 alpha=0 depth=16 stencil=0 valid=false (bad match)
[V]     id=0x27 db=1 alpha=0 depth=16 stencil=0 valid=false (bad match)
[V]     id=0x24 db=1 alpha=0 depth=16 stencil=8 valid=false (bad match)
[V]     id=0x28 db=1 alpha=0 depth=16 stencil=8 valid=false (bad match)
[V]     id=0x26 db=0 alpha=8 depth=16 stencil=8 valid=false (bad match)
[V]     id=0x2a db=0 alpha=8 depth=16 stencil=8 valid=false (bad match)
[V]     id=0x25 db=1 alpha=8 depth=16 stencil=8 valid=false (bad match)
[V]     id=0x29 db=1 alpha=8 depth=16 stencil=8 valid=false (bad match)
[E] GLXGC_InitFBConfig: could not find an appropriate fbconfig
[E] GLXGC_FindBestVisual: could not find best visual
[I] GLXGraphicsConfig_getGLXConfigInfo
[I] GLXGC_InitFBConfig: scn=0 vis=0x23
[V]   candidate fbconfigs:
[V]     id=0x23 db=1 alpha=0 depth=16 stencil=0 valid=false (bad match)
[E] GLXGC_InitFBConfig: could not find an appropriate fbconfig
[E] GLXGraphicsConfig_getGLXConfigInfo: could not create fbconfig

In 6u10 we have one extra line, which is suspicious:
[E] OGLSD_SetScratchContext: glx config info is null 


And from 6u10:
[I] GLXGC_FindBestVisual: scn=0
[I] GLXGC_InitGLX
[I] OGLFuncs_OpenLibrary
[I] OGLFuncs_InitPlatformFuncs
[I] OGLFuncs_InitBaseFuncs
[I] OGLFuncs_InitExtFuncs
[I] GLXGC_InitGLX: client GLX version=1.4
[I] GLXGC_InitFBConfig: scn=0 vis=0x0
[V]   candidate fbconfigs:
[V]     id=0x23 db=1 alpha=0 depth=16 stencil=0 valid=false (bad match)
[V]     id=0x27 db=1 alpha=0 depth=16 stencil=0 valid=false (bad match)
[V]     id=0x24 db=1 alpha=0 depth=16 stencil=8 valid=false (bad match)
[V]     id=0x28 db=1 alpha=0 depth=16 stencil=8 valid=false (bad match)
[V]     id=0x26 db=0 alpha=8 depth=16 stencil=8 valid=false (bad match)
[V]     id=0x2a db=0 alpha=8 depth=16 stencil=8 valid=false (bad match)
[V]     id=0x25 db=1 alpha=8 depth=16 stencil=8 valid=false (bad match)
[V]     id=0x29 db=1 alpha=8 depth=16 stencil=8 valid=false (bad match)
[E] GLXGC_InitFBConfig: could not find an appropriate fbconfig
[E] GLXGC_FindBestVisual: could not find best visual
[I] GLXGraphicsConfig_getGLXConfigInfo
[I] GLXGC_InitFBConfig: scn=0 vis=0x23
[V]   candidate fbconfigs:
[V]     id=0x23 db=1 alpha=0 depth=16 stencil=0 valid=false (bad match)
[E] GLXGC_InitFBConfig: could not find an appropriate fbconfig
[E] GLXGraphicsConfig_getGLXConfigInfo: could not create fbconfig
[E] OGLSD_SetScratchContext: glx config info is null
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000000000000, pid=23096, tid=1088649536
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0-b15 mixed mode linux-amd64)
# Problematic frame:
# C  0x0000000000000000
#
# An error report file with more information is saved as:
# /export/JDK/hs_err_pid23096.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
                                     
2008-10-03
SUGGESTED FIX

--- a/src/solaris/classes/sun/java2d/opengl/GLXGraphicsConfig.java
+++ b/src/solaris/classes/sun/java2d/opengl/GLXGraphicsConfig.java
@@ -120,12 +120,14 @@ public class GLXGraphicsConfig
                 new GLXGetConfigInfo(device.getScreen(), visualnum);
             rq.flushAndInvokeNow(action);
             cfginfo = action.getConfigInfo();
-            OGLContext.setScratchSurface(cfginfo);
-            rq.flushAndInvokeNow(new Runnable() {
-                public void run() {
-                    ids[0] = OGLContext.getOGLIdString();
-                }
-            });
+            if (cfginfo != 0L) {
+                OGLContext.setScratchSurface(cfginfo);
+                rq.flushAndInvokeNow(new Runnable() {
+                    public void run() {
+                        ids[0] = OGLContext.getOGLIdString();
+                    }
+                });
+            }
         } finally {
             rq.unlock();
         }
--- a/src/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java
+++ b/src/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java
@@ -127,12 +127,14 @@ public class WGLGraphicsConfig
                 new WGLGetConfigInfo(device.getScreen(), pixfmt);
             rq.flushAndInvokeNow(action);
             cfginfo = action.getConfigInfo();
-            OGLContext.setScratchSurface(cfginfo);
-            rq.flushAndInvokeNow(new Runnable() {
-                public void run() {
-                    ids[0] = OGLContext.getOGLIdString();
-                }
-            });
+            if (cfginfo != 0L) {
+                OGLContext.setScratchSurface(cfginfo);
+                rq.flushAndInvokeNow(new Runnable() {
+                    public void run() {
+                        ids[0] = OGLContext.getOGLIdString();
+                    }
+                });
+            }
         } finally {
             rq.unlock();
         }
                                     
2008-10-10
EVALUATION

The most likely cause the RSL-related code which retrieves some context information.
It doesn't check for whether the config was properly initialized before
setting the scratch surface and calling getOGLIdString. The result is
that we call ogl functions without the scratch surface set, which may apparently
cause unpredictable results.

This won't be a problem except for a few tests which iterate through all graphics 
configurations (and thus going through those which were rejected by the opengl
pipeline), but in 6u10 the non-opaque window-related code does
just that for all swing application (at least, on solaris and linux).

The fix is not to call getOGLIdString if config info hasn't been initialized.
                                     
2008-10-10
SUGGESTED FIX

http://hg.openjdk.java.net/jdk7/2d/jdk/rev/452c58b2f533
                                     
2008-10-21



Hardware and Software, Engineered to Work Together