build 421: consistent JVM crashes

Questions about YourKit Java Profiler
Post Reply
jsacha
Posts: 6
Joined: Sat Sep 11, 2004 9:39 pm

build 421: consistent JVM crashes

Post by jsacha »

I am getting JVM crashes everytime I try to profile from within IDEA. Tested with JVM 1.4.2_05 and 1.5.0-rc on Fedora Core 2 Linux.

Here is a sample log:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x8A13B8
Function=_ZN7JavaVM_6GetEnvEPPvi+0xC
Library=/home/jarek/local/apps/yjp-3.0-eap-build423/bin/libyjpagent.so

Current Java thread:

Dynamic libraries:
00111000-0050d000 r-xp 00000000 03:07 984182 /usr/java/j2sdk1.4.2_05/jre/lib/i386/client/libjvm.so
0050d000-00528000 rw-p 003fb000 03:07 984182 /usr/java/j2sdk1.4.2_05/jre/lib/i386/client/libjvm.so
0053a000-0054a000 r-xp 00000000 03:07 984207 /usr/java/j2sdk1.4.2_05/jre/lib/i386/libverify.so
0054a000-0054c000 rw-p 0000f000 03:07 984207 /usr/java/j2sdk1.4.2_05/jre/lib/i386/libverify.so
006ec000-006f3000 r-xp 00000000 03:07 1359982 /lib/libgcc_s-3.3.3-20040413.so.1
006f3000-006f4000 rw-p 00006000 03:07 1359982 /lib/libgcc_s-3.3.3-20040413.so.1
00717000-0072c000 r-xp 00000000 03:07 1359967 /lib/ld-2.3.3.so
0072c000-0072d000 r--p 00014000 03:07 1359967 /lib/ld-2.3.3.so
0072d000-0072e000 rw-p 00015000 03:07 1359967 /lib/ld-2.3.3.so
00734000-00849000 r-xp 00000000 03:07 1359971 /lib/tls/libc-2.3.3.so
00849000-0084b000 r--p 00115000 03:07 1359971 /lib/tls/libc-2.3.3.so
0084b000-0084d000 rw-p 00117000 03:07 1359971 /lib/tls/libc-2.3.3.so
00851000-00872000 r-xp 00000000 03:07 1359973 /lib/tls/libm-2.3.3.so
00872000-00873000 r--p 00020000 03:07 1359973 /lib/tls/libm-2.3.3.so
00873000-00874000 rw-p 00021000 03:07 1359973 /lib/tls/libm-2.3.3.so
00876000-00878000 r-xp 00000000 03:07 1359974 /lib/libdl-2.3.3.so
00878000-00879000 r--p 00001000 03:07 1359974 /lib/libdl-2.3.3.so
00879000-0087a000 rw-p 00002000 03:07 1359974 /lib/libdl-2.3.3.so
0087a000-008c1000 r-xp 00000000 03:46 33985 /home/local/apps/yjp-3.0-eap-build423/bin/libyjpagent.so
008c1000-008c2000 rw-p 00046000 03:46 33985 /home/local/apps/yjp-3.0-eap-build423/bin/libyjpagent.so
0093b000-0094f000 r-xp 00000000 03:07 984208 /usr/java/j2sdk1.4.2_05/jre/lib/i386/libzip.so
0094f000-00952000 rw-p 00013000 03:07 984208 /usr/java/j2sdk1.4.2_05/jre/lib/i386/libzip.so
00969000-00977000 r-xp 00000000 03:07 1359981 /lib/tls/libpthread-0.61.so
00977000-00978000 r--p 0000d000 03:07 1359981 /lib/tls/libpthread-0.61.so
00978000-00979000 rw-p 0000e000 03:07 1359981 /lib/tls/libpthread-0.61.so
00a99000-00b4a000 r-xp 00000000 03:07 2261192 /usr/lib/libstdc++.so.5.0.5
00b4a000-00b4f000 rw-p 000b0000 03:07 2261192 /usr/lib/libstdc++.so.5.0.5
00cd8000-00ce0000 r-xp 00000000 03:07 984210 /usr/java/j2sdk1.4.2_05/jre/lib/i386/native_threads/libhpi.so
00ce0000-00ce1000 rw-p 00007000 03:07 984210 /usr/java/j2sdk1.4.2_05/jre/lib/i386/native_threads/libhpi.so
00d0e000-00d18000 r-xp 00000000 03:07 1359922 /lib/libnss_files-2.3.3.so
00d18000-00d19000 r--p 00009000 03:07 1359922 /lib/libnss_files-2.3.3.so
00d19000-00d1a000 rw-p 0000a000 03:07 1359922 /lib/libnss_files-2.3.3.so
00e0b000-00e2b000 r-xp 00000000 03:07 984193 /usr/java/j2sdk1.4.2_05/jre/lib/i386/libjava.so
00e2b000-00e2d000 rw-p 0001f000 03:07 984193 /usr/java/j2sdk1.4.2_05/jre/lib/i386/libjava.so
07fae000-07fbf000 r-xp 00000000 03:07 1360116 /lib/libnsl-2.3.3.so
07fbf000-07fc0000 r--p 00011000 03:07 1360116 /lib/libnsl-2.3.3.so
07fc0000-07fc1000 rw-p 00012000 03:07 1360116 /lib/libnsl-2.3.3.so
08048000-08056000 r-xp 00000000 03:07 872273 /usr/java/j2sdk1.4.2_05/bin/java
08056000-08059000 rw-p 0000d000 03:07 872273 /usr/java/j2sdk1.4.2_05/bin/java
ecd70000-ecf70000 r--p 00000000 03:07 396831 /usr/lib/locale/locale-archive
f4f9c000-f54f5000 r--s 00000000 03:07 972219 /usr/java/j2sdk1.4.2_05/jre/lib/charsets.jar
f54f5000-f5506000 r--s 00000000 03:07 972218 /usr/java/j2sdk1.4.2_05/jre/lib/jce.jar
f5506000-f55e3000 r--s 00000000 03:07 972226 /usr/java/j2sdk1.4.2_05/jre/lib/jsse.jar
f55e3000-f55f9000 r--s 00000000 03:07 972227 /usr/java/j2sdk1.4.2_05/jre/lib/sunrsasign.jar
f5643000-f6fe7000 r--s 00000000 03:07 972228 /usr/java/j2sdk1.4.2_05/jre/lib/rt.jar
f6ffb000-f6fff000 rw-s 00000000 03:07 429250 /tmp/hsperfdata_jarek/6030

