JVM crashes at getJavaJniClass()-getClass()
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Evgeny_Drukh
Posted On:   Wednesday, August 9, 2006 04:59 AM

I use jdk 1.5.0_07 on Fedora, together with jace 1.1.rc1_05, compiled with gcc 3.4.4 The C++ main loads JVM, and runs a method which calls a native method implemented back in C++. When the native method converts jstring to std::string (using autoproxy-generated code), the program crashes. Thanks, Evgeny The JVM crash log follows: # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb79813f8, pid=15731, tid=3076912832 # # Java VM: Java HotSpot(TM) Client VM (1.5.0_07-b03 mixed mode, sharing) # Problematic frame: # V [libjvm.so+0x1843f8] # --------------- T H R E A D ---   More>>


I use jdk 1.5.0_07 on Fedora, together with jace 1.1.rc1_05, compiled with gcc 3.4.4



The C++ main loads JVM, and runs a method which calls a native method implemented back in C++. When the native method converts jstring to std::string (using autoproxy-generated code), the program crashes.



Thanks,

Evgeny


The JVM crash log follows:
			
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0xb79813f8, pid=15731, tid=3076912832
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_07-b03 mixed mode, sharing)
# Problematic frame:
# V [libjvm.so+0x1843f8]
#

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

Current thread (0x08e7a030): JavaThread "main" [_thread_in_vm, id=15731]

siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000004

Registers:
EAX=0x00000000, EBX=0xb7b7cbcc, ECX=0x00000ffc, EDX=0x0000080c
ESP=0xbf9d2fc0, EBP=0xbf9d3008, ESI=0x08e7a030, EDI=0x08e7a0f0
EIP=0xb79813f8, CR2=0x00000004, EFLAGS=0x00010246

Top of Stack: (sp=0xbf9d2fc0)
0xbf9d2fc0: bf9d3008 002b1b20 08ee38e4 00000010
0xbf9d2fd0: 08e7a030 ffffffff 08ee5384 006b8d4e
0xbf9d2fe0: 08e7a030 0000002f 00000006 006bb5e6
0xbf9d2ff0: bf9d3090 00000000 2f6b8d16 b7fd45a0
0xbf9d3000: b1de3a00 ffffffff bf9d30b8 b7fb0e7b
0xbf9d3010: 08e7a0f0 08e75450 0000000a 08ee5384
0xbf9d3020: b7b6e020 bf9d306c 00000000 002bcfb4
0xbf9d3030: bf9d3090 00000001 bf9d3070 002b1be6

Instructions: (pc=0xb79813f8)
0xb79813e8: e8 00 00 00 06 00 00 00 8b 45 0c 89 75 c8 8b 00
0xb79813f8: 8b 40 04 56 83 c0 08 56 8b 50 34 52 57 e8 56 a3

Stack: [0xbf7d7000,0xbf9d7000), sp=0xbf9d2fc0, free space=2031k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x1843f8]
C [libjaced.so+0x1ae7b] _ZNK4jace10JClassImpl8getClassEv+0x20b
C [libhello_impl-release.so+0x27b679] _ZNK4jace5proxy4java4lang6String10getCStringEv+0x35
C [libhello_impl-release.so+0x20ba32] Java_hello_Hello_callMe+0x3a
j com.hello.Hello.callMe(Ljava/lang/String;)V+0
j com.hello.Hello.main([Ljava/lang/String;)V+61
v ~StubRoutines::call_stub
V [libjvm.so+0x17900c]
V [libjvm.so+0x286278]
V [libjvm.so+0x178e3f]
V [libjvm.so+0x1a35e2]
V [libjvm.so+0x194a0c]
C [hello+0x1848]
C [hello+0x122f] __gxx_personality_v0+0x2d3
C [libc.so.6+0x14e23] __libc_start_main+0xd3

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j com.hello.Hello.callMe(Ljava/lang/String;)V+0
j com.hello.Hello.main([Ljava/lang/String;)V+61
v ~StubRoutines::call_stub

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

Java Threads: ( => current thread )
0x08ec0718 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=15737]
0x08ebf290 JavaThread "CompilerThread0" daemon [_thread_blocked, id=15736]
0x08ebe360 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=15735]
0x08eb88a8 JavaThread "Finalizer" daemon [_thread_blocked, id=15734]
0x08eb6a00 JavaThread "Reference Handler" daemon [_thread_blocked, id=15733]
=>0x08e7a030 JavaThread "main" [_thread_in_vm, id=15731]

