jdk15 can not pass its Java2D test

David Xu davidxu at freebsd.org
Fri Oct 20 07:09:10 PDT 2006


On Friday 20 October 2006 20:44, Kurt Miller wrote:
> On Thursday 19 October 2006 8:29 pm, David Xu wrote:
> > On Friday 20 October 2006 07:30, Greg Lewis wrote:
> > > Hi David,
> > >
> > > On Wed, Oct 18, 2006 at 07:16:15AM +0800, David Xu wrote:
> > > > I have tested its Java2D demo on AMD64 machine, the demo
> > > > resides in jdk15/work/control/build/bsd-amd64/demo. java crashed
> > > > when loading its data:
> > >
> > > What version of FreeBSD?  -CURRENT?
> > >
> > > Also, are you using libthr (since you're the author of it :)?
> >
> > Yes, using -CURRENT and libthr, but it has same problem with
> > libpthread.
>
> I noticed that you are using the port version of the jdk.
> Can you install the debug binaries and reproduce with java_g?
> That will give a better stack trace in the log file.
>
> -Kurt

java_g running with libpthread:

Script started on Fri Oct 20 21:49:47 2006
%gdb /usr/local/jdk1.5.0/jre/bin/java_g

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
(gdb) core java_go  [K.core
Core was generated by `java_g'.
Program terminated with signal 6, Aborted.
Reading symbols from /lib/libz.so.3...done.
Loaded symbols for /lib/libz.so.3
Reading symbols from /lib/libpthread.so.2...done.
Loaded symbols for /lib/libpthread.so.2
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols 
from /usr/local/jdk1.5.0/jre/lib/amd64/server/libjvm_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/server/libjvm_g.so
Reading symbols from /usr/lib/libstdc++.so.5...done.
Loaded symbols for /usr/lib/libstdc++.so.5
Reading symbols from /lib/libm.so.4...done.
Loaded symbols for /lib/libm.so.4
Reading symbols 
from /usr/local/jdk1.5.0/jre/lib/amd64/native_threads/libhpi_g.so...done.
Loaded symbols 
for /usr/local/jdk1.5.0/jre/lib/amd64/native_threads/libhpi_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libverify_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libverify_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libjava_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libjava_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libzip_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libzip_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libawt_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libawt_g.so
Reading symbols 
from /usr/local/jdk1.5.0/jre/lib/amd64/libmlib_image_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libmlib_image_g.so
Reading symbols 
from /usr/local/jdk1.5.0/jre/lib/amd64/xawt/libmawt_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/xawt/libmawt_g.so
Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
Loaded symbols for /usr/X11R6/lib/libXext.so.6
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Loaded symbols for /usr/X11R6/lib/libX11.so.6
Reading symbols 
from /usr/local/jdk1.5.0/jre/lib/amd64/libfontmanager_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libfontmanager_g.so
Reading symbols from /usr/X11R6/lib/X11/locale/lib/common/xlocale.so.2...done.
Loaded symbols for /usr/X11R6/lib/X11/locale/lib/common/xlocale.so.2
Reading symbols 
from /usr/X11R6/lib/X11/locale/lib/common/xlibi18n.so.2...done.
Loaded symbols for /usr/X11R6/lib/X11/locale/lib/common/xlibi18n.so.2
Reading symbols from /usr/X11R6/lib/libXcursor.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXcursor.so.1
Reading symbols from /usr/X11R6/lib/libXrender.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXrender.so.1
Reading symbols from /usr/X11R6/lib/libXfixes.so.3...done.
Loaded symbols for /usr/X11R6/lib/libXfixes.so.3
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libnet_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libnet_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libnio_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libnio_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libdcpr_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libdcpr_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libjpeg_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libjpeg_g.so
Reading symbols from /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2...done.
Loaded symbols for /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x0000000800771f6c in pthread_atfork () from /lib/libpthread.so.2
(gdb) bt
#0  0x0000000800771f6c in pthread_atfork () from /lib/libpthread.so.2
#1  0x000000080075ec93 in sigaction () from /lib/libpthread.so.2
#2  0x00000008007607b2 in sigaction () from /lib/libpthread.so.2
#3  0x0000000800767d76 in pthread_kill () from /lib/libpthread.so.2
#4  0x000000080075ad23 in raise () from /lib/libpthread.so.2
#5  0x000000080095c08d in abort () from /lib/libc.so.7
#6  0x0000000801934211 in os::abort (dump_core=28575964) 
at /usr/ports/java/jdk15/work/hotspot/src/os/bsd/vm/os_bsd.cpp:1349
#7  0x0000000801a9d699 in VMError::report_and_die (this=0x7fffffffba60)
    
at /usr/ports/java/jdk15/work/hotspot/src/share/vm/utilities/vmError.cpp:697
#8  0x0000000801938f17 in JVM_handle_bsd_signal (sig=11, info=0x7fffffffbf20, 
ucVoid=0x7fffffffc0d0, 
    abort_if_unrecognized=1) 
at /usr/ports/java/jdk15/work/hotspot/src/os_cpu/bsd_amd64/vm/os_bsd_amd64.cpp:558
#9  0x00000008007602bf in sigaction () from /lib/libpthread.so.2
#10 0x00000008007685c9 in pthread_kill () from /lib/libpthread.so.2
#11 0x000000080076862b in pthread_kill () from /lib/libpthread.so.2
#12 0x00000008008c5c17 in signalcontext () from /lib/libc.so.7
#13 0x00007fffffffc170 in ?? ()
#14 0x0000000800e72018 in ?? ()
#15 0x0000000000000000 in ?? ()
#16 0x00007fffffffc080 in ?? ()
#17 0x00007fffffffc0d0 in ?? ()
#18 0x0000000000000000 in ?? ()
#19 0x0000000000000000 in ?? ()
#20 0x0000000000000000 in ?? ()
#21 0x0000000000000000 in ?? ()
#22 0x0000000000000000 in ?? ()
#23 0x0000000000000000 in ?? ()
#24 0x0000000000000000 in ?? ()
#25 0x0000000000000000 in ?? ()
#26 0x0000000000000000 in ?? ()
#27 0x0000000000000000 in ?? ()
#28 0x0000000000000004 in ?? ()
#29 0x0000000000000000 in ?? ()
#30 0x0000000000000000 in ?? ()
#31 0x00000000540df000 in ?? ()
#32 0x0000000000000001 in ?? ()
#33 0x00000000540df000 in ?? ()
#34 0x0000000000000037 in ?? ()
#35 0x0000000000000044 in ?? ()
---Type <return> to continue, or q <return> to quit---
#36 0x0000000000000037 in ?? ()
#37 0x0000000000000001 in ?? ()
#38 0x000000084c942a40 in ?? ()
#39 0x00007fffffffc4c0 in ?? ()
#40 0x0000000000000001 in ?? ()
#41 0x00000000540df000 in ?? ()
#42 0x0000000805652c1e in ?? ()
#43 0x000000084c942a40 in ?? ()
#44 0x00007fffffffc7b0 in ?? ()
#45 0x0000000800e72018 in ?? ()
#46 0x0000000000001041 in ?? ()
#47 0xffffff00317cab10 in ?? ()
#48 0xffffffffa2bf18c0 in ?? ()
#49 0xffffffff802ffb7b in ?? ()
#50 0x000000085232eed4 in mlib_ImageSet (image=0x7fffffffc058, type=8, 
channels=9198615, width=0, height=0, stride=32767, 
    data=0x0) 
at ../../../../src/share/native/sun/awt/medialib/mlib_ImageCreate.c:125
Previous frame inner to this frame (corrupt stack?)
(gdb) frame 50
#50 0x000000085232eed4 in mlib_ImageSet (image=0x7fffffffc058, type=8, 
channels=9198615, width=0, height=0, stride=32767, 
    data=0x0) 
at ../../../../src/share/native/sun/awt/medialib/mlib_ImageCreate.c:125
125	  image -> type     = type;
(gdb) list
120	  mlib_s32        mask;              /* mask for check of stride */
121	
122	  if (image == NULL) return NULL;
123	
124	/* for some ugly functions calling with incorrect parameters */
125	  image -> type     = type;
126	  image -> channels = channels;
127	  image -> width    = width;
128	  image -> height   = height;
129	  image -> stride   = stride;
(gdb) print *image
$1 = {type = 4294951280, channels = 32767, width = 15147032, height = 8, 
stride = 0, flags = 0, data = 0x7fffffffc080, 
  state = 0x7fffffffc0d0, paddings = "\000\000\000", bitoffset = 0, format = 
MLIB_FORMAT_UNKNOWN, reserved = {0, 0, 0}}
(gdb) info reg
rax            0x17e	382
rbx            0x7fffffffc058	140737488339032
rcx            0x5	5
rdx            0x6	6
rsi            0x4	4
rdi            0x0	0
rbp            0x7fffffffc058	0x7fffffffc058
rsp            0x7fffffffc188	0x7fffffffc188
r8             0x0	0
r9             0x0	0
r10            0xffffff001df095c8	-1099009321528
r11            0x246	582
r12            0x0	0
r13            0x0	0
r14            0x0	0
r15            0x0	0
rip            0x85232eed4	0x85232eed4 <mlib_ImageSet+52>
eflags         0x246	582
cs             0x2b	43
ss             0x23	35
ds             0x0	0
es             0x0	0
fs             0x0	0
gs             0x0	0
(gdb) quit
%exit

exit

Script done on Fri Oct 20 21:50:19 2006
---------------------------

the pointer image has a very suspicious address, its address is
0x7fffffffc058, if you look register ebp, you will find that it has
same value, I don't know if it is the problem of gdb or libpthread,
because image -> type = type is just trashing the stack.


So I tried java_g with libthr, the output is:

Script started on Fri Oct 20 21:54:49 2006
%gdb /usr/local/jdk1.5.0/jre/bin/java_g

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
(gdb) core java_g.core
Core was generated by `java_g'.
Program terminated with signal 6, Aborted.
Reading symbols from /lib/libz.so.3...done.
Loaded symbols for /lib/libz.so.3
Reading symbols from /usr/lib/libthr.so.2...done.
Loaded symbols for /usr/lib/libthr.so.2
Reading symbols from /lib/libc.so.7...done.
Loaded symbols for /lib/libc.so.7
Reading symbols 
from /usr/local/jdk1.5.0/jre/lib/amd64/server/libjvm_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/server/libjvm_g.so
Reading symbols from /usr/lib/libstdc++.so.5...done.
Loaded symbols for /usr/lib/libstdc++.so.5
Reading symbols from /lib/libm.so.4...done.
Loaded symbols for /lib/libm.so.4
Reading symbols 
from /usr/local/jdk1.5.0/jre/lib/amd64/native_threads/libhpi_g.so...done.
Loaded symbols 
for /usr/local/jdk1.5.0/jre/lib/amd64/native_threads/libhpi_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libverify_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libverify_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libjava_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libjava_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libzip_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libzip_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libawt_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libawt_g.so
Reading symbols 
from /usr/local/jdk1.5.0/jre/lib/amd64/libmlib_image_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libmlib_image_g.so
Reading symbols 
from /usr/local/jdk1.5.0/jre/lib/amd64/xawt/libmawt_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/xawt/libmawt_g.so
Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
Loaded symbols for /usr/X11R6/lib/libXext.so.6
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Loaded symbols for /usr/X11R6/lib/libX11.so.6
Reading symbols 
from /usr/local/jdk1.5.0/jre/lib/amd64/libfontmanager_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libfontmanager_g.so
Reading symbols from /usr/X11R6/lib/X11/locale/lib/common/xlocale.so.2...done.
Loaded symbols for /usr/X11R6/lib/X11/locale/lib/common/xlocale.so.2
Reading symbols 
from /usr/X11R6/lib/X11/locale/lib/common/xlibi18n.so.2...done.
Loaded symbols for /usr/X11R6/lib/X11/locale/lib/common/xlibi18n.so.2
Reading symbols from /usr/X11R6/lib/libXcursor.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXcursor.so.1
Reading symbols from /usr/X11R6/lib/libXrender.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXrender.so.1
Reading symbols from /usr/X11R6/lib/libXfixes.so.3...done.
Loaded symbols for /usr/X11R6/lib/libXfixes.so.3
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libnet_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libnet_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libnio_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libnio_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libjpeg_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libjpeg_g.so
Reading symbols from /usr/local/jdk1.5.0/jre/lib/amd64/libdcpr_g.so...done.
Loaded symbols for /usr/local/jdk1.5.0/jre/lib/amd64/libdcpr_g.so
Reading symbols from /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2...done.
Loaded symbols for /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x00000008008bc07c in thr_kill () from /lib/libc.so.7
(gdb) bt
#0  0x00000008008bc07c in thr_kill () from /lib/libc.so.7
#1  0x000000080075ce90 in raise () from /usr/lib/libthr.so.2
#2  0x000000080094608d in abort () from /lib/libc.so.7
#3  0x0000000801934211 in os::abort (dump_core=28575964) 
at /usr/ports/java/jdk15/work/hotspot/src/os/bsd/vm/os_bsd.cpp:1349
#4  0x0000000801a9d699 in VMError::report_and_die (this=0x7fffffffbfc0)
    
at /usr/ports/java/jdk15/work/hotspot/src/share/vm/utilities/vmError.cpp:697
#5  0x0000000801938f17 in JVM_handle_bsd_signal (sig=11, info=0x7fffffffc3f0, 
ucVoid=0x7fffffffc080, 
    abort_if_unrecognized=1) 
at /usr/ports/java/jdk15/work/hotspot/src/os_cpu/bsd_amd64/vm/os_bsd_amd64.cpp:558
#6  <signal handler called>
#7  0x0000000851f90ed4 in mlib_ImageSet (image=0x53157000, type=MLIB_BYTE, 
channels=1, width=55, height=68, stride=55, 
    data=0x8483c7c48) 