Heap at VM Abort:
Heap
def new generation total 576K, used 151K [0xecf70000, 0xed010000, 0xed450000)
eden space 512K, 29% used [0xecf70000, 0xecf95c18, 0xecff0000)
from space 64K, 0% used [0xecff0000, 0xecff0000, 0xed000000)
to space 64K, 0% used [0xed000000, 0xed000000, 0xed010000)
tenured generation total 1408K, used 0K [0xed450000, 0xed5b0000, 0xf0f70000)
the space 1408K, 0% used [0xed450000, 0xed450000, 0xed450200, 0xed5b0000)
compacting perm gen total 4096K, used 835K [0xf0f70000, 0xf1370000, 0xf4f70000)
the space 4096K, 20% used [0xf0f70000, 0xf1040e60, 0xf1041000, 0xf1370000)

Local Time = Sat Sep 11 17:59:56 2004
Elapsed Time = 0
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_05-b04 mixed mode)
#
# An error report file has been saved as hs_err_pid6030.log.
# Please refer to the file for further information.
#
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Could you please provide more details:
- What IDEA version (build) did you use?
- Did you launch profiled application via plugin's action "Profile" or had you manually configured -Xrunyjpagent parameter and used IDEA's Run|Debug actions?
- What kind of profiling did you perform (CPU, memory allocations etc.)?
- What kind of application did you profile? Is it possible to provide a simple example Java program to reproduce the problem?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

P.S. - Is the crash reproducible if profiled application is launched not from IDEA?
jsacha
Posts: 6
Joined: Sat Sep 11, 2004 9:39 pm

