United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-8014894 : Possible to create unparsable JFR file

Details
Type:
Bug
Submit Date:
2013-05-20
Status:
Resolved
Updated Date:
2013-05-28
Project Name:
JDK
Resolved Date:
2013-05-22
Component:
hotspot
OS:
Sub-Component:
jfr
CPU:
Priority:
P3
Resolution:
Fixed
Affected Versions:
Fixed Versions:
hs24 (b46)

Related Reports
Backport:

Sub Tasks

Description
Run the following program:

public class HelloWorld
{
   public static void main(String[] args)
   {
      System.out.println("Hello World!");
      try {
         while(true) {
            Thread.sleep(0);
         }
      } catch (Exception e) {
      }
   }
}

.. for 20 seconds with threshold 0 on the Java Sleep event. On my machine this creates a ~1.3 GB file full of Java Sleep Events. I have tried to create and load such a file in JMC twice. First time, I got a 

java.lang.IllegalArgumentException: Event type 65536 is not described in the file

and the second time I got stuck in an infinite loop in the JMC parser.

Johan Ringdahl has tried the reference-parser with the following result:

Exception in thread "main" java.lang.RuntimeException: oracle.jrockit.jfr.parser.ParseException: Bad event id 134217728 
     at oracle.jrockit.jfr.parser.ChunkParser$1.hasNext(ChunkParser.java:352) 
     at att.main(att.java:21) 
Caused by: oracle.jrockit.jfr.parser.ParseException: Bad event id 134217728 
     at oracle.jrockit.jfr.parser.ChunkParser.nextEvent(ChunkParser.java:294) 
     at oracle.jrockit.jfr.parser.ChunkParser.next(ChunkParser.java:309) 
     at oracle.jrockit.jfr.parser.ChunkParser$1.hasNext(ChunkParser.java:350) 

Since these files are really large they cannot be attached but are available here (in Stockholm): t:\david\largefilebug\

This is with promoted build 25 of 7u40.
                                    

Comments
Could perhaps be a buffer oveflow event that is note emitted correctly.
                                     
2013-05-20
There is a bug in the handling of the BufferLost event which is causing this problem. Fixed.
                                     
2013-05-21



Hardware and Software, Engineered to Work Together