JDK-6448484 : JVM-Crash during print on MP/HT-system
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_2003
  • CPU: x86
  • Submitted: 2006-07-13
  • Updated: 2011-01-19
  • Resolved: 2006-08-30
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
Java HotSpot(TM) Server VM (1.5.0_07-b03) for windows-x86, built on May  3 2006 00:45:13 by "java_re" with MS VC++ 6.0

ADDITIONAL OS VERSION INFORMATION :
Windows Server 2003 family Build 3790 Service Pack 1

EXTRA RELEVANT SYSTEM CONFIGURATION :
Dual Processor System with Hyperthreading
CPU:total 4 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht

A DESCRIPTION OF THE PROBLEM :
When printing using the framework with java.awt.print.Pageable and java.awt.print.Printable, the VM sometimes crash with the given core-dump.

There is a similar and already closed bug describing the same problems on a multiprocessor/hyperthreading-system withing the AWT-framework (bug-id 5069955: JRE/Browser crash during repaint - IE/XP on MP or HT systems)


ERROR MESSAGES/STACK TRACES THAT OCCUR :
Some thread-names have been renamed

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x77beacc4, pid=80976, tid=102028
#
# Java VM: Java HotSpot(TM) Server VM (1.5.0_07-b03 mixed mode)
# Problematic frame:
# C  [GDI32.dll+0x1acc4]
#

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

Current thread (0x6a7552d0):  JavaThread "AWT-Windows" daemon [_thread_in_native, id=102028]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000034

Registers:
EAX=0x00000001, EBX=0x00195b38, ECX=0x00000000, EDX=0x7c94ed54
ESP=0x6d33f680, EBP=0x6d33f680, ESI=0x00400000, EDI=0x0000000c
EIP=0x77beacc4, EFLAGS=0x00010282

  Top of Stack: (sp=0x6d33f680)
0x6d33f680:   6d33f690 77beacb5 00171c74 0000000c
0x6d33f690:   6d33f6ac 77be37ef 0000000c 00000028
0x6d33f6a0:   00195b38 00010000 00195b38 6d33f6c0
0x6d33f6b0:   77be3f17 0000000c 632104ad 00000004
0x6d33f6c0:   6d33f6e0 77be48fe 632104ad 00000004
0x6d33f6d0:   00000028 000a0000 000005e7 04ad0004
0x6d33f6e0:   6d33f700 77bdd0e0 3f0a05e7 6a777ca8
0x6d33f6f0:   6a0415f0 00000000 00003f0a 00000000

Instructions: (pc=0x77beacc4)
0x77beacb4:   00 e9 89 8a ff ff 90 90 90 90 90 8b ff 55 8b ec
0x77beacc4:   8b 41 34 ff 75 0c 03 45 08 83 c1 40 50 e8 82 6f


Stack: [0x6d300000,0x6d340000),  sp=0x6d33f680,  free space=253k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [GDI32.dll+0x1acc4]
C  [GDI32.dll+0x1acb5]
C  [GDI32.dll+0x137ef]
C  [GDI32.dll+0x13f17]
C  [GDI32.dll+0x148fe]
C  [GDI32.dll+0xd0e0]
C  [awt.dll+0xcff10]
C  [awt.dll+0xce4c1]
C  [USER32.dll+0x1c3b7]
C  [USER32.dll+0x1c484]
C  [USER32.dll+0x1c73c]
C  [USER32.dll+0x1c778]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  sun.awt.windows.WToolkit.eventLoop()V+0
j  sun.awt.windows.WToolkit.run()V+69
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub

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

Java Threads: ( => current thread )
 [skip]
 

Other Threads:
  0x00039088 VMThread [id=96628]
  0x68111310 WatcherThread [id=4868]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 PSYoungGen      total 139968K, used 15696K [0x5cfb0000, 0x679d0000, 0x67a50000)
  eden space 105216K, 12% used [0x5cfb0000,0x5dc7e6c0,0x63670000)
  from space 34752K, 7% used [0x63670000,0x638f5c88,0x65860000)
  to   space 33920K, 0% used [0x658b0000,0x658b0000,0x679d0000)
 PSOldGen        total 1398144K, used 233679K [0x07a50000, 0x5cfb0000, 0x5cfb0000)
  object space 1398144K, 16% used [0x07a50000,0x15e83cd8,0x5cfb0000)
 PSPermGen       total 38016K, used 37672K [0x03a50000, 0x05f70000, 0x07a50000)
  object space 38016K, 99% used [0x03a50000,0x05f1a278,0x05f70000)

