United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6732154 REG: Printing an Image using image/gif doc flavor crashes the VM, Solsparc
JDK-6732154 : REG: Printing an Image using image/gif doc flavor crashes the VM, Solsparc

Details
Type:
Bug
Submit Date:
2008-07-31
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
solaris_10
Sub-Component:
compiler
CPU:
x86,sparc
Priority:
P2
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs14 (b04)

Related Reports
Backport:
Backport:
Duplicate:
Relates:
Relates:

Sub Tasks

Description
I have an application which prints a duke gif image in all the supported orientations using PrintService and DocPrintJob. When I run this application on SolSparc10 using jdk7, VM crashes. 

This is reproducible only on Solsparc and not on Win32. I reproduced it with jdk7-b29+. Not reproducible on 6u10. Many printing tests in 2D testbase are crashing due to this.

To reproduce the bug, run the attached test on SolSparc10 with latest jdk7 build. 

Here is the crash dump:
------------------------
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xfe981b0c, pid=22280, tid=10
#
# Java VM: Java HotSpot(TM) Server VM (14.0-b01 mixed mode solaris-sparc )
# Problematic frame:
# V  [libjvm.so+0x181b0c]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

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

Current thread (0x000f3c00):  JavaThread "CompilerThread1" daemon [_thread_in_native, id=10, stack(0xd7180000,0xd7200000)]

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000001c

Registers:
 O0=0x002f0d98 O1=0x00000586 O2=0x00000800 O3=0x001e096c
 O4=0x002119f0 O5=0x00000580 O6=0xd71fd978 O7=0x00000800
 G1=0x001e096c G2=0x00000000 G3=0x00000000 G4=0x00004c51
 G5=0x00000000 G6=0x00000000 G7=0xfe3a1c00 Y=0x00000000
 PC=0xfe981b0c nPC=0xfe981b10


Top of Stack: (sp=0xd71fd978)
0xd71fd978:   001e096c 002119f0 00000586 002119f0
0xd71fd988:   00000586 d71fe8d0 00000800 001e0948
0xd71fd998:   d71fe8c0 d71fdbd0 d71fdba0 001e0948
0xd71fd9a8:   00000000 d71fe8d0 d71fd9f0 fee2d68c
0xd71fd9b8:   d71fd9f0 fee2d1fc d71fd9e8 fee61940
0xd71fd9c8:   ffffffff c88b0840 001e2f68 ffffffff
0xd71fd9d8:   d71fdbb0 ffffffff 00000000 001e0948
0xd71fd9e8:   00000000 00000010 00000001 d71feb68 

Instructions: (pc=0xfe981b0c)
0xfe981afc:   80 a5 80 03 e0 06 e0 04 ec 07 60 04 ca 04 20 04
0xfe981b0c:   d4 01 60 1c 80 a2 80 16 1a 40 00 05 96 10 20 00 

Stack: [0xd7180000,0xd7200000],  sp=0xd71fd978,  free space=502k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x181b0c]
V  [libjvm.so+0x62d694]
V  [libjvm.so+0x1b2964]
V  [libjvm.so+0x3d6acc]
V  [libjvm.so+0x1ad6a0]
V  [libjvm.so+0x1ae4a0]
V  [libjvm.so+0x227844]
V  [libjvm.so+0x74cff4]
V  [libjvm.so+0x690d90]


Current CompileTask:
C2: 21      sun.print.PSPrinterJob.ascii85Encode([B)[B (499 bytes)


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

Java Threads: ( => current thread )
  0x00137400 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=17, stack(0xd6a80000,0xd6b00000)]
  0x00116400 JavaThread "Thread-1" daemon [_thread_blocked, id=13, stack(0xd6e80000,0xd6f00000)]
  0x000f7000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=11, stack(0xd7080000,0xd7100000)]
=>0x000f3c00 JavaThread "CompilerThread1" daemon [_thread_in_native, id=10, stack(0xd7180000,0xd7200000)]
  0x000f1c00 JavaThread "CompilerThread0" daemon [_thread_in_native, id=9, stack(0xd7280000,0xd7300000)]
  0x000f0800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=8, stack(0xd7380000,0xd7400000)]
  0x000dfc00 JavaThread "Finalizer" daemon [_thread_blocked, id=7, stack(0xd7480000,0xd7500000)]
  0x000db000 JavaThread "Reference Handler" daemon [_thread_blocked, id=6, stack(0xd7580000,0xd7600000)]
  0x00026000 JavaThread "main" [_thread_in_Java, id=2, stack(0xfe480000,0xfe500000)]

Other Threads:
  0x000d7000 VMThread [stack: 0xfbd00000,0xfbd80000] [id=5]
  0x000f9000 WatcherThread [stack: 0xd6f80000,0xd7000000] [id=12]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 PSYoungGen      total 10752K, used 4659K [0xf1000000, 0xf1c00000, 0xfbc00000)
  eden space 9216K, 50% used [0xf1000000,0xf148ce50,0xf1900000)
  from space 1536K, 0% used [0xf1a80000,0xf1a80000,0xf1c00000)
  to   space 1536K, 0% used [0xf1900000,0xf1900000,0xf1a80000)
 PSOldGen        total 24576K, used 0K [0xdb800000, 0xdd000000, 0xf1000000)
  object space 24576K, 0% used [0xdb800000,0xdb800000,0xdd000000)
 PSPermGen       total 16384K, used 5046K [0xd7800000, 0xd8800000, 0xdb800000)
  object space 16384K, 30% used [0xd7800000,0xd7ced8c8,0xd8800000)

