JDK-8211823 : Parsing of compiler directives failed Could not load file: jcmd_directives.json
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 12
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2018-10-06
  • Updated: 2018-10-15
  • Resolved: 2018-10-15
Related Reports
Duplicate :  
Duplicate :  
Description
After JDK-8210459 we have a test failure in tier 3:

compiler/compilercontrol/mixed/RandomCommandsTest.java

---------------- stdout ----------------
13190:
Value error on line 2 byte 10: Method pattern error: Method pattern uses multiple '.' in pattern
  At '"<compiler.compilercontrol.share.pool.sub.Klass>/*$method'.
  match: "<compiler.compilercontrol.share.pool.sub.Klass>/*$method ()V", 
  c1: {
    Exclude: true
  }, 
  c2: {
    Enable: true
  }
}, {
  match: "nonexistent*.met*hod ", 
  c1: {
    Enable: true
  }, 
  c2: {
    Enable: true
  }
}, {
  match: "*/*met]hod,(Ljava/lang/Float;)Ljava/lang/Double;", 
  PrintAssembly: true
}, {
  match: "*Klass _method ()V", 
  c1: {
    Exclude: false
  }, 
  c2: {
    Exclude: false
  }
}, {
  match: "*Klass*.*_method*()V", 
  nonexistent: {
    nonexistent: *Klass*.*_method*()V
  }
}, {
  match: "$compiler.compilercontrol.share.pool.sub.Klass/<method>", 
  c1: {
    Exclude: false
  }, 
  c2: {
    Exclude: false
  }
}, {
  match: "compiler/compilercontrol/sh@%are/pool/sub/Klass$Internal.nonexistent*,", 
  c1: {
    Enable: true
  }, 
  c2: {
    Enable: true
  }
}, {
  match: "compiler/compilercontrol@%/share/pool/subpack/Klass*,*met]hod", 
  c1: {
    Exclude: false
  }, 
  c2: {
    Exclude: false
  }
}, {
  match: "*.*", 
  c1: {
    inline: "+compiler/compilercontrol/sh@%are/pool/sub/Klass$Internal.nonexistent*,"
  }, 
  c2: {
    Enable: true
  }
}]
Internal error on line 9 byte 1: Directive missing required match.
  At '},'.
}, {
  match: "nonexistent*.met*hod ", 
  c1: {
    Enable: true
  }, 
  c2: {
    Enable: true
  }
}, {
  match: "*/*met]hod,(Ljava/lang/Float;)Ljava/lang/Double;", 
  PrintAssembly: true
}, {
  match: "*Klass _method ()V", 
  c1: {
    Exclude: false
  }, 
  c2: {
    Exclude: false
  }
}, {
  match: "*Klass*.*_method*()V", 
  nonexistent: {
    nonexistent: *Klass*.*_method*()V
  }
}, {
  match: "$compiler.compilercontrol.share.pool.sub.Klass/<method>", 
  c1: {
    Exclude: false
  }, 
  c2: {
    Exclude: false
  }
}, {
  match: "compiler/compilercontrol/sh@%are/pool/sub/Klass$Internal.nonexistent*,", 
  c1: {
    Enable: true
  }, 
  c2: {
    Enable: true
  }
}, {
  match: "compiler/compilercontrol@%/share/pool/subpack/Klass*,*met]hod", 
  c1: {
    Exclude: false
  }, 
  c2: {
    Exclude: false
  }
}, {
  match: "*.*", 
  c1: {
    inline: "+compiler/compilercontrol/sh@%are/pool/sub/Klass$Internal.nonexistent*,"
  }, 
  c2: {
    Enable: true
  }
}]
Parsing of compiler directives failed
Could not load file: jcmd_directives.json
Comments
So, it seems like the problem is not with the parser. The test specifically generates patterns that must cause parser failures. The problem here is this: jib > ACTION: driver -- Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Compilation log expected. Met: <task_done success='1' nmsize='40' count='100' inlined_bytes='3' stamp='13.145'/>: expected false, was true jib > REASON: User specified action: run driver/timeout=1200 compiler.compilercontrol.mixed.RandomCommandsTest
15-10-2018

It seems like you can't use dots in the name of a class. Dot is to separate the class name from method name.
15-10-2018

The errors however come from a parser that is written in c++ and I don't think it should or can be affected by whether a ivmci compiler is on or not. Nils [~neliasso], could you please take a look on why the parser barfs?
15-10-2018

I've been successful with reproducing the failure by specifying a random seed to jtreg when running it. For example, on linux-x64-debug "-Djdk.test.lib.random.seed=6701158122526420210". Note that the following options are also required: -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+TieredCompilation -XX:+UseJVMCICompiler -Djvmci.Compiler=graal However, I've tried a few various older versions and the issue seems to be pre-existing, and not related to JDK-8210459. Therefore I will turn over investigation to someone who actually knows the code. The required options suggests that it is Graal related, so starting there.
15-10-2018

I'm fairly certain it shouldn't have anything to do with JDK-8210459, but the timing certainly is suspicious so will see if I can reproduce it.
08-10-2018

Note this test generates random test cases so simply running the test and seeing it pass is not a sufficient check!
06-10-2018

Also: Value error on line 2 byte 10: Method pattern error: Method pattern uses multiple '.' in pattern At '"compiler.compilercontrol.share.pool.subpack.Klass.*hod",'. match: "compiler.compilercontrol.share.pool.subpack.Klass.*hod", c1: { Enable: true }, c2: { Enable: true } }, { match: "compiler.compilercontr*ol.share.pool.sub.Klass*.*,", PrintAssembly: true }, { match: "compiler/compilercontrol/share/pool/subpack/Klass.met@%hod* (I[Ljava/lang/String;Ljava/lang/Integer;[B[[D)V", c1: { Exclude: true }, c2: { Exclude: true } }] Internal error on line 9 byte 1: Directive missing required match. At '},'. }, { match: "compiler.compilercontr*ol.share.pool.sub.Klass*.*,", PrintAssembly: true }, { match: "compiler/compilercontrol/share/pool/subpack/Klass.met@%hod* (I[Ljava/lang/String;Ljava/lang/Integer;[B[[D)V", c1: { Exclude: true }, c2: { Exclude: true } }] Parsing of compiler directives failed Could not load file: jcmd_directives.json
06-10-2018