Dynamic libraries:
0x00400000 - 0x0040d000 	d:\java5\jdk\bin\java.exe
0x7c920000 - 0x7c9e6000 	C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c915000 	C:\WINDOWS\system32\kernel32.dll
0x77f30000 - 0x77fdc000 	C:\WINDOWS\system32\ADVAPI32.dll
0x77c20000 - 0x77cbf000 	C:\WINDOWS\system32\RPCRT4.dll
0x77b70000 - 0x77bca000 	C:\WINDOWS\system32\MSVCRT.dll
0x6d8d0000 - 0x6dc85000 	d:\java5\jdk\jre\bin\server\jvm.dll
0x77e20000 - 0x77eb3000 	C:\WINDOWS\system32\USER32.dll
0x77bd0000 - 0x77c18000 	C:\WINDOWS\system32\GDI32.dll
0x76990000 - 0x769be000 	C:\WINDOWS\system32\WINMM.dll
0x6d2f0000 - 0x6d2f8000 	d:\java5\jdk\jre\bin\hpi.dll
0x76a60000 - 0x76a6b000 	C:\WINDOWS\system32\PSAPI.DLL
0x6d700000 - 0x6d70c000 	d:\java5\jdk\jre\bin\verify.dll
0x6d370000 - 0x6d38d000 	d:\java5\jdk\jre\bin\java.dll
0x6d720000 - 0x6d72f000 	d:\java5\jdk\jre\bin\zip.dll
0x003d0000 - 0x003ff000 	C:\WINDOWS\system32\rsaenh.dll
0x76810000 - 0x768d6000 	C:\WINDOWS\system32\USERENV.dll
0x71a50000 - 0x71aa8000 	C:\WINDOWS\system32\netapi32.dll
0x6d530000 - 0x6d543000 	D:\java5\jdk\jre\bin\net.dll
0x71a10000 - 0x71a27000 	C:\WINDOWS\system32\WS2_32.dll
0x71a00000 - 0x71a08000 	C:\WINDOWS\system32\WS2HELP.dll
0x71930000 - 0x71972000 	C:\WINDOWS\System32\mswsock.dll
0x76dc0000 - 0x76dea000 	C:\WINDOWS\system32\DNSAPI.dll
0x76e60000 - 0x76e67000 	C:\WINDOWS\System32\winrnr.dll
0x76e00000 - 0x76e2f000 	C:\WINDOWS\system32\WLDAP32.dll
0x76e70000 - 0x76e75000 	C:\WINDOWS\system32\rasadhlp.dll
0x691f0000 - 0x6924a000 	C:\WINDOWS\system32\hnetcfg.dll
0x718f0000 - 0x718f8000 	C:\WINDOWS\System32\wshtcpip.dll
0x6d670000 - 0x6d676000 	D:\java5\jdk\jre\bin\rmi.dll
0x6bd70000 - 0x6c0fd000 	D:\hub\sapjcorfc.dll
0x6c100000 - 0x6c67a000 	D:\hub\LIBRFC32.dll
0x774f0000 - 0x77624000 	C:\WINDOWS\system32\ole32.dll
0x77cd0000 - 0x77d5c000 	C:\WINDOWS\system32\OLEAUT32.dll
0x77b60000 - 0x77b68000 	C:\WINDOWS\system32\VERSION.dll
0x7c340000 - 0x7c396000 	C:\WINDOWS\MSVCR71.dll
0x77ec0000 - 0x77f12000 	C:\WINDOWS\system32\SHLWAPI.dll
0x7c3a0000 - 0x7c41b000 	C:\WINDOWS\MSVCP71.dll
0x7c9f0000 - 0x7d1fd000 	C:\WINDOWS\system32\SHELL32.dll
0x6d790000 - 0x6d838000 	C:\WINDOWS\system32\dbghelp.dll
0x77340000 - 0x77443000 	C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.3790.1830_x-ww_7AE38CCF\comctl32.dll
0x6d390000 - 0x6d4f7000 	D:\java5\jdk\jre\bin\awt.dll
0x72e90000 - 0x72eb7000 	C:\WINDOWS\system32\WINSPOOL.DRV
0x76180000 - 0x7619d000 	C:\WINDOWS\system32\IMM32.dll
0x76690000 - 0x766c6000 	C:\WINDOWS\system32\spool\DRIVERS\W32X86\3\UNIDRVUI.DLL
0x766d0000 - 0x76715000 	C:\WINDOWS\system32\spool\DRIVERS\W32X86\3\UNIDRV.DLL
0x73690000 - 0x736dc000 	C:\WINDOWS\system32\ddraw.dll
0x739c0000 - 0x739c6000 	C:\WINDOWS\system32\DCIMAN32.dll
0x72550000 - 0x725a1000 	C:\WINDOWS\system32\MSCTF.dll
0x6d340000 - 0x6d349000 	D:\java5\jdk\jre\bin\nio.dll
0x73340000 - 0x7337f000 	D:\java5\jdk\jre\bin\fontmanager.dll
0x6e110000 - 0x6e13f000 	D:\java5\jdk\jre\bin\cmm.dll
0x704c0000 - 0x704e3000 	D:\java5\jdk\jre\bin\dcpr.dll
0x6d510000 - 0x6d52f000 	D:\java5\jdk\jre\bin\jpeg.dll
0x736e0000 - 0x73788000 	C:\WINDOWS\system32\spool\DRIVERS\W32X86\3\pcl5eres.dll
0x76490000 - 0x7659b000 	C:\WINDOWS\system32\SETUPAPI.dll
0x6d650000 - 0x6d654000 	C:\WINDOWS\system32\security.dll
0x76e40000 - 0x76e53000 	C:\WINDOWS\system32\SECUR32.dll
0x76b80000 - 0x76ba7000 	C:\WINDOWS\system32\msv1_0.dll
0x76be0000 - 0x76bfa000 	C:\WINDOWS\system32\iphlpapi.dll