Other Threads:
0x08eb3eb8 VMThread [id=15732]
0x08ec1c90 WatcherThread [id=15738]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
def new generation total 576K, used 262K [0x88bb0000, 0x88c50000, 0x89090000)
eden space 512K, 51% used [0x88bb0000, 0x88bf1ad0, 0x88c30000)
from space 64K, 0% used [0x88c30000, 0x88c30000, 0x88c40000)
to space 64K, 0% used [0x88c40000, 0x88c40000, 0x88c50000)
tenured generation total 1408K, used 0K [0x89090000, 0x891f0000, 0x8cbb0000)
the space 1408K, 0% used [0x89090000, 0x89090000, 0x89090200, 0x891f0000)
compacting perm gen total 8192K, used 23K [0x8cbb0000, 0x8d3b0000, 0x90bb0000)
the space 8192K, 0% used [0x8cbb0000, 0x8cbb5f98, 0x8cbb6000, 0x8d3b0000)
ro space 8192K, 68% used [0x90bb0000, 0x9112e070, 0x9112e200, 0x913b0000)
rw space 12288K, 48% used [0x913b0000, 0x91975130, 0x91975200, 0x91fb0000)

Dynamic libraries:
00118000-00120000 r-xp 00000000 08:03 3653674 /lib/tls/librt-2.3.5.so
00120000-00121000 r-xp 00007000 08:03 3653674 /lib/tls/librt-2.3.5.so
00121000-00122000 rwxp 00008000 08:03 3653674 /lib/tls/librt-2.3.5.so
00122000-0012c000 rwxp 00122000 00:00 0
00298000-0029f000 r-xp 00000000 08:03 3653661 /lib/libgcc_s-3.4.4-20050721.so.1
0029f000-002a0000 rwxp 00006000 08:03 3653661 /lib/libgcc_s-3.4.4-20050721.so.1
002a6000-002bb000 r-xp 00000000 08:03 3653634 /lib/ld-2.3.5.so
002bc000-002bd000 r-xp 00015000 08:03 3653634 /lib/ld-2.3.5.so
002bd000-002be000 rwxp 00016000 08:03 3653634 /lib/ld-2.3.5.so
002c4000-003e7000 r-xp 00000000 08:03 3653641 /lib/tls/libc-2.3.5.so
003e7000-003e8000 ---p 00123000 08:03 3653641 /lib/tls/libc-2.3.5.so
003e8000-003ea000 r-xp 00123000 08:03 3653641 /lib/tls/libc-2.3.5.so
003ea000-003ec000 rwxp 00125000 08:03 3653641 /lib/tls/libc-2.3.5.so
003ec000-003ee000 rwxp 003ec000 00:00 0
003f0000-00411000 r-xp 00000000 08:03 3653645 /lib/tls/libm-2.3.5.so
00411000-00412000 r-xp 00020000 08:03 3653645 /lib/tls/libm-2.3.5.so
00412000-00413000 rwxp 00021000 08:03 3653645 /lib/tls/libm-2.3.5.so
00415000-00417000 r-xp 00000000 08:03 3653647 /lib/libdl-2.3.5.so
00417000-00418000 r-xp 00001000 08:03 3653647 /lib/libdl-2.3.5.so
00418000-00419000 rwxp 00002000 08:03 3653647 /lib/libdl-2.3.5.so
004f6000-00504000 r-xp 00000000 08:03 3653649 /lib/tls/libpthread-2.3.5.so
00504000-00505000 r-xp 0000d000 08:03 3653649 /lib/tls/libpthread-2.3.5.so
00505000-00506000 rwxp 0000e000 08:03 3653649 /lib/tls/libpthread-2.3.5.so
00506000-00508000 rwxp 00506000 00:00 0
00639000-006f9000 r-xp 00000000 08:03 1658223 /usr/lib/libstdc++.so.6.0.3
006f9000-006fe000 rwxp 000bf000 08:03 1658223 /usr/lib/libstdc++.so.6.0.3
006fe000-00704000 rwxp 006fe000 00:00 0
00dcf000-00de1000 r-xp 00000000 08:03 3653666 /lib/libnsl-2.3.5.so
00de1000-00de2000 r-xp 00011000 08:03 3653666 /lib/libnsl-2.3.5.so
00de2000-00de3000 rwxp 00012000 08:03 3653666 /lib/libnsl-2.3.5.so
00de3000-00de5000 rwxp 00de3000 00:00 0
08048000-0804a000 r-xp 00000000 00:1b 11228550 /.../release/hello
0804a000-0804b000 rwxp 00002000 00:1b 11228550 /.../release/hello
08e75000-08f00000 rwxp 08e75000 00:00 0 [heap]
88bb0000-88c50000 rwxp 88bb0000 00:00 0
88c50000-89090000 rwxp 88c50000 00:00 0
89090000-891f0000 rwxp 89090000 00:00 0
891f0000-8cbb0000 rwxp 891f0000 00:00 0
8cbb0000-8d3b0000 rwxp 8cbb0000 00:00 0
8d3b0000-90bb0000 rwxp 8d3b0000 00:00 0
90bb0000-9112f000 r-xs 00001000 08:03 2297941 /usr/jdk1.5.0_07/jre/lib/i386/client/classes.jsa
9112f000-913b0000 rwxp 9112f000 00:00 0
913b0000-91976000 rwxp 00580000 08:03 2297941 /usr/jdk1.5.0_07/jre/lib/i386/client/classes.jsa
91976000-91fb0000 rwxp 91976000 00:00 0
91fb0000-9207f000 rwxp 00b46000 08:03 2297941 /usr/jdk1.5.0_07/jre/lib/i386/client/classes.jsa
9207f000-923b0000 rwxp 9207f000 00:00 0
923b0000-923b4000 r-xs 00c15000 08:03 2297941 /usr/jdk1.5.0_07/jre/lib/i386/client/classes.jsa
923b4000-927b0000 rwxp 923b4000 00:00 0
b199d000-b1d6d000 r-xp 00000000 00:1b 11343457 /.../libhello_impl-release.so
b1d6d000-b1de4000 rwxp 003cf000 00:1b 11343457 /.../libhello_impl-release.so
b1de4000-b1de5000 rwxp b1de4000 00:00 0
b1de5000-b1de6000 r-xs 00000000 00:14 13437290 /.../Hello.jar
b1de6000-b1e0d000 r-xs 00000000 08:03 2424927 /usr/jdk1.5.0_07/jre/lib/ext/sunjce_provider.jar
b1e0d000-b1e38000 r-xs 00000000 08:03 2424928 /usr/jdk1.5.0_07/jre/lib/ext/sunpkcs11.jar
b1e38000-b1efc000 r-xs 00000000 08:03 2426096 /usr/jdk1.5.0_07/jre/lib/ext/localedata.jar
b1efc000-b1efe000 r-xs 00000000 08:03 2424929 /usr/jdk1.5.0_07/jre/lib/ext/dnsns.jar
b1efe000-b1eff000 ---p b1efe000 00:00 0
b1eff000-b1f7f000 rwxp b1eff000 00:00 0
b1f7f000-b1f82000 ---p b1f7f000 00:00 0
b1f82000-b20b6000 rwxp b1f82000 00:00 0
b20b6000-b2100000 ---p b20b6000 00:00 0
b2114000-b2117000 ---p b2114000 00:00 0
b2117000-b2195000 rwxp b2117000 00:00 0
b2195000-b2198000 ---p b2195000 00:00 0
b2198000-b2216000 rwxp b2198000 00:00 0
b2216000-b2416000 r-xp 00000000 08:03 1658164 /usr/lib/locale/locale-archive
b2416000-b2419000 ---p b2416000 00:00 0
b2419000-b2497000 rwxp b2419000 00:00 0
b2497000-b249a000 ---p b2497000 00:00 0
b249a000-b2518000 rwxp b249a000 00:00 0
b2518000-b2519000 ---p b2518000 00:00 0
b2519000-b25aa000 rwxp b2519000 00:00 0
b25aa000-b25c6000 rwxp b25aa000 00:00 0
b25c6000-b25c7000 rwxp b25c6000 00:00 0
b25c7000-b25e4000 rwxp b25c7000 00:00 0
b25e4000-b25e5000 rwxp b25e4000 00:00 0
b25e5000-b25e6000 rwxp b25e5000 00:00 0
b25e6000-b25e8000 rwxp b25e6000 00:00 0
b25e8000-b2604000 rwxp b25e8000 00:00 0
b2604000-b2608000 rwxp b2604000 00:00 0
b2608000-b2624000 rwxp b2608000 00:00 0
b2624000-b2632000 rwxp b2624000 00:00 0
b2632000-b26af000 rwxp b2632000 00:00 0
b26af000-b273f000 rwxp b26af000 00:00 0
b273f000-b46af000 rwxp b273f000 00:00 0
b46af000-b4f1c000 r-xs 00000000 08:03 2281060 /usr/jdk1.5.0_07/jre/lib/charsets.jar
b4f1c000-b4f31000 r-xs 00000000 08:03 2281024 /usr/jdk1.5.0_07/jre/lib/jce.jar
b4f31000-b4fb6000 r-xs 00000000 08:03 2281057 /usr/jdk1.5.0_07/jre/lib/jsse.jar
b4fb6000-b501f000 rwxp b4fb6000 00:00 0
b501f000-b7623000 r-xs 00000000 08:03 2281062 /usr/jdk1.5.0_07/jre/lib/rt.jar
b7623000-b7636000 r-xp 00000000 08:03 2280994 /usr/jdk1.5.0_07/jre/lib/i386/libzip.so
b7636000-b7638000 rwxp 00012000 08:03 2280994 /usr/jdk1.5.0_07/jre/lib/i386/libzip.so
b7638000-b7640000 rwxs 00000000 08:03 6438913 /tmp/hsperfdata_evgeny/15731
b7640000-b7648000 r-xp 00000000 08:03 3653686 /lib/libnss_nis-2.3.5.so
b7648000-b7649000 r-xp 00007000 08:03 3653686 /lib/libnss_nis-2.3.5.so
b7649000-b764a000 rwxp 00008000 08:03 3653686 /lib/libnss_nis-2.3.5.so
b764a000-b7653000 r-xp 00000000 08:03 3653681 /lib/libnss_files-2.3.5.so
b7653000-b7654000 r-xp 00008000 08:03 3653681 /lib/libnss_files-2.3.5.so
b7654000-b7655000 rwxp 00009000 08:03 3653681 /lib/libnss_files-2.3.5.so
b7655000-b765b000 r-xp 00000000 08:03 2280983 /usr/jdk1.5.0_07/jre/lib/i386/native_threads/libhpi.so
b765b000-b765c000 rwxp 00006000 08:03 2280983 /usr/jdk1.5.0_07/jre/lib/i386/native_threads/libhpi.so
b765c000-b765d000 rwxp b765c000 00:00 0
b765d000-b765e000 r-xp b765d000 00:00 0
b765e000-b7662000 rwxp b765e000 00:00 0
b7662000-b77c1000 r-xp 00000000 00:14 40437784 /.../libACE.so.5.5.0
b77c1000-b77cc000 rwxp 0015e000 00:14 40437784 /.../libACE.so.5.5.0
b77cc000-b77ce000 rwxp b77cc000 00:00 0
b77ce000-b77ef000 r-xp 00000000 08:03 2280992 /usr/jdk1.5.0_07/jre/lib/i386/libjava.so
b77ef000-b77f1000 rwxp 00020000 08:03 2280992 /usr/jdk1.5.0_07/jre/lib/i386/libjava.so
b77f1000-b77fc000 r-xp 00000000 08:03 2280991 /usr/jdk1.5.0_07/jre/lib/i386/libverify.so
b77fc000-b77fd000 rwxp 0000b000 08:03 2280991 /usr/jdk1.5.0_07/jre/lib/i386/libverify.so
b77fd000-b7b61000 r-xp 00000000 08:03 2297934 /usr/jdk1.5.0_07/jre/lib/i386/client/libjvm.so
b7b61000-b7b80000 rwxp 00363000 08:03 2297934 /usr/jdk1.5.0_07/jre/lib/i386/client/libjvm.so
b7b80000-b7f96000 rwxp b7b80000 00:00 0
b7f96000-b7fca000 r-xp 00000000 00:14 30622819 /.../jace.1.1rc1_05/release/lib/linux/gcc/libjaced.so
b7fca000-b7fd5000 rwxp 00033000 00:14 30622819 /.../jace.1.1rc1_05/release/lib/linux/gcc/libjaced.so
b7fd5000-b7fd6000 rwxp b7fd5000 00:00 0
b7fd6000-b7fd7000 r-xp b7fd6000 00:00 0
bf7d7000-bf7da000 ---p bf7d7000 00:00 0
bf7da000-bf9d7000 rwxp bf7da000 00:00 0 [stack]

