JDK-6236067 : PIT: VM crashes when running a 2D app on WinXP with Radeon 9600XT + OpenGL
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2005-03-04
  • Updated: 2008-02-06
  • Resolved: 2005-03-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 betaFixed
Related Reports
Relates :  
Relates :  
Description
I am running the attached 2D test on a WinXP Prof (sp1) machine with opengl enabled. The VM crashes immediately after launching the test on the following PIT build:

java version "2d.pit-jcg-win-03-2005-03-02.mustang"
Java(TM) 2 Runtime Environment, Standard Edition (build 2d.pit-jcg-win-03-2005-03-02.mustang)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b25, mixed mode)

The crash is not reproducible with Mustang-b25 on the same system. WinXP machine uses a ATI Radeon 9600XT video card. This is a PIT failure.

I have attached the test to this bug report alongwith other required files. Run it with '-Dsun.java2d.opengl=True'.  On WinXP with NVidia GeForce4MX4000, no such crash is happening. Looks like it is specific to ATI.

(The crash is seen with Java2Demo also)

Here is the log file:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_GUARD_PAGE (0x80000001) at pc=0x69399756, pid=1296, tid=1288
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0-ea-b25 mixed mode)
# Problematic frame:
# C  [atioglxx.dll+0x399756]
#

---------------  T H R E A D  ---------------

Current thread (0x0acb94e8):  JavaThread "Java2D Queue Flusher" daemon [_thread_in_native, id=1288]

siginfo: ExceptionCode=0x80000001, ExceptionInformation=0x00000000 0x00042bc8 

Registers:
EAX=0x00000000, EBX=0x00000200, ECX=0x0b11fbb0, EDX=0x7ffe0304
ESP=0x0b11fb8c, EBP=0x0b11fbd8, ESI=0x0acc9728, EDI=0x00abf3d0
EIP=0x69399756, EFLAGS=0x00010202

Top of Stack: (sp=0x0b11fb8c)
0x0b11fb8c:   0af3e860 7c010598 00000005 00000200
0x0b11fb9c:   00000200 0b11fbb0 0acb94e8 06f43460
0x0b11fbac:   06f43460 00002072 00002075 00002073
0x0b11fbbc:   0000207a 00000000 0acca790 00000000
0x0b11fbcc:   0b11fc20 7c010598 0acb94e8 0b11fc20
0x0b11fbdc:   00ac831d 0acb959c 0b11fc48 0acc9728
0x0b11fbec:   00000200 00abf3d0 001700da 0000012c
0x0b11fbfc:   0000012c 00acd9f8 0b11fc04 06f43460 

Instructions: (pc=0x69399756)
0x69399746:   cc cc cc cc cc cc cc cc cc cc 64 a1 f0 0b 00 00
0x69399756:   8b 80 c8 2b 04 00 ff a0 64 07 00 00 cc cc cc cc 


Stack: [0x0b0e0000,0x0b120000),  sp=0x0b11fb8c,  free space=254k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [atioglxx.dll+0x399756]
j  sun.java2d.opengl.WGLSurfaceData.initPbuffer(JJII)Z+0
j  sun.java2d.opengl.OGLSurfaceData.initSurfaceNow(II)V+56
j  sun.java2d.opengl.OGLSurfaceData.access$000(Lsun/java2d/opengl/OGLSurfaceData;II)V+3
j  sun.java2d.opengl.OGLSurfaceData$1.run()V+12
j  sun.java2d.opengl.OGLRenderQueue$QueueFlusher.run()V+101
v  ~StubRoutines::call_stub
V  [jvm.dll+0x82ca3]
V  [jvm.dll+0xd5830]
V  [jvm.dll+0x82b74]
V  [jvm.dll+0x828d1]
V  [jvm.dll+0x9d618]
V  [jvm.dll+0xff759]
V  [jvm.dll+0xff727]
C  [MSVCRT.dll+0x27fb8]
C  [kernel32.dll+0x202ed]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  sun.java2d.opengl.WGLSurfaceData.initPbuffer(JJII)Z+0
j  sun.java2d.opengl.OGLSurfaceData.initSurfaceNow(II)V+56
j  sun.java2d.opengl.OGLSurfaceData.access$000(Lsun/java2d/opengl/OGLSurfaceData;II)V+3
j  sun.java2d.opengl.OGLSurfaceData$1.run()V+12
j  sun.java2d.opengl.OGLRenderQueue$QueueFlusher.run()V+101
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x0accaca8 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=1520]
  0x00abf5c8 JavaThread "AWT-Shutdown" [_thread_blocked, id=1276]
  0x00aa8390 JavaThread "AWT-Windows" daemon [_thread_in_native, id=1136]
