From owner-freebsd-java@FreeBSD.ORG Thu Feb 20 17:59:22 2014 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B77DD91; Thu, 20 Feb 2014 17:59:22 +0000 (UTC) Received: from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3BFCA1C3C; Thu, 20 Feb 2014 17:59:21 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgUFAL5BBlOtJV2Y/2dsb2JhbABPCoMGOINZvD1PgRAWdIIlAQEBAwEBAiBVARALDgoCAgUWCwICCQMCAQIBFi8GDQEHAQGHeQgNrQChHBeBKYs/gSBcB4JvgUkEiFttjBSEBosvhUODSx4 X-IronPort-AV: E=Sophos;i="4.97,513,1389744000"; d="scan'208";a="305398978" Received: from rcdn-core-1.cisco.com ([173.37.93.152]) by rcdn-iport-7.cisco.com with ESMTP; 20 Feb 2014 17:59:15 +0000 Received: from dhcp-10-150-53-200.cisco.com (dhcp-10-150-53-200.cisco.com [10.150.53.200]) by rcdn-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id s1KHxFMG011544; Thu, 20 Feb 2014 17:59:15 GMT Message-ID: <53064273.6090306@marcuscom.com> Date: Thu, 20 Feb 2014 12:59:15 -0500 From: Joe Marcus Clarke User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Steve Wills Subject: Re: VisualVM 1.3.7 starts then quits References: <5304F7E5.8030802@marcuscom.com> <20140219200153.GB52070@mouf.net> In-Reply-To: <20140219200153.GB52070@mouf.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-java@freebsd.org X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Feb 2014 17:59:22 -0000 On 2/19/14, 3:01 PM, Steve Wills wrote: > On Wed, Feb 19, 2014 at 01:28:53PM -0500, Joe Marcus Clarke wrote: >> Hey Steve et al. I am trying to use VisualVM with OpenJDK 7 on FreeBSD >> 9.2-p3 to debug a problem with Tomcat. I have installed VVM both from >> pkgs and ports, and the behavior I see is that it launches, runs for 10 >> seconds with full GUI that is functional. But regardless of what I do >> within the app (or even if I do nothing), the window disappears after 10 >> seconds, and the app dies with exit code 2. >> >> The log shows nothing fatal. The last message is: >> >> WARNING [org.netbeans.modules.profiler.NetBeansProfiler]: Failed to >> initialize the Profiler engine: Problem with a required JFluid >> installation directory or file >> /usr/local/share/visualvm/profiler/lib/deployed/jdk16/solaris >> >> But the app runs a bit after that message is printed. I see from others >> that this DOES work on FreeBSD, so I'm wondering if there is a new >> issue, or if there's something I may need to do. My stats are: >> >> ------------------------------------------------------------------------------- >> >Log Session: Wednesday, February 19, 2014 1:17:16 PM EST >> >System Info: >> Product Version = VisualVM 1.3.7 >> Operating System = FreeBSD version 9.2-RELEASE-p3 running on amd64 >> Java; VM; Vendor = 1.7.0_51; OpenJDK 64-Bit Server VM >> 24.51-b03; Oracle Corporation >> Runtime = OpenJDK Runtime Environment 1.7.0_51-b13 >> Java Home = /usr/local/openjdk7/jre >> System Locale; Encoding = en (visualvm); US-ASCII >> Home Directory = /root >> Current Directory = /usr/home/marcus >> User Directory = /home/marcus/.visualvm/1.3.7 >> Cache Directory = /home/marcus/.cache/visualvm/1.3.7 >> Installation = /usr/local/share/visualvm/visualvm >> /usr/local/share/visualvm/profiler >> /usr/local/share/visualvm/platform >> >> Any advice would be very helpful. Thanks. > > Hmm, this is strange. One thing I notice is that it's trying to load things > from JDK6 (and for solaris at that). Have you tried running it under JDK6? > Personally, I build with a local patch that makes JDK7 the default (normally > JDK6 is default). So maybe it's as simple as making sure the right JDK is used? > > Googled around a bit about this and found: > > https://netbeans.org/bugzilla/show_bug.cgi?id=155892 > http://lists.freebsd.org/pipermail/freebsd-java/2008-July/thread.html > http://playground.teerapap.net/2011/08/visualvm-on-ubuntulucid-failed-to.html > https://bugs.launchpad.net/ubuntu/+source/visualvm/+bug/577958 I don't think the profile engine is the problem. VVM continues to run a bit after I get this message. The reports from others seem to indicate that even with this, the app should continue to run. Nonetheless, for my issue, I needed profiling quick, so I got a free trial for YourKit. It worked to help my identify my leak. > > So you're definitely not the only one to encounter this type of issue, although > none of those seem to indicate a resolution. > > The last two in particular make me wonder if building from source would help. > The VisualVM port isn't building VisualVM from source, it's just repackaging > the zip file from visualvm.java.net. We could build from source if needed. > Source is here: > > https://java.net/projects/visualvm/sources/svn/show > > The only copy of the libprofilerinterface.so file I can find is in the netbeans > package, but only versions for Solaris, Mac, etc. None for FreeBSD. > > Perhaps we would get it if we built VisualVM from source. I went through the code looking for a System.exit(2), but I couldn't find one. I'm really perplexed why this would yield a result code of 2 and otherwise be silent (i.e., the VM isn't dying on an Error). I wonder if this exit is coming from the JVM itself. Joe > > Steve > -- PGP Key : http://www.marcuscom.com/pgp.asc