Dynamic libraries:
0x00010000 	/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/bin/java
0xff3f8000 	/lib/libthread.so.1
0xff370000 	/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/bin/../jre/lib/sparc/jli/libjli.so
0xff3a0000 	/lib/libdl.so.1
0xff200000 	/lib/libc.so.1
0xff340000 	/platform/SUNW,Sun-Blade-2500/lib/libc_psr.so.1
0xfe800000 	/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/jre/lib/sparc/server/libjvm.so
0xff300000 	/lib/libsocket.so.1
0xff330000 	/usr/lib/libsched.so.1
0xff1d0000 	/lib/libm.so.1
0xfe7d0000 	/usr/lib/libCrun.so.1
0xff1a0000 	/lib/libdoor.so.1
0xfe700000 	/lib/libnsl.so.1
0xfe600000 	/lib/libm.so.2
0xfe6d0000 	/lib/libscf.so.1
0xfe5e0000 	/lib/libuutil.so.1
0xfe5c0000 	/lib/libmd5.so.1
0xfe5a0000 	/platform/SUNW,Sun-Blade-2500/lib/libmd5_psr.so.1
0xfe580000 	/lib/libmp.so.2
0xfe460000 	/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/jre/lib/sparc/native_threads/libhpi.so
0xfe430000 	/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/jre/lib/sparc/libverify.so
0xfe3e0000 	/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/jre/lib/sparc/libjava.so
0xfe3c0000 	/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/jre/lib/sparc/libzip.so
0xd6c80000 	/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/jre/lib/sparc/libawt.so
0xfe020000 	/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/jre/lib/sparc/xawt/libmawt.so
0xfe2c0000 	/usr/openwin/lib/libXext.so.0
0xd6b80000 	/usr/openwin/lib/libX11.so.4
0xfbfd0000 	/usr/openwin/lib/libXtst.so.1
0xfbfa0000 	/usr/openwin/lib/libXi.so.5
0xfbe90000 	/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/jre/lib/sparc/libkcms.so
0xfbdb0000 	/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/jre/lib/sparc/libjpeg.so
0xfbcb0000 	/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/jre/lib/sparc/libfontmanager.so
0xfbc40000 	/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/jre/lib/sparc/libt2k.so

VM Arguments:
java_command: OrientationPrinting
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/bin:/net/sqindia/export/disk13/jcg/builds/1.6.0_10/latest/binaries/solaris-sparc/bin:/usr/sbin:/usr/dist/exe:/usr/dist/share/devpro/5.x-sparc/bin:/usr/dt/bin:/usr/ccs/bin:/usr/dist/local/exe:/net/sqindia/export/disk05/awt/mercurial/0.9.3/bin:/usr/bin::/usr/openwin/bin:/bin:/usr/ucb:/usr/openwin/bin:/usr/dt/bin
LD_LIBRARY_PATH=/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/jre/lib/sparc/server:/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/jre/lib/sparc:/net/divinemelody/praveen-share/jdk7-b33/solaris-sparc/jre/../lib/sparc
SHELL=/bin/bash
DISPLAY=:0.0

Signal Handlers:
SIGSEGV: [libjvm.so+0x7a0010], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGBUS: [libjvm.so+0x7a0010], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGFPE: [libjvm.so+0x1ab7d4], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGPIPE: [libjvm.so+0x1ab7d4], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGXFSZ: [libjvm.so+0x1ab7d4], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGILL: [libjvm.so+0x1ab7d4], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGQUIT: [libjvm.so+0x692f14], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
SIGHUP: [libjvm.so+0x692f14], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
SIGINT: [libjvm.so+0x692f14], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
SIGTERM: [libjvm.so+0x692f14], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
SIG39: [libjvm.so+0x6968ec], sa_mask[0]=0x00000000, sa_flags=0x00000008
SIG40: [libjvm.so+0x1ab7d4], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c


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

OS:                         Solaris 10 3/05 s10_74L2a SPARC
           Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                            Assembled 22 January 2005

uname:SunOS 5.10 Generic_118822-25 sun4u  (T2 libthread)
rlimit: STACK 8192k, CORE infinity, NOFILE 65536, AS infinity
load average:0.02 0.02 0.04

CPU:total 2 has_v8, has_v9, has_vis1, has_vis2, is_ultra3

Memory: 8k page, physical 2097152k(878912k free)

vm_info: Java HotSpot(TM) Server VM (14.0-b01) for solaris-sparc JRE (1.7.0-ea-b31), built on Jul 17 2008 02:17:59 by "" with Workshop 5.8

time: Thu Jul 31 19:39:27 2008
elapsed time: 3 seconds

                                    

Comments
EVALUATION

This is not a 2D bug, its a VM bug.
The image loading and printing code on Solaris used here is all java code,
not native.
The crash started in b27 and 2D did not integrate there, however
that was when hotspot 13 was integrated.

Also I see the same crash using
/java/re/jdk/6u6/promoted/all/b02p/binaries/solaris-sparc/bin/java
which also has hotspot 13.

Selecting either -Xint or -client makes the problem go away so it
appears to be in the server compiler.

Also this is the exact same bug as 
6570219: REG: VM crash when printing an image in different orientations, SolSparc

 - ie same test case etc.
That was supposedly fixed in HS11 but its apparently regressed.
                                     
2008-07-31
EVALUATION

This is not the same bug as 6570219, just the same test case.

Bug was introduced with 6603011. There is an ordering problem in long_by_long_mulhi()
exposed when certain inputs make the high half of the dividend provably 0.

The fix is to delay calling transform() until all uses of Node t2 are constructed.
                                     
2008-07-31
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/616a07a75c3c
                                     
2008-08-15



Hardware and Software, Engineered to Work Together