VM Arguments:
jvm_args: -Xms1536M -Xmx1536M
[...]
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=d:\java5\jdkPATH=C:\JavaProfiler\bin\win32;\HUB\lib\win;C:\Programme\Support Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
USERNAME=[...]
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel



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

OS: Windows Server 2003 family Build 3790 Service Pack 1

CPU:total 4 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht

Memory: 4k page, physical 2096400k(299176k free), swap 4194303k(3021188k free)

vm_info: Java HotSpot(TM) Server VM (1.5.0_07-b03) for windows-x86, built on May  3 2006 00:45:13 by "java_re" with MS VC++ 6.0


REPRODUCIBILITY :
This bug can be reproduced occasionally.

Comments
SUGGESTED FIX *** /tmp/geta18340.C18343 2006-07-21 10:47:12.844014345 +0400 --- awt_Debug.cpp 2006-07-21 10:47:01.693482000 +0400 *************** *** 42,53 **** static void DumpRegion(HRGN rgn) { DWORD size = ::GetRegionData(rgn, 0, NULL); char* buffer = (char *)safe_Malloc(size); memset(buffer, 0, size); LPRGNDATA rgndata = (LPRGNDATA)buffer; rgndata->rdh.dwSize = sizeof(RGNDATAHEADER); rgndata->rdh.iType = RDH_RECTANGLES; ! VERIFY(::GetRegionData(rgn, size, rgndata)); RECT* r = (RECT*)(buffer + rgndata->rdh.dwSize); for (DWORD i=0; i<rgndata->rdh.nCount; i++) { --- 42,64 ---- static void DumpRegion(HRGN rgn) { DWORD size = ::GetRegionData(rgn, 0, NULL); + if (size == 0) { + ::DeleteObject((HGDIOBJ)rgn); + return; + } + char* buffer = (char *)safe_Malloc(size); memset(buffer, 0, size); LPRGNDATA rgndata = (LPRGNDATA)buffer; rgndata->rdh.dwSize = sizeof(RGNDATAHEADER); rgndata->rdh.iType = RDH_RECTANGLES; ! int retCode = ::GetRegionData(rgn, size, rgndata); ! VERIFY(retCode); ! if (retCode == 0) { ! delete [] buffer; ! ::DeleteObject((HGDIOBJ)rgn); ! return; ! } RECT* r = (RECT*)(buffer + rgndata->rdh.dwSize); for (DWORD i=0; i<rgndata->rdh.nCount; i++) {
21-07-2006

EVALUATION Perhaps the same root cause as in 5069955.
13-07-2006