=>0x0acb94e8 JavaThread "Java2D Queue Flusher" daemon [_thread_in_native, id=1288]
  0x0acaeb40 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=1340]
  0x00a419c8 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=236]
  0x00a40680 JavaThread "CompilerThread0" daemon [_thread_blocked, id=612]
  0x00a3faa8 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=680]
  0x009f3c18 JavaThread "Finalizer" daemon [_thread_blocked, id=832]
  0x00a36738 JavaThread "Reference Handler" daemon [_thread_blocked, id=992]
  0x00035c40 JavaThread "main" [_thread_blocked, id=1512]

Other Threads:
  0x00a33d70 VMThread [id=1452]
  0x00a42b68 WatcherThread [id=1372]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 def new generation   total 576K, used 404K [0x02ac0000, 0x02b60000, 0x02fa0000)
  eden space 512K,  78% used [0x02ac0000, 0x02b24558, 0x02b40000)
  from space 64K,   4% used [0x02b40000, 0x02b40ae0, 0x02b50000)
  to   space 64K,   0% used [0x02b50000, 0x02b50000, 0x02b60000)
 tenured generation   total 1408K, used 1238K [0x02fa0000, 0x03100000, 0x06ac0000)
   the space 1408K,  87% used [0x02fa0000, 0x030d5990, 0x030d5a00, 0x03100000)
 compacting perm gen  total 8192K, used 5169K [0x06ac0000, 0x072c0000, 0x0aac0000)
   the space 8192K,  63% used [0x06ac0000, 0x06fcc618, 0x06fcc800, 0x072c0000)
No shared spaces configured.

Dynamic libraries:
0x00400000 - 0x0040c000 	y:\disk05\2d-SQE\PIT\2005-03-02.mustang\windows-i586\bin\java.exe
0x77f50000 - 0x77ff9000 	C:\WINDOWS\System32\ntdll.dll
0x77e60000 - 0x77f45000 	C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e5b000 	C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x7806e000 	C:\WINDOWS\system32\RPCRT4.dll
0x77c10000 - 0x77c63000 	C:\WINDOWS\system32\MSVCRT.dll
0x6d6c0000 - 0x6d841000 	y:\disk05\2d-SQE\PIT\2005-03-02.mustang\windows-i586\jre\bin\client\jvm.dll
0x77d40000 - 0x77dcd000 	C:\WINDOWS\system32\USER32.dll
0x77c70000 - 0x77cae000 	C:\WINDOWS\system32\GDI32.dll
0x76b40000 - 0x76b6c000 	C:\WINDOWS\System32\WINMM.dll
0x10000000 - 0x10008000 	y:\disk05\2d-SQE\PIT\2005-03-02.mustang\windows-i586\jre\bin\hpi.dll
0x76bf0000 - 0x76bfb000 	C:\WINDOWS\System32\PSAPI.DLL
0x00850000 - 0x0085c000 	y:\disk05\2d-SQE\PIT\2005-03-02.mustang\windows-i586\jre\bin\verify.dll
0x00860000 - 0x0087d000 	y:\disk05\2d-SQE\PIT\2005-03-02.mustang\windows-i586\jre\bin\java.dll
0x00880000 - 0x0088f000 	y:\disk05\2d-SQE\PIT\2005-03-02.mustang\windows-i586\jre\bin\zip.dll
0x0ae80000 - 0x0affe000 	Y:\disk05\2d-SQE\PIT\2005-03-02.mustang\windows-i586\jre\bin\awt.dll
0x73000000 - 0x73023000 	C:\WINDOWS\System32\WINSPOOL.DRV
0x76390000 - 0x763aa000 	C:\WINDOWS\System32\IMM32.dll
0x771b0000 - 0x772c0000 	C:\WINDOWS\system32\ole32.dll
0x5ed00000 - 0x5edc6000 	C:\WINDOWS\System32\opengl32.dll
0x68b20000 - 0x68b3e000 	C:\WINDOWS\System32\GLU32.dll
0x73760000 - 0x737a5000 	C:\WINDOWS\System32\DDRAW.dll
0x73bc0000 - 0x73bc6000 	C:\WINDOWS\System32\DCIMAN32.dll
0x5ad70000 - 0x5ada4000 	C:\WINDOWS\system32\uxtheme.dll
0x0b060000 - 0x0b09f000 	Y:\disk05\2d-SQE\PIT\2005-03-02.mustang\windows-i586\jre\bin\fontmanager.dll
0x69000000 - 0x6946a000 	C:\WINDOWS\System32\atioglxx.dll
0x0f4d0000 - 0x0f4ff000 	Y:\disk05\2d-SQE\PIT\2005-03-02.mustang\windows-i586\jre\bin\cmm.dll
0x0f450000 - 0x0f46f000 	Y:\disk05\2d-SQE\PIT\2005-03-02.mustang\windows-i586\jre\bin\jpeg.dll
0x773d0000 - 0x77bc4000 	C:\WINDOWS\system32\shell32.dll
0x772d0000 - 0x77333000 	C:\WINDOWS\system32\SHLWAPI.dll
0x71950000 - 0x71a34000 	C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.0.0_x-ww_1382d70a\comctl32.dll
0x77340000 - 0x773cb000 	C:\WINDOWS\system32\comctl32.dll

