Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

NOTE: This article is 3 years or older so its information may no longer be relevant. Read on at your own discretion! Comments for this article have automatically been locked, refer to the FAQ for more details.
I've been trying to set up JVisualVM to monitor a number of JVMs that are running as a part of an application server install. These JVMs are on JDK5, which can be monitored with JVisualVM, but for some reason every time I started it up, it crashed with a seg fault.

This is the error I was getting every time...
$ bin/jvisualvm
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fe9c348ae97, pid=1399, tid=1146399040
#
# JRE version: 6.0_31-b04
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.6-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libsaproc.so+0x1e97] long double restrict+0x1f
#
# An error report file with more information is saved as:
# /home/xxx/jdk1.6.0_31/hs_err_pid1399.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
bin/../lib/visualvm//platform/lib/nbexec: line 539: 1399 Aborted "/home/xxx/jdk1.6.0_31/bin/java" -Djdk.home="/home/xxx/jdk1.6.0_31" -classpath "/home/xxx/jdk1.6.0_31/lib/visualvm/platform/lib/boot.jar:/home/xxx/jdk1.6.0_31/lib/visualvm/platform/lib/org-openide-modules.jar:/home/xxx/jdk1.6.0_31/lib/visualvm/platform/lib/org-openide-util.jar:/home/xxx/jdk1.6.0_31/lib/visualvm/platform/lib/org-openide-util-lookup.jar:/home/xxx/jdk1.6.0_31/lib/visualvm/platform/lib/locale/boot_ja.jar:/home/xxx/jdk1.6.0_31/lib/visualvm/platform/lib/locale/boot_zh_CN.jar:/home/xxx/jdk1.6.0_31/lib/visualvm/platform/lib/locale/org-openide-modules_ja.jar:/home/xxx/jdk1.6.0_31/lib/visualvm/platform/lib/locale/org-openide-modules_zh_CN.jar:/home/xxx/jdk1.6.0_31/lib/visualvm/platform/lib/locale/org-openide-util_ja.jar:/home/xxx/jdk1.6.0_31/lib/visualvm/platform/lib/locale/org-openide-util-lookup_ja.jar:/home/xxx/jdk1.6.0_31/lib/visualvm/platform/lib/locale/org-openide-util-lookup_zh_CN.jar:/home/xxx/jdk1.6.0_31/lib/visualvm/platform/lib/locale/org-openide-util_zh_CN.jar:/home/xxx/jdk1.6.0_31/lib/dt.jar:/home/xxx/jdk1.6.0_31/lib/tools.jar" -Dnetbeans.dirs="bin/../lib/visualvm//visualvm:bin/../lib/visualvm//profiler:" -Dnetbeans.home="/home/xxx/jdk1.6.0_31/lib/visualvm/platform" '-client' '-Xms24m' '-Xmx256m' '-Dsun.jvmstat.perdata.syncWaitMs=10000' '-Dsun.java2d.noddraw=true' '-Dsun.java2d.d3d=false' -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="/home/xxx/.visualvm/7/var/log/heapdump.hprof" org.netbeans.Main --userdir "/home/xxx/.visualvm/7" "--branding" "visualvm" 0<&0


So it turned out the issue was that I was using a 64bit JVisualVM to monitor a 32bit JVM. Since the bitness was not matched, a seg fault occurred. The fix is to use a 32bit JVisualVM to monitor a 32bit JVM.



-i

Hope you found this post useful...

...so please read on! I love writing articles that provide beneficial information, tips and examples to my readers. All information on my blog is provided free of charge and I encourage you to share it as you wish. There is a small favour I ask in return however - engage in comments below, provide feedback, and if you see mistakes let me know.

If you want to show additional support and help me pay for web hosting and domain name registration, donations, no matter how small, are always welcome!

Use of any information contained in this blog post/article is subject to this disclaimer.
comments powered by Disqus
Other posts you may like...