(jvmti) Settings tags on jobjects causes application to crash

D

Dusty Lefevre

hi,
i'm writing a jvmti agent that counts instances of loaded classes. For
this i us tags. I place the tag on a jclass in ClassPrepareEvent
callback with the etTag function. When i do this, any app that i
trace, will crash... When i iterate over the heap and tag objects, the
app will crash on the next callback event (method entry/exit, ...).
When i disable the line that places the tag, no crash will occure.
I've included the dumped error log.
Hope somebody can help me with this, i've been looking for day's and
haven't found anything...

Thanks,
Dusty Lefevre

This crash occured when only tagging newly prepared classes, all with
a unique tags. After running for a while, it just died...

# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0x00000054, pid=6692, tid=1310002096
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_02-b09 mixed mode)
# Problematic frame:
# C 0x00000054
#

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

Current thread (0x080d4518): VMThread [id=6699]

siginfo:si_signo=11, si_errno=0, si_code=0, si_addr=0x00000000

Registers:
EAX=0x08079bf0, EBX=0x404955a8, ECX=0x00000000, EDX=0x083e8268
ESP=0x4e15057c, EBP=0x4e150598, ESI=0x00000054, EDI=0x080d5168
EIP=0x00000054, CR2=0x00000054, EFLAGS=0x00010216

Top of Stack: (sp=0x4e15057c)
0x4e15057c: 40372713 08079bf0 083e8268 00000000
0x4e15058c: 40317e9a 08079be8 00000000 4e150608
0x4e15059c: 4037f866 08079be8 083e8268 00000000
0x4e1505ac: 080d9fb8 00000000 0808a078 083e8268
0x4e1505bc: 00000000 0808a100 00000000 083fc0d0
0x4e1505cc: 00000243 000012c1 080d9fd8 080d9fb8
0x4e1505dc: 00000001 00000000 080d9fb8 00000000
0x4e1505ec: 00000000 00000000 00000001 4e150678

Instructions: (pc=0x00000054)
0x00000044:
[error occurred during error reporting, step 100, id 0xb]

Stack: [0x4e0d0000,0x4e151000), sp=0x4e15057c, free space=513k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
C=native code)
C 0x00000054
V [libjvm.so+0x220866]
V [libjvm.so+0x220505]
V [libjvm.so+0x218bd0]
V [libjvm.so+0x2e2d30]
V [libjvm.so+0x2e2a86]
V [libjvm.so+0x2e20f7]
V [libjvm.so+0x2e2305]
V [libjvm.so+0x2e1f10]
V [libjvm.so+0x255558]
C [libpthread.so.0+0x57f3]

VM_Operation (0x4ef310f0): generation collection for allocation, mode:
safepoint, requested by thread 0x08574668


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

Java Threads: ( => current thread )
0x086812c0 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=6711]
0x08680bb8 JavaThread "AWT-Shutdown" [_thread_blocked, id=6710]
0x08599fd0 JavaThread "Image Fetcher 1" daemon [_thread_blocked,
id=6709]
0x08574668 JavaThread "Image Fetcher 0" daemon [_thread_blocked,
id=6708]
0x0843d0d8 JavaThread "AWT-XAWT" daemon [_thread_blocked, id=6707]
0x08427fd8 JavaThread "Java2D Disposer" daemon [_thread_blocked,
id=6706]
0x080fac60 JavaThread "Low Memory Detector" daemon [_thread_blocked,
id=6704]
0x080f9748 JavaThread "CompilerThread0" daemon [_thread_blocked,
id=6703]
0x080f88d8 JavaThread "Signal Dispatcher" daemon [_thread_blocked,
id=6702]
0x080e3de0 JavaThread "Finalizer" daemon [_thread_blocked, id=6701]
0x080e2f88 JavaThread "Reference Handler" daemon [_thread_blocked,
id=6700]
0x0807b780 JavaThread "main" [_thread_blocked, id=6692]

Other Threads:
=>0x080d4518 VMThread [id=6699]
0x080fc2e8 WatcherThread [id=6705]

VM state:at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x0807abc8/0x0807abf0] Threads_lock - owner thread: 0x080d4518
[0x0807b018/0x0807b030] Heap_lock - owner thread: 0x08574668