at ../../../../src/share/native/sun/awt/medialib/mlib_ImageCreate.c:125
#8  0x0000000851f9118c in j2d_mlib_ImageCreateStruct (type=MLIB_BYTE, 
channels=1, width=55, height=68, stride=55, 
    data=0x8483c7c48) 
at ../../../../src/share/native/sun/awt/medialib/mlib_ImageCreate.c:213
#9  0x0000000851c8d737 in allocateArray (env=0x800e32190, imageP=0x800f2a400, 
mlibImagePP=0x7fffffffc6c8, 
    dataPP=0x7fffffffc668, isSrc=1, cvtToDefault=0, addAlpha=0)
    at ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.c:2059
#10 0x0000000851c8a7de in Java_sun_awt_image_ImagingLib_transformBI 
(env=0x800e32190, this=0x7fffffffc788, 
    jsrc=0x7fffffffc7b0, jdst=0x7fffffffc7a8, jmatrix=0x7fffffffc7a0, 
interpType=1)
    at ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.c:812
#11 0x00000008052aac40 in ?? ()
#12 0x00007fffffffc7f0 in ?? ()
#13 0x00000000000003d8 in ?? ()
#14 0x0000000801cd84f0 in vtable for HandleMarkCleaner () 
from /usr/local/jdk1.5.0/jre/lib/amd64/server/libjvm_g.so
#15 0x00000008052bdc7f in ?? ()
#16 0x00007fffffffc740 in ?? ()
#17 0x000000084c902bb8 in ?? ()
#18 0x00007fffffffc7b0 in ?? ()
#19 0x000000084c9038c0 in ?? ()
#20 0x0000000000000000 in ?? ()
#21 0x000000084c902bb8 in ?? ()
#22 0x00007fffffffc798 in ?? ()
#23 0x00007fffffffc7f0 in ?? ()
#24 0x0000000805295e1a in ?? ()
#25 0x000000084c903818 in ?? ()
#26 0x00000008052a24d6 in ?? ()
#27 0x0000000000000001 in ?? ()
#28 0x00000008466d8ac0 in ?? ()
#29 0x00000008466d8600 in ?? ()
---Type <return> to continue, or q <return> to quit---
#30 0x0000000848397330 in ?? ()
#31 0x00007fffffffc7b8 in ?? ()
#32 0x000000084c903372 in ?? ()
#33 0x00007fffffffc840 in ?? ()
#34 0x000000084c9038c0 in ?? ()
#35 0x0000000000000000 in ?? ()
#36 0x000000084c9033e0 in ?? ()
#37 0x00007fffffffc830 in ?? ()
#38 0x00007fffffffc880 in ?? ()
#39 0x0000000805295e53 in ?? ()
#40 0x0000000000000000 in ?? ()
#41 0x00000008466d8b08 in ?? ()
#42 0x00000008466d8ac0 in ?? ()
#43 0x00000008466d8518 in ?? ()
#44 0x0000000000000000 in ?? ()
#45 0x0000000000000000 in ?? ()
#46 0x00000008466d8600 in ?? ()
#47 0x0000000848397330 in ?? ()
#48 0x00000008466d8518 in ?? ()
#49 0x00007fffffffc848 in ?? ()
#50 0x000000084c900584 in ?? ()
#51 0x00007fffffffc900 in ?? ()
#52 0x000000084c9013d8 in ?? ()
#53 0x0000000000000000 in ?? ()
#54 0x000000084c900620 in ?? ()
#55 0x00007fffffffc8f0 in ?? ()
#56 0x00007fffffffc940 in ?? ()
#57 0x0000000805295e53 in ?? ()
#58 0x0000000000000000 in ?? ()
#59 0x0000000000000000 in ?? ()
#60 0x0000000000000000 in ?? ()
#61 0x0000000000000000 in ?? ()
#62 0x0000000000000000 in ?? ()
#63 0x0000000000000000 in ?? ()
#64 0x0000000000000000 in ?? ()
#65 0x0000000000000000 in ?? ()
#66 0x00000008466d8600 in ?? ()
#67 0x0000000848382db8 in ?? ()
---Type <return> to continue, or q <return> to quit---
#68 0x0000000848382db8 in ?? ()
#69 0x0000000000000000 in ?? ()
#70 0x00000008466d8600 in ?? ()
#71 0x0000000848397330 in ?? ()
#72 0x00000008466d8518 in ?? ()
#73 0x00007fffffffc908 in ?? ()
#74 0x000000084c20b00b in ?? ()
#75 0x00007fffffffc9e8 in ?? ()
#76 0x000000084c20c960 in ?? ()
#77 0x0000000000000000 in ?? ()
#78 0x000000084c20b070 in ?? ()
#79 0x00007fffffffc9a0 in ?? ()
#80 0x00007fffffffca28 in ?? ()
#81 0x0000000805295d36 in ?? ()
#82 0x00000008466d8600 in ?? ()
#83 0x0000000000000000 in ?? ()
#84 0x0000000000000000 in ?? ()
#85 0x00000008466d85e0 in ?? ()
#86 0x00000008466d8518 in ?? ()
#87 0x0000000848382db8 in ?? ()
#88 0x00000008466d81f8 in ?? ()
#89 0x0000000000000014 in ?? ()
#90 0x0000000000000014 in ?? ()
#91 0x0000000848397330 in ?? ()
#92 0x00000008466d8228 in ?? ()
#93 0x0000000000000044 in ?? ()
#94 0x0000000000000037 in ?? ()
#95 0x0000000000000000 in ?? ()
#96 0x0000000000000000 in ?? ()
#97 0x0000000000000001 in ?? ()
#98 0x00000008466d8450 in ?? ()
#99 0x0000000848397330 in ?? ()
#100 0x00000008466d8028 in ?? ()
#101 0x00000008482b6e90 in ?? ()
#102 0x00007fffffffc9f0 in ?? ()
#103 0x000000084c20abf1 in ?? ()
#104 0x00007fffffffca88 in ?? ()
#105 0x000000084c20c960 in ?? ()
---Type <return> to continue, or q <return> to quit---
#106 0x0000000000000000 in ?? ()
#107 0x000000084c20ac08 in ?? ()
#108 0x00007fffffffca40 in ?? ()
#109 0x00007fffffffcac8 in ?? ()
#110 0x0000000805295d36 in ?? ()
#111 0x00000008466d8498 in ?? ()
#112 0x00000008466d8228 in ?? ()
#113 0x0000000000000044 in ?? ()
#114 0x0000000000000037 in ?? ()
#115 0x0000000000000000 in ?? ()
#116 0x0000000000000000 in ?? ()
#117 0x0000000000000001 in ?? ()
#118 0x00000008466d8450 in ?? ()
#119 0x0000000848397330 in ?? ()
#120 0x00000008466d8028 in ?? ()
#121 0x00000008482b6e90 in ?? ()
#122 0x00007fffffffca90 in ?? ()
#123 0x000000084c20a84f in ?? ()
#124 0x00007fffffffcb28 in ?? ()
#125 0x000000084c20c960 in ?? ()
#126 0x0000000000000000 in ?? ()
#127 0x000000084c20a868 in ?? ()
#128 0x00007fffffffcaf0 in ?? ()
#129 0x00007fffffffcb68 in ?? ()
#130 0x0000000805295efe in ?? ()
#131 0x00000008466d8450 in ?? ()
#132 0x0000000000000044 in ?? ()
#133 0x0000000000000037 in ?? ()
#134 0x00000008466d8228 in ?? ()
#135 0x0000000000000014 in ?? ()
#136 0x0000000000000014 in ?? ()
#137 0x0000000000000000 in ?? ()
#138 0x0000000000000000 in ?? ()
#139 0x0000000848397330 in ?? ()
#140 0x00000008466d8028 in ?? ()
#141 0x00000008482b6e90 in ?? ()
#142 0x00007fffffffcb30 in ?? ()
#143 0x000000084c20c20b in ?? ()
---Type <return> to continue, or q <return> to quit---
#144 0x00007fffffffcbc8 in ?? ()
#145 0x000000084c20c960 in ?? ()
#146 0x0000000000000000 in ?? ()
#147 0x000000084c20c248 in ?? ()
#148 0x00007fffffffcb88 in ?? ()
#149 0x00007fffffffcc08 in ?? ()
#150 0x0000000805296300 in ?? ()
#151 0x0000000000000000 in ?? ()
#152 0x0000000000000000 in ?? ()
#153 0x0000000000000000 in ?? ()
#154 0x00000008466d8228 in ?? ()
#155 0x0000000000000014 in ?? ()
#156 0x0000000000000014 in ?? ()
#157 0x0000000000000000 in ?? ()
#158 0x0000000000000000 in ?? ()
#159 0x0000000848397330 in ?? ()
#160 0x00000008466d8028 in ?? ()
#161 0x00000008482b6e90 in ?? ()
#162 0x00007fffffffcbd0 in ?? ()
#163 0x000000084c22a180 in ?? ()
#164 0x00007fffffffcc60 in ?? ()
#165 0x000000084c23b9b8 in ?? ()
#166 0x0000000000000000 in ?? ()
#167 0x000000084c22a1b8 in ?? ()
#168 0x00007fffffffcc28 in ?? ()
#169 0x00007fffffffcca0 in ?? ()
#170 0x0000000805295efe in ?? ()
#171 0x0000000000000000 in ?? ()
#172 0x0000000000000000 in ?? ()
#173 0x0000000000000000 in ?? ()
#174 0x00000008466d8228 in ?? ()
#175 0x0000000000000014 in ?? ()
#176 0x0000000000000014 in ?? ()
#177 0x0000000000000000 in ?? ()
#178 0x0000000000000000 in ?? ()
#179 0x0000000848397330 in ?? ()
#180 0x00000008466d8028 in ?? ()
#181 0x00007fffffffcc68 in ?? ()
---Type <return> to continue, or q <return> to quit---
#182 0x000000084c3e2d44 in ?? ()
#183 0x00007fffffffcd00 in ?? ()
#184 0x000000084c3e4838 in ?? ()
#185 0x0000000000000000 in ?? ()
#186 0x000000084c3e2d60 in ?? ()
#187 0x00007fffffffccc0 in ?? ()
#188 0x00007fffffffcd40 in ?? ()
#189 0x0000000805295efe in ?? ()
#190 0x0000000000000000 in ?? ()
#191 0x0000000000000001 in ?? ()
#192 0x0000000000000000 in ?? ()
#193 0x00000008466d8228 in ?? ()
#194 0x0000000000000014 in ?? ()
#195 0x0000000000000014 in ?? ()
#196 0x0000000000000000 in ?? ()
#197 0x0000000000000000 in ?? ()
#198 0x0000000848392f38 in ?? ()
#199 0x00000008466d8028 in ?? ()
#200 0x0000000848393d00 in ?? ()
#201 0x00007fffffffcd08 in ?? ()
#202 0x000000084c20c238 in ?? ()
#203 0x00007fffffffcda0 in ?? ()
#204 0x000000084c20c960 in ?? ()
#205 0x0000000000000000 in ?? ()
#206 0x000000084c20c248 in ?? ()
#207 0x00007fffffffcd60 in ?? ()
#208 0x00007fffffffcde0 in ?? ()
#209 0x0000000805296300 in ?? ()
#210 0x0000000848393d00 in ?? ()
#211 0x0000000848392f38 in ?? ()
#212 0x0000000000000000 in ?? ()
#213 0x00000008466d8228 in ?? ()
#214 0x0000000000000014 in ?? ()
#215 0x0000000000000014 in ?? ()
#216 0x0000000000000000 in ?? ()
#217 0x0000000000000000 in ?? ()
#218 0x0000000848392f38 in ?? ()
#219 0x00000008466d8028 in ?? ()
---Type <return> to continue, or q <return> to quit---
#220 0x00000008482b6e90 in ?? ()
#221 0x00007fffffffcda8 in ?? ()
#222 0x000000084c242ac9 in ?? ()
#223 0x00007fffffffce30 in ?? ()
#224 0x000000084c243250 in ?? ()
#225 0x0000000000000000 in ?? ()
#226 0x000000084c242ad8 in ?? ()
#227 0x00007fffffffcdf0 in ?? ()
#228 0x00007fffffffce70 in ?? ()
#229 0x0000000805296300 in ?? ()
#230 0x0000000000000000 in ?? ()
#231 0x00000008466d8228 in ?? ()
#232 0x0000000000000014 in ?? ()
#233 0x0000000000000014 in ?? ()
#234 0x0000000000000000 in ?? ()
#235 0x0000000000000000 in ?? ()
#236 0x0000000848392f38 in ?? ()
#237 0x00000008466d8028 in ?? ()
#238 0x00000008482b4a78 in ?? ()
#239 0x00007fffffffce38 in ?? ()
#240 0x000000084c22a180 in ?? ()
#241 0x00007fffffffcec8 in ?? ()
#242 0x000000084c23b9b8 in ?? ()
#243 0x0000000000000000 in ?? ()
#244 0x000000084c22a1b8 in ?? ()
#245 0x00007fffffffce90 in ?? ()
#246 0x00007fffffffcf08 in ?? ()
#247 0x0000000805295efe in ?? ()
#248 0x0000000000000000 in ?? ()
#249 0x0000000000000000 in ?? ()
#250 0x0000000000000000 in ?? ()
#251 0x00000008466d8228 in ?? ()
#252 0x0000000000000014 in ?? ()
#253 0x0000000000000014 in ?? ()
#254 0x0000000000000000 in ?? ()
#255 0x0000000000000000 in ?? ()
#256 0x0000000848392f38 in ?? ()
#257 0x00000008466d8028 in ?? ()
---Type <return> to continue, or q <return> to quit---
#258 0x00007fffffffced0 in ?? ()
#259 0x000000084c8f5403 in ?? ()
#260 0x00007fffffffcf30 in ?? ()
#261 0x000000084c8f72b0 in ?? ()
#262 0x0000000000000000 in ?? ()
#263 0x000000084c8f5418 in ?? ()
#264 0x00007fffffffcf28 in ?? ()
#265 0x00007fffffffcf70 in ?? ()
#266 0x0000000805295e53 in ?? ()
#267 0x00000008466d8028 in ?? ()
#268 0x00000008466d7390 in ?? ()
#269 0x0000000000000014 in ?? ()
#270 0x000000084666b760 in ?? ()
#271 0x00007fffffffcf38 in ?? ()
#272 0x000000084c8f51d4 in ?? ()
#273 0x00007fffffffcf90 in ?? ()
#274 0x000000084c8f72b0 in ?? ()
#275 0x0000000000000000 in ?? ()
#276 0x000000084c8f51f0 in ?? ()
#277 0x00007fffffffcf80 in ?? ()
#278 0x00007fffffffcfd0 in ?? ()
#279 0x0000000805295e53 in ?? ()
#280 0x0000000000000001 in ?? ()
#281 0x0000000000000014 in ?? ()
#282 0x000000084666b760 in ?? ()
#283 0x00007fffffffcf98 in ?? ()
#284 0x000000084c8f9a87 in ?? ()
#285 0x00007fffffffd010 in ?? ()
#286 0x000000084c8fb258 in ?? ()
#287 0x0000000000000000 in ?? ()
#288 0x000000084c8f9b08 in ?? ()
#289 0x00007fffffffd000 in ?? ()
#290 0x00007fffffffd078 in ?? ()
#291 0x0000000805295d36 in ?? ()
#292 0x00000008466d4920 in ?? ()
#293 0x00000008466c7368 in ?? ()
#294 0x0000000000000001 in ?? ()
#295 0x00000008466c57b8 in ?? ()
---Type <return> to continue, or q <return> to quit---
#296 0x000000084666b760 in ?? ()
#297 0x000000084666b760 in ?? ()
#298 0x000000084668cde0 in ?? ()
#299 0x000000084668cde0 in ?? ()
#300 0x0000000000000000 in ?? ()
#301 0x0000000846689c88 in ?? ()
#302 0x0000000846689c88 in ?? ()
#303 0x000000084666b760 in ?? ()
#304 0x00007fffffffd040 in ?? ()
#305 0x000000084c8f50cc in ?? ()
#306 0x00007fffffffd088 in ?? ()
#307 0x000000084c8f72b0 in ?? ()
#308 0x0000000000000000 in ?? ()
#309 0x000000084c8f50f8 in ?? ()
#310 0x00007fffffffd088 in ?? ()
#311 0x00007fffffffd0f0 in ?? ()
#312 0x000000080529349d in ?? ()
#313 0x000000084666b760 in ?? ()
#314 0x0000000800001f80 in ?? ()
#315 0x00007fffffffd3a0 in ?? ()
#316 0x00007fffffffd440 in ?? ()
#317 0x0000000000000001 in ?? ()
#318 0x0000000800e32018 in ?? ()
#319 0x0000000800e33068 in ?? ()
#320 0x00007fffffffd180 in ?? ()
#321 0x00007fffffffd448 in ?? ()
#322 0x000000080000000a in ?? ()
#323 0x000000084c8f50f8 in ?? ()
#324 0x00000008052a5e60 in ?? ()
#325 0x00007fffffffd3b0 in ?? ()
#326 0x00007fffffffd210 in ?? ()
#327 0x000000080167826c in JavaCalls::call_helper (result=0x7fffffffc7b0, 
m=0x1, args=0x800e32018, 
    __the_thread__=0x8052aac1e) at stubRoutines.hpp:130
