We're updating the issue view to help you get more done. 

NPE during OSR when running h2 benchmark from DaCapo 9.12

Description

Running h2 from the DaCapo 9.12 benchmark suite occasionally shows a failure during on-stack-replacement:

Optimizing compiler (via recompileWithOptOnStackSpecialization): can't optimize "< org.dacapo.harness.DacapoClassLoader{urls=[file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/derbyTesting.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/junit-3.8.1.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/h2-1.2.121.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/tpcc.jar], parent=SystemAppCL}, Lorg/dacapo/h2/TPCCSubmitter; >.runTransactions (Ljava/lang/Object;I)J" (error was: org.jikesrvm.compilers.opt.OptimizingCompilerException: ERROR produced in module:Compiler
failure during compilation of < org.dacapo.harness.DacapoClassLoader{urls=[file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/derbyTesting.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/junit-3.8.1.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/h2-1.2.121.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/tpcc.jar], parent=SystemAppCL}, Lorg/dacapo/h2/TPCCSubmitter; >.runTransactions (Ljava/lang/Object;I)J
)
Compiler failure during compilation of < org.dacapo.harness.DacapoClassLoader{urls=[file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/derbyTesting.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/junit-3.8.1.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/h2-1.2.121.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/tpcc.jar], parent=SystemAppCL}, Lorg/dacapo/h2/TPCCSubmitter; >.runTransactions (Ljava/lang/Object;I)J
java.lang.NullPointerException
at org.jikesrvm.compilers.opt.bc2ir.BC2IR.getLocal(BC2IR.java:4946)
at org.jikesrvm.compilers.opt.bc2ir.BC2IR.do_iload(BC2IR.java:2995)
at org.jikesrvm.compilers.opt.bc2ir.BC2IR.generateFrom(BC2IR.java:522)
at org.jikesrvm.compilers.opt.bc2ir.BC2IR.generateHIR(BC2IR.java:371)
at org.jikesrvm.compilers.opt.bc2ir.BC2IR.generateHIR(BC2IR.java:169)
at org.jikesrvm.compilers.opt.bc2ir.ConvertBCtoHIR.perform(ConvertBCtoHIR.java:38)
at org.jikesrvm.compilers.opt.driver.CompilerPhase.performPhase(CompilerPhase.java:205)
at org.jikesrvm.compilers.opt.driver.OptimizationPlanAtomicElement.perform(OptimizationPlanAtomicElement.java:78)
at org.jikesrvm.compilers.opt.driver.OptimizationPlanCompositeElement.perform(OptimizationPlanCompositeElement.java:129)
at org.jikesrvm.compilers.opt.driver.CompilationPlan.execute(CompilationPlan.java:128)
at org.jikesrvm.compilers.opt.driver.OptimizingCompiler.compile(OptimizingCompiler.java:170)
at org.jikesrvm.compilers.common.RuntimeCompiler.optCompile(RuntimeCompiler.java:362)
at org.jikesrvm.compilers.common.RuntimeCompiler.recompileWithOptOnStackSpecialization(RuntimeCompiler.java:491)
at org.jikesrvm.osr.SpecialCompiler.optCompile(SpecialCompiler.java:207)
at org.jikesrvm.osr.SpecialCompiler.recompileState(SpecialCompiler.java:46)
at org.jikesrvm.adaptive.OnStackReplacementPlan.execute(OnStackReplacementPlan.java:120)
at org.jikesrvm.adaptive.recompilation.CompilationThread.run(CompilationThread.java:54)
org.jikesrvm.compilers.opt.OptimizingCompilerException: ERROR produced in module:Compiler
failure during compilation of < org.dacapo.harness.DacapoClassLoader{urls=[file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/derbyTesting.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/junit-3.8.1.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/h2-1.2.121.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/tpcc.jar], parent=SystemAppCL}, Lorg/dacapo/h2/TPCCSubmitter; >.runTransactions (Ljava/lang/Object;I)J

at org.jikesrvm.compilers.opt.driver.OptimizingCompiler.fail(OptimizingCompiler.java:265)
at org.jikesrvm.compilers.opt.driver.OptimizingCompiler.compile(OptimizingCompiler.java:184)
at org.jikesrvm.compilers.common.RuntimeCompiler.optCompile(RuntimeCompiler.java:362)
at org.jikesrvm.compilers.common.RuntimeCompiler.recompileWithOptOnStackSpecialization(RuntimeCompiler.java:491)
at org.jikesrvm.osr.SpecialCompiler.optCompile(SpecialCompiler.java:207)
at org.jikesrvm.osr.SpecialCompiler.recompileState(SpecialCompiler.java:46)
at org.jikesrvm.adaptive.OnStackReplacementPlan.execute(OnStackReplacementPlan.java:120)
at org.jikesrvm.adaptive.recompilation.CompilationThread.run(CompilationThread.java:54)
Optimizing compiler (via recompileWithOptOnStackSpecialization): can't optimize "< org.dacapo.harness.DacapoClassLoader{urls=[file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/derbyTesting.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/junit-3.8.1.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/h2-1.2.121.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/tpcc.jar], parent=SystemAppCL}, Lorg/dacapo/h2/TPCCSubmitter; >.runTransactions (Ljava/lang/Object;I)J" (error was: org.jikesrvm.compilers.opt.OptimizingCompilerException: ERROR produced in module:Compiler
failure during compilation of < org.dacapo.harness.DacapoClassLoader{urls=[file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/derbyTesting.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/junit-3.8.1.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/h2-1.2.121.jar,file:/home/brangs/committer-repos/jikesrvm/dist/development_x86_64-linux/./scratch/jar/tpcc.jar], parent=SystemAppCL}, Lorg/dacapo/h2/TPCCSubmitter; >.runTransactions (Ljava/lang/Object;I)J
)

Environment

None

Status

Assignee

Unassigned

Reporter

Erik Brangs

Labels

None

External issue ID

None

Fix versions

Affects versions

3.1.3

Priority

Medium