Heap
def new generation total 576K, used 0K [0x46050000, 0x460f0000,
0x46530000)
eden space 512K, 0% used [0x46050000, 0x460502e8, 0x460d0000)
from space 64K, 0% used [0x460d0000, 0x460d0000, 0x460e0000)
to space 64K, 0% used [0x460e0000, 0x460e0000, 0x460f0000)
tenured generation total 2212K, used 1326K [0x46530000, 0x46759000,
0x4a050000)
the space 2212K, 59% used [0x46530000, 0x4667b8e0, 0x4667ba00,
0x46759000)
compacting perm gen total 8192K, used 7011K [0x4a050000, 0x4a850000,
0x4e050000)
the space 8192K, 85% used [0x4a050000, 0x4a728ca0, 0x4a728e00,
0x4a850000)
No shared spaces configured.

Dynamic libraries:
08048000-08056000 r-xp 00000000 03:02 243113
/usr/java/jdk1.5.0_02/bin/java
08056000-08058000 rwxp 0000e000 03:02 243113
/usr/java/jdk1.5.0_02/bin/java
08058000-086a8000 rwxp 08058000 00:00 0
40000000-40016000 r-xp 00000000 03:02 7968 /lib/ld-2.3.3.so
40016000-40018000 rwxp 00015000 03:02 7968 /lib/ld-2.3.3.so
40031000-40032000 rwxp 40031000 00:00 0
40032000-40040000 r-xp 00000000 03:02 7996
/lib/tls/libpthread.so.0
40040000-40042000 rwxp 0000d000 03:02 7996
/lib/tls/libpthread.so.0
40042000-40044000 rwxp 40042000 00:00 0
40044000-40046000 r-xp 00000000 03:02 7977 /lib/libdl.so.2
40046000-40048000 rwxp 00001000 03:02 7977 /lib/libdl.so.2
40048000-40157000 r-xp 00000000 03:02 7994 /lib/tls/libc.so.6
40157000-40158000 ---p 0010f000 03:02 7994 /lib/tls/libc.so.6
40158000-40159000 r-xp 0010f000 03:02 7994 /lib/tls/libc.so.6
40159000-4015c000 rwxp 00110000 03:02 7994 /lib/tls/libc.so.6
4015c000-4015f000 rwxp 4015c000 00:00 0
4015f000-4047b000 r-xp 00000000 03:02 291199
/usr/java/jdk1.5.0_02/jre/lib/i386/client/libjvm.so
4047b000-40498000 rwxp 0031c000 03:02 291199
/usr/java/jdk1.5.0_02/jre/lib/i386/client/libjvm.so
40498000-408ae000 rwxp 40498000 00:00 0
408ae000-408af000 ---p 408ae000 00:00 0
408af000-408b5000 r-xp 00000000 03:02 291240
/usr/java/jdk1.5.0_02/jre/lib/i386/native_threads/libhpi.so
408b5000-408b6000 rwxp 00006000 03:02 291240
/usr/java/jdk1.5.0_02/jre/lib/i386/native_threads/libhpi.so
408c7000-408e8000 r-xp 00000000 03:02 7995 /lib/tls/libm.so.6
408e8000-408ea000 rwxp 00020000 03:02 7995 /lib/tls/libm.so.6
40903000-40915000 r-xp 00000000 03:02 7980 /lib/libnsl.so.1
40915000-40917000 rwxp 00011000 03:02 7980 /lib/libnsl.so.1
40917000-40919000 rwxp 40917000 00:00 0
40919000-40956000 r-xp 00000000 03:45 8127
/mnt/extended/moonsphere/Documents/Project/Agent/libtracer.so
40956000-40958000 rwxp 0003d000 03:45 8127
/mnt/extended/moonsphere/Documents/Project/Agent/libtracer.so
40958000-40c66000 r-xp 00000000 03:02 155245
/usr/local/lib/libxerces-c.so.26.0
40c66000-40c96000 rwxp 0030e000 03:02 155245
/usr/local/lib/libxerces-c.so.26.0
40c96000-40cb6000 r-xp 00000000 03:02 151514
/usr/local/apr/lib/libapr-1.so.0.0.0
40cb6000-40cb7000 rwxp 0001f000 03:02 151514
/usr/local/apr/lib/libapr-1.so.0.0.0
40cb7000-40cb8000 rwxp 40cb7000 00:00 0
40cd0000-40ce0000 r-xp 00000000 03:02 11460 /lib/libz.so.1.2.1
40ce0000-40ce1000 rwxp 0000f000 03:02 11460 /lib/libz.so.1.2.1
40ce1000-40d94000 r-xp 00000000 03:02 12441
/usr/lib/libstdc++.so.5.0.7
40d94000-40d99000 rwxp 000b3000 03:02 12441
/usr/lib/libstdc++.so.5.0.7
40d99000-40d9e000 rwxp 40d99000 00:00 0
40d9e000-40da5000 r-xp 00000000 03:02 11628 /lib/libgcc_s.so.1
40da5000-40da6000 rwxp 00006000 03:02 11628 /lib/libgcc_s.so.1
40da6000-40dad000 r-xp 00000000 03:02 7997 /lib/tls/librt.so.1
40dad000-40daf000 rwxp 00006000 03:02 7997 /lib/tls/librt.so.1
40daf000-40db7000 r-xp 00000000 03:02 7976 /lib/libcrypt.so.1
40db7000-40dba000 rwxp 00007000 03:02 7976 /lib/libcrypt.so.1
40dba000-40de1000 rwxp 40dba000 00:00 0
40dfa000-40e02000 r-xp 00000000 03:02 7983
/lib/libnss_files.so.2
40e02000-40e04000 rwxp 00007000 03:02 7983
/lib/libnss_files.so.2
40e04000-40e05000 ---p 40e04000 00:00 0
40e05000-4102e000 rwxp 40e05000 00:00 0
4102e000-41063000 r-xs 00000000 03:02 147075 /var/run/nscd/passwd
41063000-4106b000 rwxs 00000000 03:02 146553
/tmp/hsperfdata_moonsphere/6692
4106b000-41076000 r-xp 00000000 03:02 291235
/usr/java/jdk1.5.0_02/jre/lib/i386/libverify.so
41076000-41077000 rwxp 0000b000 03:02 291235
/usr/java/jdk1.5.0_02/jre/lib/i386/libverify.so
41077000-41098000 r-xp 00000000 03:02 291216
/usr/java/jdk1.5.0_02/jre/lib/i386/libjava.so
41098000-4109a000 rwxp 00020000 03:02 291216
/usr/java/jdk1.5.0_02/jre/lib/i386/libjava.so
4109a000-410ad000 r-xp 00000000 03:02 291236
/usr/java/jdk1.5.0_02/jre/lib/i386/libzip.so
410ad000-410af000 rwxp 00012000 03:02 291236
/usr/java/jdk1.5.0_02/jre/lib/i386/libzip.so
410af000-4368d000 r-xs 00000000 03:02 291783
/usr/java/jdk1.5.0_02/jre/lib/rt.jar
4368d000-436f6000 rwxp 4368d000 00:00 0
436f6000-4377d000 r-xs 00000000 03:02 291339
/usr/java/jdk1.5.0_02/jre/lib/jsse.jar
4377d000-43791000 r-xs 00000000 03:02 291280
/usr/java/jdk1.5.0_02/jre/lib/jce.jar
43791000-43fcc000 r-xs 00000000 03:02 291281
/usr/java/jdk1.5.0_02/jre/lib/charsets.jar
43fcc000-440bc000 rwxp 43fcc000 00:00 0
440bc000-45fcc000 rwxp 440bc000 00:00 0
45fcc000-45fd0000 rwxp 45fcc000 00:00 0
45fd0000-4604c000 rwxp 45fd0000 00:00 0
4604c000-4604e000 r-xs 00000000 03:02 291159
/usr/java/jdk1.5.0_02/jre/lib/ext/dnsns.jar
46050000-460f0000 rwxp 46050000 00:00 0
460f0000-46530000 rwxp 460f0000 00:00 0
46530000-46759000 rwxp 46530000 00:00 0
46759000-4a050000 rwxp 46759000 00:00 0
4a050000-4a850000 rwxp 4a050000 00:00 0
4a850000-4e050000 rwxp 4a850000 00:00 0
4e050000-4e051000 rwxp 4e050000 00:00 0
4e051000-4e052000 rwxp 4e051000 00:00 0
4e052000-4e054000 rwxp 4e052000 00:00 0
4e054000-4e070000 rwxp 4e054000 00:00 0
4e070000-4e074000 rwxp 4e070000 00:00 0
4e074000-4e090000 rwxp 4e074000 00:00 0
4e090000-4e093000 rwxp 4e090000 00:00 0
4e093000-4e0af000 rwxp 4e093000 00:00 0
4e0af000-4e0b4000 rwxp 4e0af000 00:00 0
4e0b4000-4e0d0000 rwxp 4e0b4000 00:00 0
4e0d0000-4e0d1000 ---p 4e0d0000 00:00 0
4e0d1000-4e151000 rwxp 4e0d1000 00:00 0
4e151000-4e154000 ---p 4e151000 00:00 0
4e154000-4e1d2000 rwxp 4e154000 00:00 0
4e1d2000-4e1d5000 ---p 4e1d2000 00:00 0
4e1d5000-4e253000 rwxp 4e1d5000 00:00 0
4e253000-4e286000 r-xp 00000000 03:02 11254
/usr/lib/locale/en_US.utf8/LC_CTYPE
4e286000-4e28c000 r-xs 00000000 03:02 8624
/usr/lib/gconv/gconv-modules.cache
4e28c000-4e28f000 ---p 4e28c000 00:00 0
4e28f000-4e30d000 rwxp 4e28f000 00:00 0
4e30d000-4e310000 ---p 4e30d000 00:00 0
4e310000-4e38e000 rwxp 4e310000 00:00 0
4e38e000-4e391000 ---p 4e38e000 00:00 0
4e391000-4e40f000 rwxp 4e391000 00:00 0
4e40f000-4e410000 ---p 4e40f000 00:00 0
4e410000-4e490000 rwxp 4e410000 00:00 0
4e490000-4e92b000 r-xs 00000000 03:02 283175
/home/moonsphere/yajp-0.4.0-install.jar
4e92b000-4e956000 r-xs 00000000 03:02 291162
/usr/java/jdk1.5.0_02/jre/lib/ext/sunpkcs11.jar
4e956000-4e97c000 r-xs 00000000 03:02 291161
/usr/java/jdk1.5.0_02/jre/lib/ext/sunjce_provider.jar
4e97c000-4ea40000 r-xs 00000000 03:02 291148
/usr/java/jdk1.5.0_02/jre/lib/ext/localedata.jar
4ea40000-4eab5000 r-xp 00000000 03:02 291205
/usr/java/jdk1.5.0_02/jre/lib/i386/libawt.so
4eab5000-4eabb000 rwxp 00074000 03:02 291205
/usr/java/jdk1.5.0_02/jre/lib/i386/libawt.so
4eabb000-4eadf000 rwxp 4eabb000 00:00 0
4eadf000-4eba5000 r-xp 00000000 03:02 291228
/usr/java/jdk1.5.0_02/jre/lib/i386/libmlib_image.so
4eba5000-4eba6000 rwxp 000c5000 03:02 291228
/usr/java/jdk1.5.0_02/jre/lib/i386/libmlib_image.so
4eba6000-4ebdb000 r-xp 00000000 03:02 291246
/usr/java/jdk1.5.0_02/jre/lib/i386/xawt/libmawt.so
4ebdb000-4ebde000 rwxp 00035000 03:02 291246
/usr/java/jdk1.5.0_02/jre/lib/i386/xawt/libmawt.so
4ebde000-4ebdf000 rwxp 4ebde000 00:00 0
4ebdf000-4ebf3000 r-xp 00000000 03:02 291230
/usr/java/jdk1.5.0_02/jre/lib/i386/libnet.so
4ebf3000-4ebf4000 rwxp 00013000 03:02 291230
/usr/java/jdk1.5.0_02/jre/lib/i386/libnet.so
4ebf8000-4ec05000 r-xp 00000000 03:02 12689
/usr/X11R6/lib/libXext.so.6.4
4ec05000-4ec06000 rwxp 0000d000 03:02 12689
/usr/X11R6/lib/libXext.so.6.4
4ec06000-4ecfe000 r-xp 00000000 03:02 12674
/usr/X11R6/lib/libX11.so.6.2
4ecfe000-4ed02000 rwxp 000f7000 03:02 12674
/usr/X11R6/lib/libX11.so.6.2
4ed02000-4ed75000 r-xp 00000000 03:02 291210
/usr/java/jdk1.5.0_02/jre/lib/i386/libfontmanager.so
4ed75000-4ed7f000 rwxp 00073000 03:02 291210
/usr/java/jdk1.5.0_02/jre/lib/i386/libfontmanager.so
4ed7f000-4ed83000 rwxp 4ed7f000 00:00 0
4ed83000-4ed86000 ---p 4ed83000 00:00 0
4ed86000-4ee04000 rwxp 4ed86000 00:00 0
4ee04000-4ee05000 r-xp 00000000 03:02 194518
/usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2
4ee05000-4ee06000 rwxp 00000000 03:02 194518
/usr/X11R6/lib/X11/locale/lib/common/xlcUTF8Load.so.2
4ee06000-4ee0c000 r-xp 00000000 03:02 291231
/usr/java/jdk1.5.0_02/jre/lib/i386/libnio.so
4ee0c000-4ee0d000 rwxp 00005000 03:02 291231
/usr/java/jdk1.5.0_02/jre/lib/i386/libnio.so
4ee1f000-4ee27000 r-xp 00000000 03:02 12685
/usr/X11R6/lib/libXcursor.so.1.0.2
4ee27000-4ee28000 rwxp 00007000 03:02 12685
/usr/X11R6/lib/libXcursor.so.1.0.2
4ee28000-4ee2f000 r-xp 00000000 03:02 146252
/usr/X11R6/lib/libXrender.so.1.2.2
4ee2f000-4ee30000 rwxp 00006000 03:02 146252
/usr/X11R6/lib/libXrender.so.1.2.2
4ee30000-4ee33000 ---p 4ee30000 00:00 0
4ee33000-4eeb1000 rwxp 4ee33000 00:00 0
4eeb1000-4eeb4000 ---p 4eeb1000 00:00 0
4eeb4000-4ef32000 rwxp 4eeb4000 00:00 0
4ef32000-4ef35000 ---p 4ef32000 00:00 0
4ef35000-4efb3000 rwxp 4ef35000 00:00 0
4efb3000-4efb6000 ---p 4efb3000 00:00 0
4efb6000-4f034000 rwxp 4efb6000 00:00 0
4f034000-4f037000 ---p 4f034000 00:00 0
4f037000-4f0b5000 rwxp 4f037000 00:00 0
bfe00000-bfe03000 ---p bfe00000 00:00 0
bfe03000-c0000000 rwxp bfe03000 00:00 0
ffffe000-fffff000 ---p 00000000 00:00 0

