JDK-8012384 : ciReplay: can't replay compilation generated by product binaries with fastdebug binaries
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs25,9,10
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2013-04-16
  • Updated: 2022-02-02
  • Resolved: 2022-02-02
Related Reports
Blocks :  
Relates :  
Description
$ .../java -XX:+ReplayCompiles -XX:ReplayDataFile=replay_pid34153.log
Error while parsing line 234: constant pool length mismatch: wrong class files?

ciInstanceKlass java/lang/Object 1 1 79 100 10 10 10 10 8 10 10 10 100 8 10 3 8 3 10 10 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 100 1 1 100 1 1 1 1 12 12 100 12 12 1 12 100 12 12 1 1 12 1 12 12 1 1 1 1 1 1 1 1 1 1 1 1
Failed on constant pool length mismatch: wrong class files?

$ .../java  -version
openjdk version "1.8.0-internal-fastdebug"
OpenJDK Runtime Environment (build 1.8.0-internal-fastdebug-vladimir_2013_04_11_19_24-b00)
OpenJDK 64-Bit Server VM (build 25.0-b25-fastdebug, mixed mode)

Comments
The current version of replay does not record class file/jar paths or make any effort to serialize class files. It assumes identical class files at capture and replay time. The burden is on the user to provide replay with the correct class files. Closing as "Won't Fix".
02-02-2022

I reproduced this with jdk8. In jdk8, the java.lang.Object constant pool in the product build has 78 slots, while in the debug build it has 86 slots. This seems to be because of extra debug info caused by LocalVariableTable, etc. If I used -Xbootclasspath to use the product class files, the problem goes away.
02-02-2022

It looks like it actually works. I generated replay data file using product build and then used fastdebug one to run it. It worked for me. May be it depends on content of replay data file ...
19-10-2021

It seems like recording the module/class path or JDK path in replay file should solve this.
05-08-2021