Post by jsacha »

Actually there is typo in message title. The build that crashes is 423.

* I am using IDEA v.4.5.1.

* Profiling was started by YPJ plugin button (no custom options).

* I tested two cases, both testing CPU: one starting a JUnit test of new fast median filter in ij-plugins ([url]http://ij-plugins.sf.net[/url] - median still only in CVS), the second was starting a simple main() to test the same code. The code runs with no problem on its own (tested for accuracy). In both YPJ cases it did not seem that the code even started executing before the crash. Running code "normally" with -Xprof goes fine.

* Did not have a chance to test profiling outside IDEA

I will try to test some simple code later this evening.[url][/url]
jsacha
Posts: 6
Joined: Sat Sep 11, 2004 9:39 pm

Post by jsacha »

It crashes from IDEA even with a very simple program (created a new fresh project) :

public class yjptest {
public static void main(String[] args) {
System.out.println("Hello");
}
}

The same program run outside IDEA does not crash. Command line is:
java -cp . -Xrunyjpagent yjptest

The output is:
[YourKit Java Profiler 3.0 EAP #423] Listening on port 10000...
Hello
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

jsacha wrote:The same program run outside IDEA does not crash. Command line is:
java -cp . -Xrunyjpagent yjptest
What is the command line generated by IDEA? Couldn't you please copy full output (of the same simple application) from IDEA's tool window and paste it here (or send us to [email protected])
jsacha
Posts: 6
Joined: Sat Sep 11, 2004 9:39 pm

Post by jsacha »

This output from IDEA 4.5.1 build 2239 using JDK 1.4.2_05 and 1.5.0-rc.
Output using JDK 1.4.2_05:

-------------------------------------------
/usr/java/j2sdk1.4.2_05/bin/java -Xrunyjpagent:port=10001,sessionname=yjptest^s(launched^sfrom^sIDEA) -Didea.launcher.port=7533 -Didea.launcher.library=/home/local/apps/IntelliJ-IDEA-4.5/bin/libbreakgen.so -Dfile.encoding=UTF-8 -classpath /usr/java/j2sdk1.4.2_05/jre/lib/sunrsasign.jar:/usr/java/j2sdk1.4.2_05/jre/lib/plugin.jar:/usr/java/j2sdk1.4.2_05/jre/lib/jsse.jar:/usr/java/j2sdk1.4.2_05/jre/lib/rt.jar:/usr/java/j2sdk1.4.2_05/jre/lib/jce.jar:/usr/java/j2sdk1.4.2_05/jre/lib/charsets.jar:/usr/java/j2sdk1.4.2_05/jre/lib/ext/ldapsec.jar:/usr/java/j2sdk1.4.2_05/jre/lib/ext/localedata.jar:/usr/java/j2sdk1.4.2_05/jre/lib/ext/sunjce_provider.jar:/usr/java/j2sdk1.4.2_05/jre/lib/ext/dnsns.jar:/home/jarek/projects/prototypes/yjp_test/classes:/home/local/apps/IntelliJ-IDEA-4.5/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain yjptest

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x8A13B8
Function=_ZN7JavaVM_6GetEnvEPPvi+0xC
Library=/home/jarek/local/apps/yjp-3.0-eap-build423/bin/libyjpagent.so

Current Java thread:

Dynamic libraries:
00111000-0050d000 r-xp 00000000 03:07 984182 /usr/java/j2sdk1.4.2_05/jre/lib/i386/client/libjvm.so
0050d000-00528000 rw-p 003fb000 03:07 984182 /usr/java/j2sdk1.4.2_05/jre/lib/i386/client/libjvm.so
0053a000-0055a000 r-xp 00000000 03:07 984193 /usr/java/j2sdk1.4.2_05/jre/lib/i386/libjava.so
0055a000-0055c000 rw-p 0001f000 03:07 984193 /usr/java/j2sdk1.4.2_05/jre/lib/i386/libjava.so
005bb000-005c2000 r-xp 00000000 03:07 1359982 /lib/libgcc_s-3.3.3-20040413.so.1
005c2000-005c3000 rw-p 00006000 03:07 1359982 /lib/libgcc_s-3.3.3-20040413.so.1
00648000-00652000 r-xp 00000000 03:07 1359922 /lib/libnss_files-2.3.3.so
00652000-00653000 r--p 00009000 03:07 1359922 /lib/libnss_files-2.3.3.so
00653000-00654000 rw-p 0000a000 03:07 1359922 /lib/libnss_files-2.3.3.so
00717000-0072c000 r-xp 00000000 03:07 1359967 /lib/ld-2.3.3.so
0072c000-0072d000 r--p 00014000 03:07 1359967 /lib/ld-2.3.3.so
0072d000-0072e000 rw-p 00015000 03:07 1359967 /lib/ld-2.3.3.so
00734000-00849000 r-xp 00000000 03:07 1359971 /lib/tls/libc-2.3.3.so
00849000-0084b000 r--p 00115000 03:07 1359971 /lib/tls/libc-2.3.3.so
0084b000-0084d000 rw-p 00117000 03:07 1359971 /lib/tls/libc-2.3.3.so
00851000-00872000 r-xp 00000000 03:07 1359973 /lib/tls/libm-2.3.3.so
00872000-00873000 r--p 00020000 03:07 1359973 /lib/tls/libm-2.3.3.so
00873000-00874000 rw-p 00021000 03:07 1359973 /lib/tls/libm-2.3.3.so
00876000-00878000 r-xp 00000000 03:07 1359974 /lib/libdl-2.3.3.so
00878000-00879000 r--p 00001000 03:07 1359974 /lib/libdl-2.3.3.so
00879000-0087a000 rw-p 00002000 03:07 1359974 /lib/libdl-2.3.3.so
0087a000-008c1000 r-xp 00000000 03:46 33985 /home/local/apps/yjp-3.0-eap-build423/bin/libyjpagent.so
008c1000-008c2000 rw-p 00046000 03:46 33985 /home/local/apps/yjp-3.0-eap-build423/bin/libyjpagent.so
00969000-00977000 r-xp 00000000 03:07 1359981 /lib/tls/libpthread-0.61.so
00977000-00978000 r--p 0000d000 03:07 1359981 /lib/tls/libpthread-0.61.so
00978000-00979000 rw-p 0000e000 03:07 1359981 /lib/tls/libpthread-0.61.so
00ae6000-00afa000 r-xp 00000000 03:07 984208 /usr/java/j2sdk1.4.2_05/jre/lib/i386/libzip.so
00afa000-00afd000 rw-p 00013000 03:07 984208 /usr/java/j2sdk1.4.2_05/jre/lib/i386/libzip.so
00afd000-00bae000 r-xp 00000000 03:07 2261192 /usr/lib/libstdc++.so.5.0.5
00bae000-00bb3000 rw-p 000b0000 03:07 2261192 /usr/lib/libstdc++.so.5.0.5
00c12000-00c22000 r-xp 00000000 03:07 984207 /usr/java/j2sdk1.4.2_05/jre/lib/i386/libverify.so
00c22000-00c24000 rw-p 0000f000 03:07 984207 /usr/java/j2sdk1.4.2_05/jre/lib/i386/libverify.so
00c94000-00c9c000 r-xp 00000000 03:07 984210 /usr/java/j2sdk1.4.2_05/jre/lib/i386/native_threads/libhpi.so
00c9c000-00c9d000 rw-p 00007000 03:07 984210 /usr/java/j2sdk1.4.2_05/jre/lib/i386/native_threads/libhpi.so
07fae000-07fbf000 r-xp 00000000 03:07 1360116 /lib/libnsl-2.3.3.so
07fbf000-07fc0000 r--p 00011000 03:07 1360116 /lib/libnsl-2.3.3.so
07fc0000-07fc1000 rw-p 00012000 03:07 1360116 /lib/libnsl-2.3.3.so
08048000-08056000 r-xp 00000000 03:07 872273 /usr/java/j2sdk1.4.2_05/bin/java
08056000-08059000 rw-p 0000d000 03:07 872273 /usr/java/j2sdk1.4.2_05/bin/java
ecd70000-ecf70000 r--p 00000000 03:07 396831 /usr/lib/locale/locale-archive
f4f9c000-f54f5000 r--s 00000000 03:07 972219 /usr/java/j2sdk1.4.2_05/jre/lib/charsets.jar
f54f5000-f5506000 r--s 00000000 03:07 972218 /usr/java/j2sdk1.4.2_05/jre/lib/jce.jar
f5506000-f55e3000 r--s 00000000 03:07 972226 /usr/java/j2sdk1.4.2_05/jre/lib/jsse.jar
f55e3000-f55f9000 r--s 00000000 03:07 972227 /usr/java/j2sdk1.4.2_05/jre/lib/sunrsasign.jar
f5643000-f6fe7000 r--s 00000000 03:07 972228 /usr/java/j2sdk1.4.2_05/jre/lib/rt.jar
f6ffb000-f6fff000 rw-s 00000000 03:07 1819741 /tmp/hsperfdata_jarek/10203

Heap at VM Abort:
Heap
def new generation total 576K, used 132K [0xecf70000, 0xed010000, 0xed450000)
eden space 512K, 25% used [0xecf70000, 0xecf911c0, 0xecff0000)
from space 64K, 0% used [0xecff0000, 0xecff0000, 0xed000000)
to space 64K, 0% used [0xed000000, 0xed000000, 0xed010000)
tenured generation total 1408K, used 0K [0xed450000, 0xed5b0000, 0xf0f70000)
the space 1408K, 0% used [0xed450000, 0xed450000, 0xed450200, 0xed5b0000)
compacting perm gen total 4096K, used 835K [0xf0f70000, 0xf1370000, 0xf4f70000)
the space 4096K, 20% used [0xf0f70000, 0xf1040e60, 0xf1041000, 0xf1370000)

Local Time = Tue Sep 14 18:34:43 2004
Elapsed Time = 0
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_05-b04 mixed mode)
#
# An error report file has been saved as hs_err_pid10203.log.
# Please refer to the file for further information.
#

Process finished with exit code 129
-------------------------------------------

Output using JDK 1.5.0-rc:

-------------------------------------------
/usr/java/jdk1.5.0/bin/java -Xrunyjpagent:port=10001,sessionname=yjptest^s(launched^sfrom^sIDEA) -Didea.launcher.port=7532 -Didea.launcher.library=/home/local/apps/IntelliJ-IDEA-4.5/bin/libbreakgen.so -Dfile.encoding=UTF-8 -classpath /usr/java/jdk1.5.0/jre/lib/plugin.jar:/usr/java/jdk1.5.0/jre/lib/jsse.jar:/usr/java/jdk1.5.0/jre/lib/rt.jar:/usr/java/jdk1.5.0/jre/lib/jce.jar:/usr/java/jdk1.5.0/jre/lib/deploy.jar:/usr/java/jdk1.5.0/jre/lib/javaws.jar:/usr/java/jdk1.5.0/jre/lib/charsets.jar:/usr/java/jdk1.5.0/jre/lib/ext/sunpkcs11.jar:/usr/java/jdk1.5.0/jre/lib/ext/localedata.jar:/usr/java/jdk1.5.0/jre/lib/ext/sunjce_provider.jar:/usr/java/jdk1.5.0/jre/lib/ext/dnsns.jar:/home/jarek/projects/prototypes/yjp_test/classes:/home/local/apps/IntelliJ-IDEA-4.5/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain yjptest
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0x726a2f30, pid=10125, tid=4143870080
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-rc-b63 mixed mode, sharing)
# Problematic frame:
# C 0x726a2f30
#
# An error report file with more information is saved as hs_err_pid10125.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#

Process finished with exit code 129
-------------------------------------------
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

Thank you very much for additional info. We have managed to reproduce the crash. We are investigating the problem and bug fix build will be uploaded as soon as possible.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

The bug is fixed in upcoming build 427. Thanks a lot for your help.
Post Reply