VM Arguments:
jvm_args: -agentpath:/mnt/extended/moonsphere/Documents/Project/Agent/libtracer.so=localhost:10111
java_command: /home/moonsphere/yajp-0.4.0-install.jar

Environment Variables:
JAVA_HOME=/usr/java/jdk1.5.0
JRE_HOME=/usr/java/jdk1.5.0
PATH=/usr/java/jdk1.5.0/bin:/usr/java/jdk1.5.0/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/jvm/jre/bin
LD_LIBRARY_PATH=/usr/java/jdk1.5.0_02/jre/lib/i386/client:/usr/java/jdk1.5.0_02/jre/lib/i386:/usr/java/jdk1.5.0_02/jre/../lib/i386::/usr/local/apr/lib:/usr/local/lib
SHELL=/bin/bash
DISPLAY=:0.0
HOSTTYPE=i386
OSTYPE=linux
MACHTYPE=i686-suse-linux


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

OS:SuSE Linux 9.2 (i586)
VERSION = 9.2

uname:Linux 2.6.8-24.13-default #1 Fri Mar 18 10:19:42 UTC 2005 i686
libc:glibc 2.3.3 NPTL 2.3.3
rlimit: STACK infinity, CORE 0k, NPROC 8185, NOFILE 1024, AS infinity
load average:0.34 0.26 0.24

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

Memory: 4k page, physical 1035012k(153044k free), swap
1052216k(1052216k free)

vm_info: Java HotSpot(TM) Client VM (1.5.0_02-b09) for linux-x86,
built on Mar 4 2005 03:08:25 by java_re with gcc 3.2.1-7a (J2SE
release)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top