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

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

A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. Use of any information from my blog posts should be at own risk and I do not hold any liability towards any information misuse or damages caused by following any of my posts.

All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle). Use of any information contained in this blog post/article is subject to this disclaimer.
Hi! You can search my blog here ⤵
NOTE: (2022) This Blog is no longer maintained and I will not be answering any emails or comments.

I am now focusing on Atari Gamer.