2 Replies Latest reply on Apr 3, 2014 3:44 PM by Klara Ward, Java Mission Control Dev-Oracle

    Problem opening large record-file


      I have 500MB file recorded from JVM, but this file could not be opened by JMC 5.2.0.  We try to use 32bit versin from JDK 1.7u45, JDK1.7u51, 64bit version from JDK1.7u51 but the parsing throws NPE exception.


      This is form the log of JMC:




      java.vendor=Oracle Corporation

      BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US

      Framework arguments:  -open flight-record-dump-140214_0424.jfr

      Command-line arguments:  -os win32 -ws win32 -arch x86 -open flight-record-dump-140214_0424.jfr



      !ENTRY com.jrockit.mc.flightrecorder.ui 4 0 2014-02-14 14:40:29.888

      !MESSAGE Could not load events from -flight-record-dump-140214_0424.jfr

      !STACK 0

      java.util.concurrent.ExecutionException: java.lang.NullPointerException

        at java.util.concurrent.FutureTask.report(FutureTask.java:122)

        at java.util.concurrent.FutureTask.get(FutureTask.java:188)

        at com.jrockit.mc.flightrecorder.FlightRecordingLoader.load(FlightRecordingLoader.java:174)

        at com.jrockit.mc.flightrecorder.ui.FlightRecordingEditor.doCreateRecordingInner(FlightRecordingEditor.java:141)

        at com.jrockit.mc.flightrecorder.ui.FlightRecordingEditor.doCreateRecording(FlightRecordingEditor.java:113)

        at com.jrockit.mc.flightrecorder.ui.FlightRecordingEditor.createRecording(FlightRecordingEditor.java:72)

        at com.jrockit.mc.flightrecorder.ui.AbstractFlightRecordingEditor$1.run(AbstractFlightRecordingEditor.java:58)

        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

      Caused by: java.lang.NullPointerException

        at com.jrockit.mc.flightrecorder.internal.parser.binary.Synthetics$1.handleEvent(Synthetics.java:103)

        at com.jrockit.mc.flightrecorder.internal.parser.binary.EventParser.loadEvent(EventParser.java:44)

        at com.jrockit.mc.flightrecorder.internal.parser.binary.EventParserManager.loadEvent(EventParserManager.java:89)

        at com.jrockit.mc.flightrecorder.internal.parser.binary.ChunkLoader.call(ChunkLoader.java:43)

        at com.jrockit.mc.flightrecorder.internal.parser.binary.ChunkLoader.call(ChunkLoader.java:1)

        at java.util.concurrent.FutureTask.run(FutureTask.java:262)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        at java.lang.Thread.run(Thread.java:744)



      Sometime, when dialog is shown to select some part of the record-file, when we select some small part, it is parsed and shown.


      Any help ?

        • 1. Re: Problem opening large record-file
          Klara Ward, Java Mission Control Dev-Oracle

          Looking at our source code, there seem to be some issues with the thread metadata, either in the generation in the server side, or in our parsing.

          Probably some of your data has these issues, which is why you can view parts of your recording.


          I've opened a bug for this (JMC-2830 for our internal reference)


          If you have a support contract, you can open a support ticket and request a patch. Otherwise we might possibly figure out something else.

          The bug is probably still there in the JMC 5.3.0 which will be out with JDK 8 quite soon, but it's always worth a try.


          Would you be interested in sharing your recording with us? I might supply a tool to split it so you won't have to share the whole 500MB.

          • 2. Re: Problem opening large record-file
            Klara Ward, Java Mission Control Dev-Oracle

            Would you mind running the following java program with your recording so we can get some information when trying to resolve this problem.


            It should compile if you just use a JDK 7u40 or higher.


            import java.io.IOException;
            import oracle.jrockit.jfr.parser.ChunkParser;
            import oracle.jrockit.jfr.parser.FLREvent;
            import oracle.jrockit.jfr.parser.FLREventInfo;
            import oracle.jrockit.jfr.parser.FLRProducer;
            import oracle.jrockit.jfr.parser.Parser;
            public class ThreadIDParser {
                 public static void main(String[] args) throws Exception {
                      if (args.length > 0) {
                      } else {
                           System.out.println("Must supply path to flight recording as first argument");
                 private static void parse(String filePath) throws IOException {
                      Parser parser = new Parser(filePath);
                      for (ChunkParser chunk : parser) {
                           System.out.println("Parsing chunk");
                           Integer threadStartId = findJvmEventTypeId(chunk.getProducers(), "java/thread_start");
                           Integer threadEndId = findJvmEventTypeId(chunk.getProducers(), "java/thread_end");
                           for (FLREvent e : chunk) {
                                if (threadStartId != null && e.getId() == threadStartId) {
                                     System.out.println("Thread start event with thread: " + (e.getThread() != null));
                                } else if (threadEndId != null && e.getId() == threadEndId) {
                                     System.out.println("Thread end event with thread: " + (e.getThread() != null));
                 static Integer findJvmEventTypeId(Iterable producers, String path) {
                      for (FLRProducer p : producers) {
                           if ("http://www.oracle.com/hotspot/jvm/".equals(p.getURIString())) {
                                for (FLREventInfo type : p.getEventInfos()) {
                                     if (path.equals(type.getPath())) {
                                          return type.getId();
                      System.out.println("Event type " + path + "not found");
                      return null;