How can this be a "low" priority JVM bug!?!
On 3/7/2012 11:21 AM, Konstantin Kolinko wrote:
2012/3/7 Kari Scott<[email protected]>: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: [email protected] For additional commands, e-mail: [email protected]
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