Previous frame inner to this frame (corrupt stack?)
(gdb) 
(gdb) frame 7
#7  0x0000000851f90ed4 in mlib_ImageSet (image=0x53157000, type=MLIB_BYTE, 
channels=1, width=55, height=68, stride=55, 
    data=0x8483c7c48) 
at ../../../../src/share/native/sun/awt/medialib/mlib_ImageCreate.c:125
125	  image -> type     = type;
(gdb) list 100
95	 *      puts it into mlib_image->state field.
96	 *
97	 *      mlib_ImageDeleteRowTable() deletes row starts pointer table from
98	 *      image and puts NULL into mlib_image->state field.
99	 *
100	 *      mlib_ImageSetPaddings() sets new values for the clipping box 
paddings
101	 *
102	 *      mlib_ImageSetFormat() sets new value for the image format
103	 */
104	
(gdb) 
105	#include <stdlib.h>
106	#include "mlib_image.h"
107	#include "mlib_ImageRowTable.h"
108	#include "mlib_ImageCreate.h"
109	
110	/***************************************************************/
111	mlib_image* mlib_ImageSet(mlib_image *image,
112	                          mlib_type  type,
113	                          mlib_s32   channels,
114	                          mlib_s32   width,
(gdb) 
115	                          mlib_s32   height,
116	                          mlib_s32   stride,
117	                          const void *data)
118	{
119	  mlib_s32        wb;                /* width in bytes */
120	  mlib_s32        mask;              /* mask for check of stride */
121	
122	  if (image == NULL) return NULL;
123	
124	/* for some ugly functions calling with incorrect parameters */
(gdb) 
125	  image -> type     = type;
126	  image -> channels = channels;
127	  image -> width    = width;
128	  image -> height   = height;
129	  image -> stride   = stride;
130	  image -> data     = (void *)data;
131	  image -> state    = NULL;
132	  image -> format   = MLIB_FORMAT_UNKNOWN;
133	
134	  image -> paddings[0] = 0;
(gdb) print *image
Cannot access memory at address 0x53157000
(gdb) info regs  [K
rax            0x1	1
rbx            0x84c902bb8	35644255160
rcx            0x37	55
rdx            0x53157000	1393913856
rsi            0x1	1
rdi            0x53157000	1393913856
rbp            0x7fffffffc4c0	0x7fffffffc4c0
rsp            0x7fffffffc4c0	0x7fffffffc4c0
r8             0x44	68
r9             0x37	55
r10            0x1	1
r11            0x53157000	1393913856
r12            0x8052aac1e	34446421022
r13            0x84c902bb8	35644255160
r14            0x7fffffffc7b0	140737488340912
r15            0x800e32018	34374623256
rip            0x851f90ed4	0x851f90ed4 <mlib_ImageSet+52>
eflags         0x10206	66054
cs             0x2b	43
ss             0x23	35
ds             0x0	0
es             0x0	0
fs             0x0	0
gs             0x0	0
(gdb) frame 8
#8  0x0000000851f9118c in j2d_mlib_ImageCreateStruct (type=MLIB_BYTE, 
channels=1, width=55, height=68, stride=55, 
    data=0x8483c7c48) 
at ../../../../src/share/native/sun/awt/medialib/mlib_ImageCreate.c:213
213	  if (mlib_ImageSet(image, type, channels, width, height, stride, data) == 
NULL) {
(gdb) list 200
195	/***************************************************************/
196	mlib_image *mlib_ImageCreateStruct(mlib_type  type,
197	                                   mlib_s32   channels,
198	                                   mlib_s32   width,
199	                                   mlib_s32   height,
200	                                   mlib_s32   stride,
201	                                   const void *data)
202	{
203	  mlib_image *image;
204	  if (stride <= 0) {
(gdb) 
205	    return NULL;
206	  }
207	
208	  image = (mlib_image *)mlib_malloc(sizeof(mlib_image));
209	  if (image == NULL) {
210	    return NULL;
211	  }
212	
213	  if (mlib_ImageSet(image, type, channels, width, height, stride, data) == 
NULL) {
214	    mlib_free(image);
(gdb) 
215	    image = NULL;
216	  }
217	
218	  return image;
219	}
220	
221	/***************************************************************/
222	mlib_image *mlib_ImageCreate(mlib_type type,
223	                             mlib_s32  channels,
224	                             mlib_s32  width,
(gdb) frame 9
#9  0x0000000851c8d737 in allocateArray (env=0x800e32190, imageP=0x800f2a400, 
mlibImagePP=0x7fffffffc6c8, 
    dataPP=0x7fffffffc668, isSrc=1, cvtToDefault=0, addAlpha=0)
    at ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.c:2059
2059	        *mlibImagePP = (*sMlibSysFns.createStructFP)(MLIB_BYTE,
(gdb) list
2054	        int nChans = (cmP->isDefaultCompatCM ? 4 : hintP->numChans);
2055	        /* Easy case.  It is or is similar to the default CM so use
2056	     * the array.  Must be byte data.
2057	         */
2058	            /* Create the medialib image */
2059	        *mlibImagePP = (*sMlibSysFns.createStructFP)(MLIB_BYTE,
2060	                                              nChans,
2061	                                              width,
2062	                                              height,
2063	                                              hintP->sStride,
(gdb) frame 10
#10 0x0000000851c8a7de in Java_sun_awt_image_ImagingLib_transformBI 
(env=0x800e32190, this=0x7fffffffc788, 
    jsrc=0x7fffffffc7b0, jdst=0x7fffffffc7a8, jmatrix=0x7fffffffc7a0, 
interpType=1)
    at ../../../src/share/native/sun/awt/medialib/awt_ImagingLib.c:812
812	    if (allocateArray(env, srcImageP, &src, &sdata, TRUE,
(gdb) list
807	        awt_freeParsedImage(dstImageP, TRUE);
808	        return 0;
809	    }
810	
811	    /* Allocate the arrays */
812	    if (allocateArray(env, srcImageP, &src, &sdata, TRUE,
813	                      hint.cvtSrcToDefault, hint.addAlpha) < 0) {
814	        /* Must be some problem */
815	        awt_freeParsedImage(srcImageP, TRUE);
816	        awt_freeParsedImage(dstImageP, TRUE);
(gdb) quit
%exit

exit

Script done on Fri Oct 20 21:56:40 2006
--------------------------
in frame #7, the image pointer's is 0x53157000, it looks like a
valid address, but the memory it pointing is inaccessible, so I think
the mlib_malloc() just returned an unusable memory address.
The gdb's output for libthr seems better than for libpthread.

David Xu


More information about the freebsd-java mailing list