VM Arguments:
jvm_args: -Dsun.java2d.opengl=True
java_command: CreateWindowMultiScreenTest

Environment Variables:
PATH=y:\disk05\2d-SQE\PIT\2005-03-02.mustang\windows-i586\bin;C:\PROGRA~1\MKSTOO~1\bin;C:\PROGRA~1\MKSTOO~1\bin\X11;C:\PROGRA~1\MKSTOO~1\mksnt;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
USERNAME=admin
SHELL=C:/PROGRA~1/MKSTOO~1/mksnt/sh.exe
DISPLAY=:0.0
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 8 Stepping 6, GenuineIntel



---------------  S Y S T E M  ---------------

OS: Windows XP Build 2600 

CPU:total 1 family 6, cmov, cx8, fxsr, mmx, sse

Memory: 4k page, physical 523432k(292052k free), swap 1280676k(1088788k free)

vm_info: Java HotSpot(TM) Client VM (1.6.0-ea-b25) for windows-x86, built on Feb 24 2005 01:44:27 by "java_re" with MS VC++ 6.0


###@###.### 2005-03-04 07:14:25 GMT

Comments
EVALUATION This problem is due to some failed calls to SetPixelFormat(). When we initialize the WGLGraphicsConfig we create a scratch window, call SetPixelFormat() for that window, create a temporary context, perform some checks, and then release all the resources. The SetPixelFormat() calls are successful in this scenario and are happening on the main thread (or EDT, or whichever thread is initializing the GraphicsConfig). Later on the queue flushing thread (QFT), we attempt to create the "real" context, and in doing so we call SetPixelFormat(), which fails with no specific error message. The context creation fails, but our code is prepared to deal with the case when the context is null, so the first few rendering operations are no-ops. Later, we attempt to create a pbuffer on the QFT, and this time the call to wglCreatePbufferARB() will crash (as reported in the description field). These problems seem to be specific to ATI's drivers on Windows, when attempting to render from a thread other than the one on which everything (i.e. the GraphicsConfig and the context) were created. This is noticeable in Tiger builds as well. For example, when the Disposer thread would try to make the "shared context" current, it would fail in SetPixelFormat(), just like the case described above. This wouldn't result in crashes (usually), but obviously this behavior is wrong. Fortunately, this is just the type of problem STR was designed to fix. Really, we should not be initializing the WGLGraphicsConfig on the main thread (or the EDT, or whatever), but instead on the QFT. With this fix in place, everything works as well as it did before the STR changes (6219284), because now we are always performing OGL operations only on the QFT. There are still a few problems with ATI's drivers that cause black regions and some artifacts, but these are known (existing) issues and are (or will be) covered by other bug reports. ###@###.### 2005-03-04 20:22:39 GMT
04-03-2005