VisualVM cannot load profiler (64 bit)

Bug #577958 reported by Asraniel on 2010-05-09
88
This bug affects 18 people
Affects Status Importance Assigned to Milestone
visualvm (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: visualvm

When launching VisualVM i get the following error:

Failed to initialize the Profiler engine: Problem with a required JFluid installation directory or file
/usr/lib/jvm/java-6-openjdk/lib/visualvm/profiler3/lib/deployed/jdk16/linux-amd64/libprofilerinterface.so
Original message: File does not exist.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: visualvm 1.2.2-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Sun May 9 21:49:24 2010
InstallationMedia: Kubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100427)
ProcEnviron:
 LANGUAGE=
 LANG=de_CH.UTF-8
 SHELL=/bin/bash
SourcePackage: visualvm

Asraniel (asraniel) wrote :
mihvoi@gmail.com (mihvoi) wrote :

I have the same problem, Ubuntu 10.04 64bits up-to-date 2010-05-17.

Tomas Hurka (tomas-hurka) wrote :

It looks like this bug is caused by the fact that VisualVM build script (buildnative-linux64.sh) uses gcc32 on 64bit linux. See also <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-May/009097.html> and my reply. It can be fixed easily by changing gcc32 to gcc in buildnative-linux64.sh or Ubuntu can use new version of profiler sources netbeans-profiler-visualvm_release68_1.tar.gz available at <https://visualvm.dev.java.net/files/documents/7163/150173/netbeans-profiler-visualvm_release68_1.tar.gz>

Asraniel (asraniel) wrote :

I hope to see this fixed soon. It's quite annoying to load up a Virtualmachine with XP to profile my java applications...

Tomas Hurka (tomas-hurka) wrote :

 You don't need to use virtualmachine with XP. You can run VisualVM on 64bit Ubuntu. Just download VisualVM 1.2.2 from <https://visualvm.dev.java.net/download.html>

Hendra (hendra-oraclelinux) wrote :

I also hope this can be fixed soon. I'm not able to use VisualVM right now, as suggested I downloaded the zipped package (v1.2.2) directly from the visualvm website and when I run it, the log said:

SEVERE [global]
java.lang.NullPointerException
 at com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.emptyBorder(ConnectionsCustomizer.java:137)
 at com.sun.tools.visualvm.jvmstat.application.ConnectionsCustomizer.<clinit>(ConnectionsCustomizer.java:81)
Caused: java.lang.ExceptionInInitializerError

I know this is not the right place to discuss about VisualVM bugs, but the I think it's fair to expect that the pkg installed from repo should work.

Tomas Hurka (tomas-hurka) wrote :

To Hendra - you are right. Do not discuss VisualVM bugs here. You can use VisualVM issues tracker or mailing lists for such purpose.

Ekr (ekr) wrote :

Same problem here: the mentioned JFluid problem and failure to connect to
a locally running Java app later.

Found a workaround. I installed sun-java6-* like suggested in the post:
http://ubuntuforums.org/showpost.php?p=9320525&postcount=1
and manually changed (soft link) /usr/bin/jvisualvm to sun's jvisualvm:

cd /usr/bin
sudo unlink jvisualvm
sudo ln -s ../lib/jvm/java-6-sun/bin/jvisualvm jvisualvm

Before doing that I tried two other approaches:
(1) running jvisuavm with --jdkhome /usr/lib/jvm/java-6-sun
(2) setting sun's java to be default jvm (with update-java-alternatives)
and reinstalling visualvm.
None of that worked (visualvm still opened
with openjdk). Thus these appear to be bugs in ubuntus' lucid distro:
the link to /usr/bin/jvisualvm is not updated on change of jvm and
the jdkhome option does not seem to work correctly.

Same issues here but with an upgrade to Lucid, so that I kept my Sun Java JDK installation from Karmic (the upgrade appears to have automatically added the partner repo that Ekr had to do manually, which makes sense). Somehow I had the OpenJDK visualvm package installed (presumably by the upgrade process), even though the OpenJDK JRE or JDK wasn't installed....

We need to be clear about the issue though because I had slightly different symptoms (maybe Ekr can clarify). With the standard OpenJDK installation and its visualvm (packages default-jdk and visualvm), jvisualvm starts up for me with the Fluid error. However, I can still then look at running or launched Java apps. I presume the Fluid stuff is just doing the calibration like the Sun one does.

Ekr's workaround is to switch to the Sun jvisualvm and JDK, and so isn't actually working round the OpenJDK jvisualvm bug as such (i.e. it's really switching apps, not working round the bug).

I can confirm his issue with the Sun install not changing the jvisualvm symlink. I assume that this should be a separate bug then (**but can a dev please confirm that this is what they'd prefer and what project it should be under; sorry, I'm a bit of a noob!**). Since there are update-alternatives entries for java, javac, javadoc, rmiregistry, etc. (but not for jvisualvm), I assume the correct fix is for a jvisualvm update-alternatives to be added and incorporated into the Sun package install process.

Ah, sorry, an update. The visualvm package is used for the common launch script for either JDK (and is recommended from the sun-java6-jdk package, hence I presumably had it pre-upgrade but it updated as part of the Lucid upgrade).

The symlink issue is part of bug #657408, and I'll update it there with an x-ref to this one.

Attach screenshot of the errors as well if that's useful. The
/usr/lib/jvm/java-6-openjdk/lib/visualvm/profiler3/lib/deployed/jdk16/linux-amd64 folder is empty (as is the jdk15 one). Is this perhaps an x64 issue with no 64-bit libraries available? (Perhaps someone can test on x32?)

Changed in visualvm (Ubuntu):
status: New → Confirmed
Matthias Klose (doko) wrote :

I don't see this in oneiric anymore

Changed in visualvm (Ubuntu):
status: Confirmed → Fix Released

This appears all tied off now, but just to say there was a typo in my comment #10: I meant bug #657048, which documents the fix that is supposed to address this bug as well.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers