Duplicate :
|
|
Relates :
|
|
Relates :
|
FULL PRODUCT VERSION : Java(TM) SE Runtime Environment (build 1.6.0_05-b13) Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing) Java(TM) SE Runtime Environment (build 1.6.0_07-b06) Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing) Java(TM) SE Runtime Environment (build 1.6.0_10-rc-b28) Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing) FULL OS VERSION : Microsoft Windows [Version 6.0.6000] A DESCRIPTION OF THE PROBLEM : # # An unexpected error has been detected by Java Runtime Environment: # # Internal Error (sharedRuntime.cpp:886), pid=4516, tid=5916 # Error: guarantee((retry_count++ < 100),"Could not resolve to latest version of redefined method") # # Java VM: Java HotSpot(TM) Client VM (11.0-b15 mixed mode, sharing windows-x86) # An error report file with more information is saved as: # C:\workspaces\btrace\Jinjah\hs_err_pid4516.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: No THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: No STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : start a dummy application that keeps on running connect with attach api in the agent do a retransform of modifiable classes (excluding all classes needed in the agent) Retransformation instruments the code with timers The agent starts up a jetty server. This will allow to view the timers in a browser. so fa so good. when i connect to the jetty server, the VM crashes with above error EXPECTED VERSUS ACTUAL BEHAVIOR : i´d like to see method names and how log they executed ERROR MESSAGES/STACK TRACES THAT OCCUR : Attached seperatly REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- agent: public static void agentmain(String args, Instrumentation inst) { System.out.println("agentmain"); main(args, inst); } private static synchronized void main(final String args, final Instrumentation inst) { if (Agent.instrumentation != null) { return; } else { Agent.instrumentation = inst; } [....setup system classpath.....] inst.addTransformer(classTransformer); ArrayList<Class<?>> list = GenericFactory.newArrayList(); Class<?>[] allLoadedClasses = inst.getAllLoadedClasses(); for (int i = 0; i < allLoadedClasses.length; i++) { if (inst.isModifiableClass(allLoadedClasses[i])) { list.add(allLoadedClasses[i]); } } Class<?>[] rc = new Class<?>[list.size()]; rc = list.toArray(rc); try { inst.retransformClasses(rc); } catch (UnmodifiableClassException e1) { e1.printStackTrace(); } Server jetty = new Server(8080); jetty.addHandler(new Webview()); try { jetty.start(); } catch (Exception e) { e.printStackTrace(); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : -Xint or -server
|