Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in IR's LiveVariableAnalysis when running JIT passes #2345

Closed
headius opened this issue Dec 22, 2014 · 1 comment
Closed

NPE in IR's LiveVariableAnalysis when running JIT passes #2345

headius opened this issue Dec 22, 2014 · 1 comment

Comments

@headius
Copy link
Member

headius commented Dec 22, 2014

I'm not sure if this has to do with the JIT passes or if it's something deeper, but when I run with jit.threshold=0 and do gem install somegem, I get at least four methods that fail with the following trace. For this case, these are the only methods left that fail to compile on threshold=0.

2014-12-22T14:44:11.053-06:00: JITCompiler: Could not compile; passes run: [org.jruby.ir.passes.OptimizeTempVarsPass@96737c1e, org.jruby.ir.passes.CFGBuilder@500ca39f, org.jruby.ir.passes.LocalOptimizationPass@584ed071, org.jruby.ir.passes.AddCallProtocolInstructions@87f2d916, org.jruby.ir.passes.LiveVariableAnalysis@a0f4adec]:Config.Resolv::DNS::Config.lazy_initialize at /Users/headius/projects/jruby/lib/ruby/stdlib/resolv.rb:977 because of: "null"
java.lang.NullPointerException
    at org.jruby.ir.dataflow.analyses.LiveVariableNode.applyPreMeetHandler(LiveVariableNode.java:60)
    at org.jruby.ir.dataflow.FlowGraphNode.computeDataFlowInfo(FlowGraphNode.java:111)
    at org.jruby.ir.dataflow.DataFlowProblem.compute_MOP_Solution(DataFlowProblem.java:56)
    at org.jruby.ir.dataflow.analyses.LiveVariableNode.applyTransferFunction(LiveVariableNode.java:155)
    at org.jruby.ir.dataflow.FlowGraphNode.computeDataFlowInfoBackward(FlowGraphNode.java:133)
    at org.jruby.ir.dataflow.FlowGraphNode.computeDataFlowInfo(FlowGraphNode.java:116)
    at org.jruby.ir.dataflow.DataFlowProblem.compute_MOP_Solution(DataFlowProblem.java:56)
    at org.jruby.ir.dataflow.analyses.LiveVariableNode.applyTransferFunction(LiveVariableNode.java:155)
    at org.jruby.ir.dataflow.FlowGraphNode.computeDataFlowInfoBackward(FlowGraphNode.java:133)
    at org.jruby.ir.dataflow.FlowGraphNode.computeDataFlowInfo(FlowGraphNode.java:116)
    at org.jruby.ir.dataflow.DataFlowProblem.compute_MOP_Solution(DataFlowProblem.java:56)
    at org.jruby.ir.dataflow.analyses.LiveVariableNode.applyTransferFunction(LiveVariableNode.java:155)
    at org.jruby.ir.dataflow.FlowGraphNode.computeDataFlowInfoBackward(FlowGraphNode.java:133)
    at org.jruby.ir.dataflow.FlowGraphNode.computeDataFlowInfo(FlowGraphNode.java:116)
    at org.jruby.ir.dataflow.DataFlowProblem.compute_MOP_Solution(DataFlowProblem.java:56)
    at org.jruby.ir.passes.LiveVariableAnalysis.execute(LiveVariableAnalysis.java:92)
    at org.jruby.ir.passes.CompilerPass.run(CompilerPass.java:105)
    at org.jruby.ir.passes.CompilerPass.makeSureDependencyHasRunOnce(CompilerPass.java:127)
    at org.jruby.ir.passes.CompilerPass.run(CompilerPass.java:95)
    at org.jruby.ir.passes.CompilerPass.run(CompilerPass.java:119)
    at org.jruby.ir.IRScope.runCompilerPasses(IRScope.java:557)
    at org.jruby.ir.IRScope.prepareForCompilation(IRScope.java:627)
    at org.jruby.ir.targets.JVMVisitor.emitScope(JVMVisitor.java:135)
    at org.jruby.ir.targets.JVMVisitor.emitWithSignatures(JVMVisitor.java:265)
    at org.jruby.ir.targets.JVMVisitor.emitMethodJIT(JVMVisitor.java:255)
    at org.jruby.ir.targets.JVMVisitor.codegenScope(JVMVisitor.java:102)
    at org.jruby.ir.targets.JVMVisitor.compileToBytecode(JVMVisitor.java:67)
    at org.jruby.compiler.JITCompiler$JITClassGenerator.compile(JITCompiler.java:341)
    at org.jruby.compiler.JITCompiler$JITTask.run(JITCompiler.java:215)
    at org.jruby.compiler.JITCompiler.jitThresholdReached(JITCompiler.java:173)
    at org.jruby.internal.runtime.methods.InterpretedIRMethod.tryJit(InterpretedIRMethod.java:237)
    at org.jruby.internal.runtime.methods.InterpretedIRMethod.call(InterpretedIRMethod.java:110)
    at org.jruby.ir.targets.InvokeSite.invoke(InvokeSite.java:135)
    at Users.headius.projects.jruby.lib.ruby.stdlib.resolv.lazy_initialize_CLOSURE_1__lazy_initialize_0(/Users/headius/projects/jruby/lib/ruby/stdlib/resolv.rb:361)
@headius
Copy link
Member Author

headius commented Jan 14, 2015

I no longer see this on master and "gem install somegem" with threshold=0 appears to JIT everything successfully.

@headius headius closed this as completed Jan 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant