Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D0A89601 for ; Wed, 7 Mar 2012 17:50:33 +0000 (UTC) Received: (qmail 1740 invoked by uid 500); 7 Mar 2012 17:50:29 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 1210 invoked by uid 500); 7 Mar 2012 17:50:27 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 1184 invoked by uid 99); 7 Mar 2012 17:50:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2012 17:50:26 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jessh@ptc.com designates 12.11.148.84 as permitted sender) Received: from [12.11.148.84] (HELO irp2.ptc.com) (12.11.148.84) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Mar 2012 17:50:17 +0000 X-IronPort-AV: E=Sophos;i="4.73,547,1325480400"; d="scan'208";a="109276735" Received: from hq-ex3fe2.ptcnet.ptc.com ([132.253.201.63]) by irp2.ptc.com with ESMTP; 07 Mar 2012 12:49:52 -0500 Received: from [132.253.16.106] ([132.253.201.117]) by HQ-EX3FE2.ptcnet.ptc.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 7 Mar 2012 12:49:52 -0500 Message-ID: <4F579FBE.4050105@ptc.com> Date: Wed, 07 Mar 2012 11:49:50 -0600 From: Jess Holle User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Tomcat Users List CC: Konstantin Kolinko Subject: Re: JMX JVM bug workaround question References: <18040233-D055-4EE4-9AB5-83272F388F09@cdw.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 07 Mar 2012 17:49:53.0073 (UTC) FILETIME=[B34C9A10:01CCFC8A] X-Virus-Checked: Checked by ClamAV on apache.org How can this be a "low" priority JVM bug!?! On 3/7/2012 11:21 AM, Konstantin Kolinko wrote: > 2012/3/7 Kari Scott: >> >> We are using Tomcat 7.0.23 with jdk1.6.0_30 on Solaris 10, mod_ajp 1.3 and Apache 2.2.21. >> >> I'm using the following code to retrieve memory information from our JMX server: >> >> >> ObjectName contextObjectName = new ObjectName("java.lang:type=Memory"); >> CompositeData memoryUsage = (CompositeData)server.getAttribute(contextObjectName, "HeapMemoryUsage"); >> >> >> This works really well most of the time but we occasionally we get this exception when trying to retrieve HeapMemoryUsage: >> >> javax.management.RuntimeMBeanException: >> java.lang.IllegalArgumentException: committed = 1607688192 should be< max = 1607270400 >> >> >> After some digging, I found that it is a bug in the JVM (It occurs in 1.7, too): >> >> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7100266 >> >> >> My questions for the list then are has anyone else come across this and, if so, how did you get around it? Is there an alternative way for retrieving used and committed memory from a JMX MBean? > The issue seems like some threading issue when "max" and "committed" > memory settings are calculated independently at different moments and > fail to pass a consistency check between them. > > I think I would wait a while and retry, but only once. > > Do you check what Runtime.freeMemory(), Runtime.totalMemory() return > at the same time? Maybe there is so little free memory that it is > worth to worry. > > Best regards, > Konstantin Kolinko > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org