United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6915365 assert(false,"Unsupported VMGlobal Type") at management.cpp:1540
JDK-6915365 : assert(false,"Unsupported VMGlobal Type") at management.cpp:1540

Details
Type:
Bug
Submit Date:
2010-01-08
Status:
Resolved
Updated Date:
2012-02-01
Project Name:
JDK
Resolved Date:
2010-04-06
Component:
hotspot
OS:
generic
Sub-Component:
svc
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs17
Fixed Versions:
hs18 (b02)

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
com/sun/management/HotSpotDiagnosticMXBean/GetDiagnosticOptions.java
com/sun/management/HotSpotDiagnosticMXBean/SetAllVMOptions.java

MM_REGRESSION/test/com/sun/management/HotSpotDiagnosticMXBean/GetDiagnosticOptions
MM_REGRESSION/test/com/sun/management/HotSpotDiagnosticMXBean/SetAllVMOptions

com/sun/management/HotSpotDiagnosticMXBean/GetDiagnosticOptions
com/sun/management/HotSpotDiagnosticMXBean/SetAllVMOptions
Sample error file:

http://sqeweb.sfbay.sun.com/nfs/results/vm/gtee/JDK7/NIGHTLY/VM/2010-01-07/GC_Baseline/javase/windows-i586/client/mixed/windows-i586_client_mixed_MM_REGRESSION/workDir/com/sun/management/HotSpotDiagnosticMXBean/GetDiagnosticOptions/hs_err_pid94216.log
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=\\management.cpp:1540
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (C:\\temp\\jprt\\P1\\B\\172602.ysr\\source\\src\\share\\vm\\services\\management.cpp:1540), pid=144188, tid=162500
#  Error: assert(false,"Unsupported VMGlobal Type")
#
# JRE version: 7.0-b78
# Java VM: OpenJDK Server VM (17.0-b05-2009-12-23-172602.ysr.frag-fastdebug mixed mode windows-x86 )
# An error report file with more information is saved as:
# R:\\results\\vm\\gtee\\JDK7\\NIGHTLY\\VM\\2009-12-25\\GC_Baseline-XXParallel\\javase\\windows-i586\\server\\mixed\\windows-i586_server_mixed_MM_REGRESSION\\workDir\\com\\sun\\management\\HotSpotDiagnosticMXBean\\GetDiagnosticOptions\\hs_err_pid144188.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#


http://sqeweb.sfbay.sun.com/nfs/results/vm/gtee/JDK7/NIGHTLY/VM/2009-12-25/GC_Baseline-XXParallel/javase/windows-i586/server/mixed/windows-i586_server_mixed_MM_REGRESSION/workDir/com/sun/management/HotSpotDiagnosticMXBean/GetDiagnosticOptions.jtr

Sounds like a missing case (is_double()) in the relevant switch statement?

                                    

Comments
SUGGESTED FIX

> hg diff management.cpp
diff --git a/src/share/vm/services/management.cpp b/src/share/vm/services/management.cpp
--- a/src/share/vm/services/management.cpp
+++ b/src/share/vm/services/management.cpp
@@ -1537,7 +1537,6 @@ bool add_global_entry(JNIEnv* env, Handl
     global->type = JMM_VMGLOBAL_TYPE_JSTRING;
   } else {
     global->type = JMM_VMGLOBAL_TYPE_UNKNOWN;
-    assert(false, "Unsupported VMGlobal Type");
     return false;
   }
 > hg diff Flag.c
diff --git a/src/share/native/sun/management/Flag.c b/src/share/native/sun/management/Flag.c
--- a/src/share/native/sun/management/Flag.c
+++ b/src/share/native/sun/management/Flag.c
@@ -133,11 +133,8 @@ Java_sun_management_Flag_getFlags
                                            globals[i].value.j);
             break;
         default:
-            // unsupported type
-            sprintf(errmsg, "Unsupported VMGlobal Type %d", globals[i].type);
-            JNU_ThrowInternalError(env, errmsg);
-            free(globals);
-            return 0;
+            // ignore unsupported type
+            continue;
         }
         switch (globals[i].origin) {
         case JMM_VMGLOBAL_ORIGIN_DEFAULT:
                                     
2010-03-23
EVALUATION

6631166 added a new vm argument type that triggers the assertion.  This assertion causes the nightly M&M tests to fail.

Adding a new vm argument type in M&M requires a synchronized change in hotspot and jdk.  On the other hand, the fix for 6898160 (hotspot) will filter VM flags of the unsupported type and 6924497 (jdk) will ignore VM flags of name==NULL (i.e. flags filtered by the VM).

We should decouple the jdk and hotspot dependency further so that a new type can be added in VM and this VM can run with an older version of jdk (i.e. jdk6 and later). Specially, the jdk should ignore flags of unsupported types and unknown types from the VM.  The VM should remove the assert.
                                     
2010-03-23
SUGGESTED FIX

The HotSpot side of this work around fix is heading to RT_Baseline.
It should be in the HSX-18-B02 push from RT_Baseline.
                                     
2010-03-24
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/4f7af0dc447b,ChangeRequest=6915365
                                     
2010-03-24
EVALUATION

http://hg.openjdk.java.net/jdk7/tl/jdk/rev/f8c9a5e3f5db,ChangeRequest=6915365
                                     
2010-03-24
EVALUATION

http://hg.openjdk.java.net/hsx/hsx17/baseline/rev/4f7af0dc447b,ChangeRequest=6915365
                                     
2010-03-24
EVALUATION

http://hg.openjdk.java.net/hsx/hsx17/master/rev/4f7af0dc447b,ChangeRequest=6915365
                                     
2010-03-26



Hardware and Software, Engineered to Work Together