VM Arguments:
java_command:
Launcher Type: generic

Environment Variables:
JAVA_HOME=/usr/jdk1.5.0_07
PATH=...
LD_LIBRARY_PATH=...
SHELL=/bin/tcsh
HOSTTYPE=i386-linux
OSTYPE=linux
MACHTYPE=i386

Signal Handlers:
SIGSEGV: [libjvm.so+0x31fae0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x31fae0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x2852b0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGPIPE: [libjvm.so+0x2852b0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGILL: [libjvm.so+0x2852b0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x287700], sa_mask[0]=0x00000000, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x287130], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: [libjvm.so+0x287130], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x287130], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGTERM: [libjvm.so+0x287130], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004


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

OS:Fedora Core release 3 (Heidelberg)

uname:Linux 2.6.12-1.1376_FC3smp #1 SMP Fri Aug 26 23:50:33 EDT 2005 i686
libc:glibc 2.3.5 NPTL 2.3.5
rlimit: STACK 10240k, CORE infinity, NPROC 16239, NOFILE 1024, AS infinity
load average:0.28 0.21 0.18

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

Memory: 4k page, physical 1025416k(34192k free), swap 1052248k(754844k free)

vm_info: Java HotSpot(TM) Client VM (1.5.0_07-b03) for linux-x86, built on May 3 2006 01:46:28 by java_re with gcc 3.2.1-7a (J2SE release)

   <<Less
About | Sitemap | Contact