Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-1969

[drlvm][jit] nested synchronized blocks make Jitrino.OPT crash meeting multiple loop entrances to a single loop

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • DRLVM
    • None
    • any
    • Patch Available

    Description

      this is a sub-bug for HARMONY-1908. The reason is $subj. I suggest to restore a normal loop structure in this case (i. e. generalize the eliminateUnnestedLoopsOnDispatch() a little)

      of course, loop nesting may be broken in specially crafted bytecode samples (and we will not repair them with the proposed solution), but a reasonable behavoiur in this case would be to move bytecodes like this to JET. Here I am not for moving to JET because of the common nature of the code pattern (nested synches, javac) that we need to run heavily optimized.

      To reproduce, disable profiling-related asserts in ControlFlowGraph.cpp, rebuild Jitrino in debug mode.

      run DoubleSync (attached) with -Xem:opt

      java: /export/users/evpasko/svn/3/trunk/working_vm/vm/jitrino/src/shared/ControlFlowGraph.cpp:384: bool Jitrino::ControlFlowGraph::isEdgeProfileConsistent(bool, bool, bool): Assertion `doAssert?false:true' failed.
      SIGABRT in VM code.
      Stack trace:
      1: ?? (??:-1)
      2: abort (??:-1)
      3: __assert_fail (??:-1)
      4: Jitrino::ControlFlowGraph::isEdgeProfileConsistent(bool, bool, bool) (/export/users/evpasko/svn/3/trunk/working_vm/vm/jitrino/src/shared/ControlFlowGraph.cpp:385)
      5: Jitrino::ControlFlowGraph::smoothEdgeProfile() (/export/users/evpasko/svn/3/trunk/working_vm/vm/jitrino/src/shared/ControlFlowGraph.cpp:947)
      6: Jitrino::StaticProfiler::estimateGraph(Jitrino::IRManager&, double, bool) (/export/users/evpasko/svn/3/trunk/working_vm/vm/jitrino/src/dynopt/StaticProfiler.cpp:253)
      7: Jitrino::StaticProfilerPass::_run(Jitrino::IRManager&) (/export/users/evpasko/svn/3/trunk/working_vm/vm/jitrino/src/dynopt/StaticProfiler.cpp:293)
      8: Jitrino::OptPass::run() (/export/users/evpasko/svn/3/trunk/working_vm/vm/jitrino/src/optimizer/optpass.cpp:61)
      9: Jitrino::runPipeline(Jitrino::CompilationContext*) (/export/users/evpasko/svn/3/trunk/working_vm/vm/jitrino/src/main/Jitrino.cpp:226)
      10: Jitrino::compileMethod(Jitrino::CompilationContext*) (/export/users/evpasko/svn/3/trunk/working_vm/vm/jitrino/src/main/Jitrino.cpp:261)
      <snip>

      dumping dot files helps significantly

      Attachments

        Issue Links

          Activity

            People

              varlax Alexey Varlamov
              egor Egor Pasko
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: